List Info

Thread: Re: message: message_hide-0.1




Re: message: message_hide-0.1
user name
2007-01-20 07:47:18
Here is a better way to do this:

--- data/samizdat/css/common.css       
d1ade41e67996c6fa9a5ec149a867e0829330f62
+++ data/samizdat/css/common.css       
13546aa76cf0ed3b391a9d579e689e8133483c8a
 -1,3
+1,6 
 /* hide some elements in fully featured UA */
 .hidden {
        display: none; }
+
+div.message-hidden {
+       text-decoration: line-through; }
--- lib/samizdat/engine/template.rb    
e71909a5e686c0e4dbc31d717d5c27264863f943
+++ lib/samizdat/engine/template.rb    
d0bacac95afe3618c41df42e3a434ada49e65219
 -498,10
+498,15  version 2 or later. </div>}
       else
         message_content(translation, mode)
       end
+    html =
 %{<div class="message"
id="id#{message.id}">
 #<div
class="info">#</div>
 <div
class="content">#</div>
 </div>n}
+    if message.hidden
+      html = %{<div
class="message-hidden">n#</div>n}

+    end
+    html
   end

   # language selection

I will include this in the next snapshot.

-- 
Dmitry Borodaenko


_______________________________________________
samizdat-devel mailing list
samizdat-develnongnu.org
http://lists.nongnu.org/mailman/listinfo/samizdat-devel

message_hide-0.3
user name
2007-01-20 19:28:36
hi dmitry and lurkers,

You did what i was sort of expecting - something in css
instead of the config. i like this - it's keeping things
neat.  

However, i also added a bit more to common.css -
"font-size: 70%".
There are some pretty horrible things that get published,
and IMHO it
should be possible to make sure that people trying to
discredit 
open publishing/open editing by showing openly published
rubbish 
have a difficult time.

Here's my patch:

--- samizdat/css/common.css_061207  2006-11-28
17:57:47.000000000 +0100
+++ samizdat/css/common.css     2007-01-21
01:39:29.288461432 +0100
 -1,3
+1,8 
  /* hide some elements in fully featured UA */
  .hidden {
         display: none; }
+
+div.message-hidden {
+       text-decoration: line-through;
+       font-size: 70%}
+



Secondly, there's something missing from 0.6.0 (i haven't
yet tried the new
snapshot) is that old copies of a hidden article (if that
article happens
to be an article which has been openly edited, or edited by
the non-anonymous
author), then someone could still link to *old* versions of
the article
and innocent third parties would not necessarily realise
that this is an
old version of an article which later on became hidden -
unless they click
on "parent article".


Here's my patch, which seems to work for me:

--- engine/message.rb~  2006-12-19 01:00:37.000000000 +0100
+++ engine/message.rb   2007-01-21 02:21:34.189618112 +0100
 -416,8
+416,8 
          end

        elsif :hide == action or :unhide == action
-        db.do 'UPDATE Message SET hidden = ? WHERE id =
?',
-          (:hide == action), id
+        db.do 'UPDATE Message SET hidden = ? WHERE (id = ?
or version_of = ?)',
+          (:hide == action), id, id

        elsif :displace == action
          # displace content without saving previous
version



cheers
boud




On Sat, 20 Jan 2007, Dmitry Borodaenko wrote:

> Here is a better way to do this:
>
> --- data/samizdat/css/common.css 
> d1ade41e67996c6fa9a5ec149a867e0829330f62
> +++ data/samizdat/css/common.css 
> 13546aa76cf0ed3b391a9d579e689e8133483c8a
>  -1,3 +1,6 
> /* hide some elements in fully featured UA */
> .hidden {
>       display: none; }
> +
> +div.message-hidden {
> +       text-decoration: line-through; }
> --- lib/samizdat/engine/template.rb 
> e71909a5e686c0e4dbc31d717d5c27264863f943
> +++ lib/samizdat/engine/template.rb 
> d0bacac95afe3618c41df42e3a434ada49e65219
>  -498,10 +498,15  version 2 or later.
</div>}
>      else
>        message_content(translation, mode)
>      end
> +    html =
> %{<div class="message"
id="id#{message.id}">
> #<div
class="info">#</div>
> <div
class="content">#</div>
> </div>n}
> +    if message.hidden
> +      html = %{<div
class="message-hidden">n#</div>n}

> +    end
> +    html
>  end
>
>  # language selection
>
> I will include this in the next snapshot.
>


_______________________________________________
samizdat-devel mailing list
samizdat-develnongnu.org
http://lists.nongnu.org/mailman/listinfo/samizdat-devel

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )