Post by Wormopolis on Aug 8, 2010 22:47:05 GMT -8
browser tested: IE and FF
placement: top of global header
UBBC can be used in board titles, but you will notice at the top of the page under the logo you can see all the UBBC. this code will convert it to HTML or strip it off leaving just the board title.
code:
hope it works for you.
placement: top of global header
UBBC can be used in board titles, but you will notice at the top of the page under the logo you can see all the UBBC. this code will convert it to HTML or strip it off leaving just the board title.
code:
<script type="text/javascript">
<!--
// Correct page title of UBBC boards
// by Wormopolis - www.wormocodes.com
// Utilizing:
/* UBBC in Personal Text - Ross - Open Source */
convertToHTML=true; //set false to just remove UBBC
ptitle = document.getElementsByTagName('td')[1].lastChild;
function UBBCfixit(title) {
if (title.match(/\[(right|left|center)\](.+?)\[\/(right|left|center)\]/i)) {
al=RegExp.$1;
title= title.replace(/\[(right|left|center)\](.+?)\[\/(right|left|center)\]/i, '$2');
if (convertToHTML) title='<p align="'+al+'">'+title+'</p>';
}
title= title.replace(/\[(br|hr)\]/gi, (convertToHTML ? '<$1 />' : ''));
title= title.replace(/\[size=(.+?)\](.*)\[\/size\]/gi, (convertToHTML ? '<font size="$1">$2</font>' : '$2'));
title= title.replace(/\[color=(.+?)\](.*)\[\/color\]/gi, (convertToHTML ? '<font color="$1">$2</font>' : '$2'));
title= title.replace(/\[img\](https?:\/\/.+?\.(gif|jpe?g|png))\[\/img\]/gi, (convertToHTML ? '<img src="$1" />' : ''));
title= title.replace(/\[move\](.+?)\[\/move\]/gi, (convertToHTML ? '<marquee>$1</marquee>' : '$1'));
title= title.replace(/\[(\/)?(b|i|u|s|sup|sub|pre|tt|blockquote)\]/gi, (convertToHTML ? '<$1$2>' : ''));
if (title.match(/\[(br|hr|size=(.+?)|color=(.+?)|right|left|center|img|move|b|i|u|s|sup|sub|pre|tt)\]/gi)) return UBBCfixit(title); //just in case
else return title;
}
if (!location.href.match(/headersfooters/)) ptitle.innerHTML=UBBCfixit(ptitle.innerHTML);
//-->
</script>
hope it works for you.