Post by Todge on May 17, 2008 11:08:16 GMT -8
This will add [hover][/hover] tags to your posts..
When using these, a message will be displayed when you hover the mouse over the word/image/link.
It goes in your Global Footer..
Edit this part of the code with the URL of the button you wish to use for the [hover][/hover] tags..
var hoverButton = 'URL OF HOVER BUTTON';
When using these, a message will be displayed when you hover the mouse over the word/image/link.
It goes in your Global Footer..
<script type="text/javascript">
<!--
/*
Mouseover text
by Todge
Copyright © 2008
Please keep this header intact
*/
// Edit below...
var hoverButton = 'URL OF HOVER BUTTON';
// edit above...
// Add button in posting area...
if(document.postForm)
{
var hText;
var hButton = document.createElement('IMG');
var hLink = document.createElement('A');
hButton.src = hoverButton;
hButton.border = '0';
hButton.style.cursor = 'pointer';
hButton.onclick = function(){
var hText = prompt("Please enter 'Hover Text'");
add('[hover='+hText+']','[/hover]');
}
hLink.appendChild(hButton);
document.postForm.color.parentNode.appendChild(hLink);
}
// Find hover UBBC tags and convert...
if(location.href.match(/action=display/))
{
var post = document.getElementsByTagName('font');
for(p=0; p<post.length; p++)
{
if(post[p].innerHTML.match(/google_ad_section_start/) && post[p].innerHTML.match(/\[hover/))
{
var pPics = post[p].getElementsByTagName('img');
for(pp=0; pp<pPics.length; pp++)
{
pPics[pp].removeAttribute('alt');
}
var thisPost = post[p].innerHTML;
thisPost = thisPost.replace(/\[\/hover\]/g,'</font>');
thisPost = thisPost.split('[hover=');
for(t=1; t<thisPost.length; t++)
{
thisPost[t] = thisPost[t].replace(']','">');
}
thisPost = thisPost.join('<font title="');
post[p].innerHTML = thisPost;
}}}
// -->
</script>
Edit this part of the code with the URL of the button you wish to use for the [hover][/hover] tags..
var hoverButton = 'URL OF HOVER BUTTON';