Censorship feature for autors
|
|
By Sinsemihl , Section Code [] Posted on Sun Sep 19, 2004 at 12:00:00 PM PST
|
|
We are currently setting up a new Scoop site (looove that piece of software!) that acts as a 'shadow site' to an existing one, a place where (trusted) users can vent steam, rant and have fun without really hurting anyone. Still, I don't want anything offensive to leak into the realm of those that are not logged in, if only for legal reasons, and I pretty much know how I want it be done. Here, I am asking experienced folks for a hint on the best implementation of a way to hide arbitrary parts of posts at the author's discretion.
|
The idea is relatively simple: Authors can use a tag (<censor>) or simply straight brackets ('[]') to mark those portions of text that should only be visible to those users that are logged in and trusted members. The rest, including anonymous guests, just sees a number of blackbackgrounded nbsps instead. (BTW: The normal voting mechanism will be still in place to weed out the _truly_ offensive stuff.)
So, what I want is to introduce a line of perl code into Scoop, which parses for our 'black-bar' tag, checks for the status of the user requesting the page and either wiping the enclosed text (for anonymous and non-trusted users) or coloring it (for trusted users). This should apply to stories, comments and if possible headlines and even user-names. What would be the right, the cleanest and most elegant place to add this alteration?
Thank you very much for your help and comments! |
|
Story Views
|
89 Scoop users have viewed this story.
|
|