Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A practical way of formatting explicit content

As a blogger, I want to mark any content in my CMS based on how explicit it is (violent, erotic, spoiler, obscene and so on..). Is there a proper practical library and standard for this?

I have read about RTA, ICRA, PICS and W3C POWDER, but they mark entire page with meta or header. POWDER seems too complex - as far as I understood, it adds metadata outside of the page? Can you provide a simple useful example, if I use with HTML5 doctype.

What I want is a way to mark HTML elements based on their rating. I would also like it to be compliant with any parental filtering. It would also be nice to add EXIF data into images to have them filtered independent of the context.

like image 739
Artjom Kurapov Avatar asked Apr 10 '12 10:04

Artjom Kurapov


1 Answers

As far as I'm aware there aren't any widely used standards that can do what you've described. Also, what is the end-goal? For browsers to automatically recognize (and somehow handle/filter) the explicit content?

If you plan on handling the filtering yourself, you can use HTML5 custom data attributes. With them you can do something like:

<li class="blogpost" data-rating="G"> [content] </li>

And then use that custom attribute to filter/hide the content with JavaScript, CSS, PHP, or whatever other language, for example:

li.blogpost[data-rating="R"] { [some styling] }

The options on how to handle this paradigm are extremely broad. This isn't exactly a standard, and would obviously require a fair amount of planning and coding. However it would allow you to filter the content based on metrics you define. This type of solution would pair well with a simple login system as suggested in other comments, wherein the users could select what content they want to filter. You could also define age limits for it, or use any number of other options.

This probably won't give you any automatic standards-based filters or anything like that, but such technologies are not widely supported anyways, as far as I know.

If this isn't even close to what you're looking for, could you provide more details on how you want the end product to function?

like image 107
orourkek Avatar answered Oct 03 '22 10:10

orourkek