Post by SubDevo on May 16, 2010 15:47:58 GMT -8
Member Information Anywhere by SubDevo
Tested in IE, FF, Opera, Safari and Chrome.
This code allows you to place various information (of the user viewing your forum) anywhere you want!
<span id="my_name"></span>
The current member's display name.
<span id="my_time"></span>
The current date and time.
<span id="my_PMs"></span>
The members PM's or "Login/Register" links if a guest.
This code is great for you sidebar users!
Use this code with my Avatar Anywhere code to create a member cell in your side tables!
Like this:
Enjoy!!!
SubDevo
No code editing required.
Location: Global Footer
<script type="text/javascript">
/* Member Information Anywhere by SubDevo */
/* Global Footer - Please leave this header intact. Do not repost. */
/* interoceandesigns.com or lsdp.proboards.com */
function gID(a,b){var n=document.getElementById(a); if(n){n.innerHTML=b;}}
var n=document.getElementsByTagName("font"),m="<a href='index.cgi?action=",a,x=0;
while(!(n[x].parentNode.nodeName=="P"&&/Hey,\s|Welcome\s/.test(n[x].innerHTML))&&x<n.length){x++;}
if(pb_username!="Guest"){ var pmMsg; a=n[x].getElementsByTagName("a")[0];
pmMsg="("+m+"pm'>"+a.innerHTML.split(" ")[0]+" total | "+a.nextSibling.data.split(" ")[1]+" new</a>)";
}else{pmMsg="("+m+"login'>Login</a>"+" | "+m+"register'>Register</a>)";}
gID("my_time",n[x].lastChild.data); gID("my_name",pb_displayname); gID("my_PMs",pmMsg);
</script>
EDIT (4/14/2011):
Code updated to support more than 1000 pms.
Previously, if a user had 1,000 PMs (or more), it would only say you had 1 PM.
Tested in IE, FF, Opera, Safari and Chrome.
This code allows you to place various information (of the user viewing your forum) anywhere you want!
- The users display name. (or Guest)
- The current Date and Time.
- Personal Messages in this format: (2 total | 1 new) <--- Links to PM Inbox!
Guest sees: (Login | Register) <---- These are links too!
<span id="my_name"></span>
The current member's display name.
<span id="my_time"></span>
The current date and time.
<span id="my_PMs"></span>
The members PM's or "Login/Register" links if a guest.
This code is great for you sidebar users!
Use this code with my Avatar Anywhere code to create a member cell in your side tables!
Like this:
Enjoy!!!
SubDevo
No code editing required.
Location: Global Footer
<script type="text/javascript">
/* Member Information Anywhere by SubDevo */
/* Global Footer - Please leave this header intact. Do not repost. */
/* interoceandesigns.com or lsdp.proboards.com */
function gID(a,b){var n=document.getElementById(a); if(n){n.innerHTML=b;}}
var n=document.getElementsByTagName("font"),m="<a href='index.cgi?action=",a,x=0;
while(!(n[x].parentNode.nodeName=="P"&&/Hey,\s|Welcome\s/.test(n[x].innerHTML))&&x<n.length){x++;}
if(pb_username!="Guest"){ var pmMsg; a=n[x].getElementsByTagName("a")[0];
pmMsg="("+m+"pm'>"+a.innerHTML.split(" ")[0]+" total | "+a.nextSibling.data.split(" ")[1]+" new</a>)";
}else{pmMsg="("+m+"login'>Login</a>"+" | "+m+"register'>Register</a>)";}
gID("my_time",n[x].lastChild.data); gID("my_name",pb_displayname); gID("my_PMs",pmMsg);
</script>
EDIT (4/14/2011):
Code updated to support more than 1000 pms.
Previously, if a user had 1,000 PMs (or more), it would only say you had 1 PM.