|
Post by Smangii on May 15, 2006 18:13:58 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- <table id="PM_Table" width="100%" cellpadding="4" cellspacing="0"> <tr><td id="pm_info" align="center" class="windowbg">Welcome Guest! <a href="/index.cgi?action=login">Login</a> | <a href="/index.cgi?action=register">Register</a> </td></tr></table>
<script> /* Smangii's EZ PM Bar v2 - by Smangii http://smangii.proboards78.com */
var td = document.getElementsByTagName("td"); var pm_info = document.getElementById("pm_info"); if(td[2].innerHTML.match(/you have <.+?>(.+?) (message|messages)<.+?>, (\d+) (are|is) new./i)){ pm_info.innerHTML = 'Welcome back <b>'+pb_displayname+'</b>! You have <a href="/index.cgi?action=pm">'+RegExp.$3+' new message(s)</a>';}
document.getElementsByTagName("tr")[2].parentNode.insertBefore( document.getElementById("PM_Table"), document.getElementsByTagName("tr")[2].nextSibling); </script>
|
|
|
Post by .::Kiki::. on Apr 18, 2007 16:55:28 GMT -5
this is perfect! I was looking for a code like this. But one question: Is there any way to make it come under the menu buttons? If not, it's fine!
|
|
|
Post by Smangii on Apr 19, 2007 22:03:29 GMT -5
Yes, actually I just modified the post to a much nicer and better looking PM Bar =P Try that new code
|
|
|
Post by .::Kiki::. on Apr 20, 2007 20:17:16 GMT -5
|
|
|
Post by Smangii on Apr 20, 2007 21:15:20 GMT -5
Replace these codes in your global headers: <script type="text/javascript"> <!-- document.getElementsByTagName('td').item(2).style.display="none"; //--> </script> <script type="text/javascript"> <!-- document.getElementsByTagName('font').item(1).style.display="none"; //--> </script> With these: <script> <!-- document.getElementsByTagName('font')[1].innerHTML=''; document.getElementsByTagName('tr')[1].deleteCell(1); //--> </script>
|
|
|
Post by .::Kiki::. on Apr 21, 2007 6:11:21 GMT -5
I tried that, but it's still not working.............
|
|
|
Post by Smangii on Apr 21, 2007 22:26:19 GMT -5
...I just registered and logged it. It seems to be working for me =X What browser are you using?
|
|
|
Post by .::Kiki::. on Apr 22, 2007 7:38:58 GMT -5
I'm using IE 9.0
|
|
|
Post by Smangii on Apr 22, 2007 21:17:02 GMT -5
9.0? There isn't such a thing... 7.0, you mean?
|
|
|
Post by .::Kiki::. on Apr 29, 2007 14:47:21 GMT -5
Never mind! I got it working! My dad helped me figure out what was wrong! Something with cookies...... now I'm hungry......
|
|
|
Post by Habbo on Oct 15, 2007 10:43:49 GMT -5
You know that puts it under the menu buttons but is there a way to get rid of the one to the right of the banner?
|
|
|
Post by ambie on Mar 21, 2008 16:09:13 GMT -5
i can't get it to work.
|
|
|
Post by Andrew on Mar 21, 2008 18:58:00 GMT -5
This might not work with the PB update. You can get hold of Smangii at his Forum.
Just click the home button in his mini - profile.
|
|