|
Post by CrAzY_J on Mar 3, 2005 15:37:38 GMT -8
Cross Browser
ads a button in the menu bar. there are 2 version, a text version and a image version
if you want the Button to be on the right side of the menu bar, change
var Icell=iTD[5].parentNode.insertCell(0)
into
var Icell=iTD[5].parentNode.insertCell(1)
Text Version Footers
<script> /* Stupid PM Button (text version) created by CrAzY_J use freely, redistribute with permission */
/*Button Cell Width*/ var Iwidth='100';
var iTD=document.body.getElementsByTagName('td'); iTD[5].align='right'; iTD[5].className='catbg'; var Icell=iTD[5].parentNode.insertCell(0) Icell.width=Iwidth Icell.className='catbg'; Icell.align='center'; if(iTD[2].innerHTML.match(/(\d+) (is|are) new/i)){ Icell.innerHTML="<font size='1' class='cattext'><a href='/index.cgi?action=im'>"+RegExp.$1+"</a> new messages</font>"; }else{ Icell.innerHTML="<font size='1' class='cattext'><a href='/index.cgi?action=login'>login</a>|<a href='/index.cgi?action=register'>register</a></font>"; }
</script>
Image Version Footers
<script> /* Stupid PM Button (image version) created by CrAzY_J use freely, redistribute with permission */
/*Button Cell Width*/ var Iwidth='100'; /*Url Image New PMs*/ var One="<img src='URL IMG NEW' border='0' alt='"+PMs+" new PMs'>" /*Url Image No New Pms*/ var No="<img src='URL IMG NO NEW' border='0' alt='No new PMs'>" /*URL Image Guest*/ var Geus="<img src='URL IMG GUEST' border='0' alt='Welcome guest'>";
var iTD=document.body.getElementsByTagName('td'); iTD[5].align='right';iTD[5].className='catbg'; var Icell=iTD[5].parentNode.insertCell(0) Icell.width=Iwidth;Icell.className='catbg';Icell.align='center'; if(iTD[2].innerHTML.match(/(\d+) (is|are) new/i)){ var PMs=RegExp.$1; if(PMs==0){ Icell.innerHTML=No; }else if(PMs>0){ Icell.innerHTML=One } }else{ Icell.innerHTML="<a href='/index.cgi?action=login'>"+Geus+"</a>"; } </script>
all you need to do is put the URL to the images where it tells you to
|
|
|
Post by SonicX on Mar 5, 2005 10:46:39 GMT -8
Its a great code but, how do you change the New messages to the right?
|
|
|
Post by SonicX on Mar 5, 2005 10:47:35 GMT -8
Never mind I got it.
|
|
|
Post by Kenshin on Mar 5, 2005 11:41:55 GMT -8
Don't double post just edit your first post ^_~
|
|
|
Post by ShadowyOne on Mar 5, 2005 12:26:15 GMT -8
I love how you insult all your codes with titles like that, Crazy. >_>
Good job, though.
|
|
|
Post by CrAzY_J on Mar 8, 2005 4:22:57 GMT -8
I love how you insult all your codes with titles like that, Crazy. >_> Good job, though. aaaw Thank You
|
|