Post by Amy on Feb 2, 2018 5:00:37 GMT -8
Hi!
I'll just copy and paste the request from this thread from 2012, as my question is the same and his/her English is better than mine:
I did try Todge 's solution of putting this code in Global Footer:
But it didn't work. The code "[abbr title=''][/abbr]" keeps unaltered after posting.
Would someone please help?
I'll just copy and paste the request from this thread from 2012, as my question is the same and his/her English is better than mine:
I am wondering if anyone would be able to help me with a Forum Post Abbrevation code?
I would like it to work the same way that this code works:
<abbr title=""></abbr> but for forum posts instead kinda like the code.
So when i make a new post on the board i would be able to type (as an example)
Welcome to [abbr="ProBoards"]PB[/abbr] hope you enjoy your stay.
And the post will end up looking like this:
Welcome to PB hope you enjoy your stay.
And when hovering the cursor over PB they will see a text saying "ProBoards".
I have no idea if this is possible but will cross my fingers and hope for the best.
I would like it to work the same way that this code works:
<abbr title=""></abbr> but for forum posts instead kinda like the code.
So when i make a new post on the board i would be able to type (as an example)
Welcome to [abbr="ProBoards"]PB[/abbr] hope you enjoy your stay.
And the post will end up looking like this:
Welcome to PB hope you enjoy your stay.
And when hovering the cursor over PB they will see a text saying "ProBoards".
I have no idea if this is possible but will cross my fingers and hope for the best.
I did try Todge 's solution of putting this code in Global Footer:
<script type="text/javascript">
<!--
/*
ABBR tags by Todge
Copyright © 2012
Please keep this header intact
Global or Board Footer
*/
var abbrButton = 'URL OF ABBR BUTTON';
// Add ABBR button to posting page..
function addabbr()
{
var bname = prompt("What would you like the abbreviation for?","");
add('[abbr title='+bname+']','[/abbr]');
return;
}
if(document.postForm)
{
var abbrb = document.createElement('a');
abbrb.innerHTML = '<img src="'+abbrButton+'" border="0">';
abbrb.href = 'javascript:addabbr()';
document.postForm.color.parentNode.appendChild(abbrb);
}
// Find and create abbr tags..
if(pb_action.match(/(display|preview|(modify)?post|search2)/) )
{
var posts = document.getElementsByTagName('font');
for(p=0; p<posts.length; p++)
{
if(posts[p].innerHTML.match(/\[abbr title=/) && (posts[p].innerHTML.match(/ google_ad_section_start/) || (document.postForm && posts[p].size=='1' && !posts[p].innerHTML.match(/<(input|select|textarea)/i))))
{
var abbrCell = '<abbr title="$1"><b>';
posts[p].innerHTML = posts[p].innerHTML.replace(/\[abbr title=(([^\[\]])+)*\]/g,abbrCell).replace(/\[\/abbr\]/g,'</b></abbr>');
}}}
// -->
</script>
But it didn't work. The code "[abbr title=''][/abbr]" keeps unaltered after posting.
Would someone please help?