Post by (/iPokemon/) on Jun 26, 2011 6:11:34 GMT
Recommended to be placed in the Main/Global Header
<script type="text/javascript"><!--
/*iPokemon PM Bar
Coded By iPokemon
Do not copy/repost this code anywhere
Free to use as long as you keep this header in place
Edit only if you know what you are doing
*/
var td = document.getElementsByTagName("td");
var inbox = "/index.cgi?action=pm";
var sendmessage = "/index.cgi?action=pmsend";
var outbox = "/index.cgi?action=pm&view=2";
var prefs = "/index.cgi?action=pmprefs";
var backup = "/index.cgi?action=pmbackup";
if(td[2].innerHTML.match(/, (\d+)\ (are|is) new./i))
{
newPMs = RegExp.$1;
}
var totalPMs = td[2].innerHTML.split(' message')[0].split("\, you have ")[1];
document.write('<table id="pm_bar" class="bordercolor" width="92%" align="center" cellpadding="4" cellspacing="1"><tr><td class="windowbg" width="100%" align="center">');
if(pb_username == "Guest"){
document.write('Welcome, '+pb_username+'! Please <a href="/index.cgi?action=register">register</a> or <a href="index.cgi?action=login">login</a>.</td></tr></table>');
} else {
document.write('Welcome, '+pb_displayname+'! You have '+newPMs+' new PMs, <a href="/index.cgi?action=pm">'+totalPMs+'</a> PMs total.<br /><hr /><a href="'+inbox+'">Inbox</a> | <a href="'+sendmessage+'">Send Message</a> | <a href="'+outbox+'">Outbox</a> | <a href="'+prefs+'">PM Preferences</a> | <a href="'+backup+'">Backup Your PMs</a><br /></td></tr></table>');
}
document.getElementsByTagName('td')[2].style.display="none";
document.getElementsByTagName('font')[1].style.display="none";
//--></script>
Edit only if you know how to!
<script type="text/javascript"><!--
/*iPokemon PM Bar
Coded By iPokemon
Do not copy/repost this code anywhere
Free to use as long as you keep this header in place
Edit only if you know what you are doing
*/
var td = document.getElementsByTagName("td");
var inbox = "/index.cgi?action=pm";
var sendmessage = "/index.cgi?action=pmsend";
var outbox = "/index.cgi?action=pm&view=2";
var prefs = "/index.cgi?action=pmprefs";
var backup = "/index.cgi?action=pmbackup";
if(td[2].innerHTML.match(/, (\d+)\ (are|is) new./i))
{
newPMs = RegExp.$1;
}
var totalPMs = td[2].innerHTML.split(' message')[0].split("\, you have ")[1];
document.write('<table id="pm_bar" class="bordercolor" width="92%" align="center" cellpadding="4" cellspacing="1"><tr><td class="windowbg" width="100%" align="center">');
if(pb_username == "Guest"){
document.write('Welcome, '+pb_username+'! Please <a href="/index.cgi?action=register">register</a> or <a href="index.cgi?action=login">login</a>.</td></tr></table>');
} else {
document.write('Welcome, '+pb_displayname+'! You have '+newPMs+' new PMs, <a href="/index.cgi?action=pm">'+totalPMs+'</a> PMs total.<br /><hr /><a href="'+inbox+'">Inbox</a> | <a href="'+sendmessage+'">Send Message</a> | <a href="'+outbox+'">Outbox</a> | <a href="'+prefs+'">PM Preferences</a> | <a href="'+backup+'">Backup Your PMs</a><br /></td></tr></table>');
}
document.getElementsByTagName('td')[2].style.display="none";
document.getElementsByTagName('font')[1].style.display="none";
//--></script>
Edit only if you know how to!