Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
[CODE] Online/Offline Legend
Topic Started: May 15 2004, 07:03 PM (92,437 Views)
orthodox
Member
 *  
As notice said it messed with my board post count....for example board shows 7 replys in fact there is 17 and last 2 post are not visible as board wont make second page if u set board on 15 posts per page.Great code but is there fix for this problem?
Offline Profile Quote Post Goto Top
 
Slaygore
Member
 *  
Thanks for the code it works fine, but I was wondering instead of using photobucket can I use imageshack instead to show the online/offline buttons?


http://img71.imageshack.us/img71/9493/online1ur.gif

http://img229.imageshack.us/img229/4121/offline3fb.gif
Offline Profile Quote Post Goto Top
 
shafin
Member
 *   *  
It's not working for me.
Offline Profile Quote Post Goto Top
 
lfe
Gozu
 *   *   *  
can some edit this code so its not under warn level :

Code:
 
<script>//Online/Offline Legend v2 - By Markup
home=location.href.lastIndexOf("/")>26?location.href.substr(0,location.href.lastIndexOf("/")):location.href
names=[]
if(top.location==location)
document.write("<IFRAME id=index name=index src="+home+" width=0 height=0 border=0 frameBorder=0></IFRAME>")
else
{
div=document.body.getElementsByTagName("DIV")
for(i=0;i<div.length;i++)
if(div[i].className=="thin")
break
a=div[i].getElementsByTagName("A")
for(i=0;i<a.length;i++)
names[i]=a[i].innerHTML.replace(/<[^>]+>/g,"")
parent.updateStatus()
}
function updateStatus()
{
td=document.body.getElementsByTagName("TD")
for(i=0;i<td.length;i++)
if((td[i].className=="post1"||td[i].className=="post2")&&td[i].innerHTML.match("Posts: ")&&td[i].width!="100%")
{
found=false
sPost=td[i].getElementsByTagName("SPAN")[0]
names=parent.frames['index'].names
for(a=0;a<names.length;a++)
if(td[i-2].innerHTML.replace(/<[^>]+>/g,"")==names[a])
{
sPost.innerHTML+="<P align=left><span style='color:green; font-weight:bold'>Status: Online"+"</P>"
found=true
}
if(!found)
sPost.innerHTML+="<P align=left><span style='color:red; font-weight:bold'>Status: Offline"+"</P>"
}
}
</script>
Offline Profile Quote Post Goto Top
 
scrapy
Member
 *  
iframe id='lookup' src='http://s8.invisionfree.com/openhouse/index.php' width='0' height='0' frameBorder='0'></iframe>
<script>//Online/Offline Legend - By Markup
names=[]
if(top.location!=location.href)
{
div=document.body.getElementsByTagName("DIV")
for(i=0;i<div.length;i++)if(div.className=="thin")break
a=div.getElementsByTagName("A")
for(i=0;i<a.length;i++)names=a.innerHTML
parent.updateStatus()
}
function updateStatus()
{
td=document.body.getElementsByTagName("TD")
for(i=0;i<td.length;i++)if(td.firstChild.className=="postdetails"&&td.innerHTML.match("Posts: "))
{
found=false
sPost=td.firstChild
names=parent.frames['lookup'].names
for(a=0;a<names.length;a++)
{
if(td[i-2].innerHTML.match(names[a]))
{
sPost.innerHTML+="<http://www.xonder.com/public_html/YaBBImages/msn/msn_online.gif'>"
found=true
}
}
if(!found)sPost.innerHTML+="<http://www.jorisstudeert.nl/images/MSN/offline.jpg'>"
}
}
</script>

have i done it wright couse its not working
Offline Profile Quote Post Goto Top
 
chigsam
Member
 *  
doesnt work for me
Offline Profile Quote Post Goto Top
 
terrified
Member
 *  
it works for one of my forum, but not the other one. does anyone have an idea why?
Offline Profile Quote Post Goto Top
 
MTGap
Member Avatar
Member
 *  
Ok I have a question. Could someone post a Offline/Online code that they know for sure works? Because I can get mine to work, but it only comes up as an error with an X
Offline Profile Quote Post Goto Top
 
kevin123456
Member
 *  
this code dont work at all.it has an X and when i changed the image link to the one i made,it was blank
Offline Profile Quote Post Goto Top
 
Darth Maul
Member Avatar
Sithlord
 *   *  
Works fine for me ^_^
Offline Profile Quote Post Goto Top
 
kevin123456
Member
 *  
can you give me the one on your code please
Offline Profile Quote Post Goto Top
 
sexyman1800
Member
 *  
umm mine just shows a broken image symbol... ftw
Offline Profile Quote Post Goto Top
 
Zyonic
Member
 *  
This is the code im using and it works fine

Code:
 
<!--ONLINE/OFFLINE START-->

<script>//Online/Offline Legend v2 - By Markup
home=location.href.lastIndexOf("/")>26?location.href.substr(0,location.href.lastIndexOf("/")):location.href
names=[]
if(top.location==location)
document.write("<IFRAME id=index name=index src="+home+" width=0 height=0 border=0 frameBorder=0></IFRAME>")
else
{
div=document.body.getElementsByTagName("DIV")
for(i=0;i<div.length;i++)
if(div[i].className=="thin")
break
a=div[i].getElementsByTagName("A")
for(i=0;i<a.length;i++)
names[i]=a[i].innerHTML.replace(/<[^>]+>/g,"")
parent.updateStatus()
}
function updateStatus()
{
td=document.body.getElementsByTagName("TD")
for(i=0;i<td.length;i++)
if((td[i].className=="post1"||td[i].className=="post2")&&td[i].innerHTML.match("Posts: ")&&td[i].width!="100%")
{
found=false
sPost=td[i].getElementsByTagName("SPAN")[0]
names=parent.frames['index'].names
for(a=0;a<names.length;a++)
if(td[i-2].innerHTML.replace(/<[^>]+>/g,"")==names[a])
{
sPost.innerHTML+="<P align=left><span style='color:green; font-weight:bold'><strong><center>Online</center></strong>"+"</P>"
found=true
}
if(!found)
sPost.innerHTML+="<P align=left><span style='color:red; font-weight:bold'><strong><center>Offline</center></strong>"+"</P>"
}
}
</script>

<!--ONLINE/OFFLINE END-->
Offline Profile Quote Post Goto Top
 
BleachFan
Member
 *  
For some reason that code only works for members. In my forum, I have many different member types, Admin/Mod/Elite/Banned etc.

Can someone edit or give me a code that works no matter what type of member you are?
Offline Profile Quote Post Goto Top
 
BleachFan
Member
 *  
Hello? Someone please help me out here...
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Code Snippets · Next Topic »
Add Reply