Entris
Junior Member
Posts: 281
inherit
158702
0
Dec 31, 2014 9:05:29 GMT -8
Entris
281
September 2010
entris
|
Post by Entris on Aug 31, 2012 7:10:58 GMT -8
Hiya I am wondering if anyone would be able to help me with a Forum Post Abbrivation 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.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,290
January 2004
todge
|
Post by Todge on Aug 31, 2012 12:11:37 GMT -8
Try this in your 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>
|
|
Entris
Junior Member
Posts: 281
inherit
158702
0
Dec 31, 2014 9:05:29 GMT -8
Entris
281
September 2010
entris
|
Post by Entris on Sept 7, 2012 6:39:43 GMT -8
Thats freakin Awesome Todge, TYVM! Sorry for the late responce work to the most of my time after i made the request. Tried it out a bit and it works like a charm again TY so much for the help
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,290
January 2004
todge
|
Post by Todge on Sept 7, 2012 11:24:55 GMT -8
No worries..
|
|