1 gausland Dec 13, 2005 13:15
3 balupton Dec 14, 2005 18:59
What was wrong with using:
Breif Description
<!--more-->
In depth story
All this type of stuff is explained in the default posts when b2evo is installed.
4 gausland Dec 14, 2005 19:32
I think you're missing the point. I'm not complaining about b2 evolution, I just wanted to share... Who knows, someone might even think it's a good idea. For those who don't: well thats fine as well. :)
5 balupton Dec 14, 2005 19:41
Oh my bad, thought you were trying to put the 'read more' stuff inside one your explainboxes ;)
I'm pretty sure a plugin wouldnt be able to do this yet.
As you would need the plugin to insert code inside the skin and the write section for a post.
You can have a plugin run in the write section, but can't get them to run inside the skin without manually performing a call to the plugin (like the archive plugin).
I have no experience with plugins, i prefer hard coding it in.
But to help you out i would recomend:
[explain text="Detailed Description goes here"]Dowhacky[/explain]
Which gets converted to:
<a onmousedown="this.style.cursor='question'; ShowExplainBox(this);">DoWhacky</a>
And just throw in a call to ur plugin inside the header for the skin which includes the javascript that is called to display the explain box.
Or however you do it, if i was to do it, ill do something like that.
6 edb Dec 15, 2005 00:12
This is pretty cool! Kinda like an advanced version of the [url=http://forums.b2evolution.net/viewtopic.php?t=1655]auto-acronym[/url] plugin? I found limits with that plugin. First, it required hacking the plugin file each time you wanted to add a new acronym. Second, and most annoyingly to me, different browsers would trunctate longer acronyms so you had to have little 'sound bites' for your "explain box". Plus they were just mouseover tool tips...
I think I'll have a go with yabba's non-javascript version and see where I can go with it in pluginland for phoenix 8|
Non javascript method, crack open plugins/_bbcode.plugin.php find and add the red bits:-
var $search = array(
'#\(.+?)\#is', // Formatting tags
'#\[explain](.+?)\[meaning](.+?)\[/explain]#is', // Formatting tags
.....
.....
/**
* HTML replace array
*
* @access private
*/
var $replace = array(
'<strong>$1</strong>', // Formatting tags
'<span title="$2" class="explain">$1</span>',
To use in your post :-
[explain]What to explain[meaning]The explanation[/explain]
¥