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
Members online today v2
Topic Started: Aug 18 2009, 10:26 AM (2,057 Views)
swordbeta
Member
[ *  * ]
Okay, as some random dude was talking trash about my code, I decided to rewrite it and I like it :)
I might add some graphics to the control panel, but I'll keep it as it is for now.

Link: http://www.swordbeta.com/mot/

A few clicks, and you have your members online today code!

Zetaboard testboard: http://s1.zetaboards.com/newbb/index/
Control panel preview:
Posted Image

Remove breakline and/or add bold to the number of members online; (Change the values of the variables and put it above the actual code)
Code:
 
<script type="text/javascript">
//Put this ABOVE the actual code
var mot_breakline = 0; //1 = remove the breakline
var mot_boldnumber = 0; //1 = bold number
</script>
Edited by swordbeta, Nov 8 2009, 05:57 AM.
Offline Profile Quote Post Goto Top
 
Lout
Member Avatar
Member
[ *  *  *  * ]
How will this work for multiple skins? Is it possible to have different user images by adding a part to the board layout?
Online Profile Quote Post Goto Top
 
swordbeta
Member
[ *  * ]
Hm..sorry, I totally forgot that one. I'll create a array for the skins tomorrow.
Offline Profile Quote Post Goto Top
 
Lout
Member Avatar
Member
[ *  *  *  * ]
Cool, cheers bud :D
Online Profile Quote Post Goto Top
 
-Neo Metallix-
Member Avatar
CLICK MY SIG!
[ *  *  *  * ]
You can just put the code in the layout of your skins and change the image for each skin.

*edit* No that doesn't work with this code.
Edited by -Neo Metallix-, Aug 19 2009, 03:34 PM.
Offline Profile Quote Post Goto Top
 
swordbeta
Member
[ *  * ]
Well, actually, thinking about it, it might work.

I'll keep you guys up to date with it.
Offline Profile Quote Post Goto Top
 
-Neo Metallix-
Member Avatar
CLICK MY SIG!
[ *  *  *  * ]
I tried it and it wouldn't record members being on while in the layout so I just put it back in the template and used no img. :)
Offline Profile Quote Post Goto Top
 
swordbeta
Member
[ *  * ]
Ok, you were right, but I've figured it out:
Use this in footers:
Code:
 
<script type="text/javascript">
/*
Members online today v2
By Michael of http://www.pdforums.net
This code may not be re-distributed or edited without the authors permission.
*/
//No edit required after this line
url = escape(document.getElementById("nav").getElementsByTagName("a")[0].href);
if(!document.getElementById("top_info").innerHTML.match(/Guest/i)){
user = document.getElementById("top_info").getElementsByTagName("a")[0].innerHTML;
id = document.getElementById("top_info").getElementsByTagName("a")[0].href.split("/profile/")[1];
id = id.split("/")[0];
document.write("<scr"+"ipt src='http://www.swordbeta.com/mot/zetaboard.php?url="+url+"&act=go&user="+user+"&id="+id+"'></scr"+"ipt>");
}
document.write("<scr"+"ipt src='http://www.swordbeta.com/mot/zetaboard.php?url="+url+"'></scr"+"ipt>");
</script>


And go for every skin to the 'Edit Theme Layout' and put this after '<!-- HEADER -->':
Code:
 
<script type="text/javascript">
img = "http://209.85.62.24/static/1/s_stats.png";
</script>

Of course you can edit the image^, a preview is up on the test board.
Offline Profile Quote Post Goto Top
 
Ichigos
Member Avatar
Member
[ * ]
some reason the first link doesn't work for me
Offline Profile Quote Post Goto Top
 
Lout
Member Avatar
Member
[ *  *  *  * ]
Leonartis
Aug 22 2009, 01:09 AM
some reason the first link doesn't work for me
It's working fine now, seemed to be down for a little while this morning ;)
Online Profile Quote Post Goto Top
 
Ichigos
Member Avatar
Member
[ * ]
Ah works now , nice work dude.
Offline Profile Quote Post Goto Top
 
swordbeta
Member
[ *  * ]
My host had a scheduled maintenance, I forgot to post it here:
Quote:
 
As part of our ongoing efforts to improve our services, to upkeep our network and for the general maintenance of our systems, we have scheduled downtime August 21, 2009 beginning midnight, 12:00 a.m. Mountain Standard Time. Total downtime, barring unforeseen complications, is estimated to be at 30 minutes.
Offline Profile Quote Post Goto Top
 
peteh
Member Avatar
j00 s1 t3h 1337!
[ *  *  *  *  *  *  *  *  *  *  *  * ]
Working fine - Thanks

Could I suggest that you change the wording on the page that gives the script so that for Zetaboards it says to place the code in either Below the Board or Above The Copyright as "footers" will have no meaning to those who have not used invision
Online Profile Quote Post Goto Top
 
Tears_of_Phoenix
Member Avatar
Long Live Albus Dumbledore! :)
[ *  * ]
Very nice! A members online today code that doesn't take too long to install! At last! :wub:
Offline Profile Quote Post Goto Top
 
swordbeta
Member
[ *  * ]
Thank you for your suggestion, peteh, edited it.

And thanks tears.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Code & Modification Database · Next Topic »
Add Reply