|
Post by Smangii on May 16, 2006 21:41:29 GMT -5
Woot. My first PM Bar ;D Tell me what you think. I looked at a lot of different simple PM bars, and how to insert stuff with Javascript so i just inserted the pm bar into the welcome table using the <div> tag Enjoy! Location: Global Header Editing: none needed Crossbrowser: Yes Preview: -click- <div id="MY_PM_BAR"> <!-- Smangii's EZ PM Bar Coded by Smangii for SIGFX http://smangii.proboards78.com Non-Repostable //-->
<table width="700" cellpadding="5" cellspacing="0"> <tr><td id="pm_apple" align="left" class="windowbg" height="20"> Welcome Guest! <a href="/index.cgi?action=login">Login</a> | <a href="/index.cgi?action=register">Register</a> </td></tr></table>
<script> // Do not Edit var tdid = document.getElementsByTagName("td"); var pm_apple= document.getElementById("pm_apple"); if(tdid[2].innerHTML.match(/you have <.+?>(.+?) (message|messages)<.+?>, (\d+) (are|is) new./i)){ var newinbox = RegExp.$3; var username = pb_displayname; pm_apple.innerHTML = 'Welcome back <b>'+username+'</b>! Your inbox has <a href="/index.cgi?action=pm">'+newinbox+' new message(s)</a>';} </script></div>
<script> // Do not Edit document.getElementsByTagName("font")[1].parentNode.insertBefore( document.getElementById("MY_PM_BAR"), document.getElementsByTagName("font")[1].nextSibling); </script>
|
|