Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Spoiler plugin?

If Trent’s theory is correct (and it sounds good) I think the best thing for you to do is to plonk that javascript reference in a plugin (that’s certainly the neatest thing). This is probably the code you need.

<?php
/*
Plugin Name: Javascript Spoilers
Plugin URI: [Enhanced SS page]
Description: Makes little javascript buttons to show and hide text in spoiler tags. A port of a WP plugin.
Author: [Author of Enhanced SS]
Version: 0.1
Author URI: [Author of Enhanced SS homepage]
*/

function ess_addjs()
{
$plugin_uri = bb_get_option('uri') . str_replace(BBPATH, '', BBPLUGINDIR);
$js_uri = $plugin_uri . 'enhancedss.js';
echo '<script type="text/javascript" src="' . $js_uri . '" />' . "n";
}

add_action('bb_head', ''ess_addjs);
?>

You will have to modify the javascript filename from enhancedss.js to whatever it’s actually called.

Copy and paste all that into a plain-text file, call it something.php and upload it to your plugins folder. Also upload the enhancedss.js file to that folder.

Almost all that code was totally ripped off from Sam Bauer’s Page links plugin. :)

Skip to toolbar