Help - Search - Members - Calendar
Full Version: Oh, their virgin eyes!
Movable Type Community Forum > Additional Resources > Tips and Tricks
ThatAdamGuy
I just started up a Humor Blog which includes both 'clean' and 'naughty' entries.

Out of respect for those with, ahem, more delicate sensibilities, I'd like to make arrangements so these folks don't stumble upon the naughty stuff.

One thing I've tentatively done is put "[Adult Material]" in the entry body and then the joke itself in the extended section (how apropos, eh? biggrin.gif).

But this'll get quickly annoying for folks who WANT to browse the "Dirty" stuff, and are likely to affirmatively select the "Dirty" category page for reading; they'll have to click 'more' on every single entry, even the short ones.

Any ideas?  I figure any solution'll use one of the category plugins, but I'm not sure beyond that...
stepan
That should be implementable using Javascript and display styles.

Basically, include the content of dirty jokes in a <div> with a style="display:none" attribute, which makes them invisible.  Then, based on a check-box or whatever, have a Javascript that changed the divs' style.display from "none" to "" (empty string) which will display the content.  You could use a cookie to save the user's preferences and automatically display the noughty stuff when the page is loaded.

I think I remember someone posting in the forum about toggling inlined comments this way.
ThatAdamGuy
Unfortunately, I don't know enough about javascript to do this (yet).

And would the 'hidden' content still be fully indexed by search engines?

And what time is it where you are, anyway?  If you're also in the Western U.S., it seems that your schedule is as screwy as mine biggrin.gif
Nortis
How about using keywords ore even categories on the humor?
I suppose you could use some script to sort out the humor like:

- not dirty at all
- dirty and the not dirty ones

Then users can click on the setting they want and get there humor.
ThatAdamGuy
Nortis,

Indeed, that's what I've done... included two additional categories called "Dirty" and "Slightly dirty."

However, since all new entries are posted on the front index page AND stuff is sent out via syndication, I fear that some more prudish folks may stumble upon the naughtier bits against their will or interest :|
scsmith
This might be clunkier than you want, but could you set up two index templates and two RSS feeds? One with just the not-dirty category, and one with all of them?

I know there has to be a better way, but I can't see it through the brain fog at the moment.

-Steph
faf
I'm thinking the best way to do this is thru "skinning"

the same way you change a stylesheet or body content based on a cookie

As for the syndication, it's not your problem whoever puts your content on their site.

Create two rss feeds, one dirty, one not. And it's up to whoever syndica8s it to figure out how show it.

I'm sure there must be an equivalent of rating meta tags in RSS that sites that syndic8 a lot of websites use for sorting into categories.
crys
I have adult content in my fiction site... but being a fiction site the full text never shows except on the Individual archive and I use a php script to have the user awknowlage the content before reading it.

CODE
<?php $blog = "<MTBlogName>"; ?>
<?php
$flag = 0;
<MTEntryCategories>
if (("<$MTCategoryLabel$>" == "Rated Adult")||("<$MTCategoryLabel$>" == "Rated NC-17"))
 {
   $flag = 1;  
 }
</MTEntryCategories>

if ($declare)
 {
   $flag = 0;
   if ($remember)
     {
       setcookie("declare", 1 , time() + 10 * 86400, "/");
       // 10 days
     }
 }

?>
<?php include ("/home/crysc/ed.fanworks.net/includes/header1.inc");  ?><$MTBlogName$> -- <$MTEntryCategory$> -- <$MTEntryTitle$><?php include ("/home/crysc/ed.fanworks.net/includes/header2-scripts.inc");  ?><$MTEntryTitle$><?php include ("/home/crysc/ed.fanworks.net/includes/header3.inc");  ?>


<?php if ($flag == 1): ?>
 <h2 align="center">~ Warning ~</h2>
 <p align="left">This page contains <b>Adult Content</b>.</p>
 <p align="left">I declare that I am of Legal Age in my area, am not prohibited from reading adult works, and wish to read them:</p>
 <form method="POST">
   <blockquote>
     <p><input type="submit" value="I so declare." name="declare"> <input type="checkbox" name="remember" value="ON">Remember this</p>
   </blockquote>
 </form>
 <p align="left">Otherwise:</p>
 <form>
   <blockquote>
     <input type="button" onclick="top.location = 'javascript:history.back(1)'" value="Go Back.">
   </blockquote>
 </form>
<?php else: ?>


<p>include regular page content here -- as standard unescaped html w/ mt tags</p>


<?php endif; ?>

<?php include ("/home/crysc/ed.fanworks.net/includes/footer.inc");  ?>


obviously you can hardcode the header and footer if you prefer -- I use includes on all my pages and it makes for shorter example code.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.