Hi,
I'm currently working on an entertainment website which will feature news articles. Sometimes these news articles will contain "spoiler" information that users might not always want to see.
I was wondering if there might be a hack or module that I could use so that I could, for example, create a new story with an opening and closing paragraph and in the middle of the story there could perhaps be a paragraph of text (containg the spoiler information) that users could click to view within the article?
At present, the easiest option would perhaps be to have invisible text that users could highlight to view the spoiler information. However, I want something more usable - perhaps built with AJAX.
Any ideas?
Thanks,
Neil.
Comments
I do not know of anything
I do not know of anything that exists now, but you could easily create a new module that uses hook_nodeapi to add the ability to add/view spoilers for all your content. When a node/story is viewed the new module would add a link to show the spoiler. The link could be to a new page or to an javascript function that displayed text. An AJAX solution might be cool, but you can probably get most of the effect with simply a hidden div.
Actually, after reading my post you probably do it with css and the story module (or flexinode). With flexinode you can have a field for the spoiler and create a custom template for the display. That way the author does not have to know any html.
The in your theme add css for the spoiler and add some javascript to toggle the div display value.
* This code is for illustration purposes and is probably broken.
White Paper Designs