Welcome Guest [Log In] [Register]
Support Staff Recommendation
All communities remaining on zIFBoards/InvisionFree should check their conversion opt-in selection in their Admin CP (menu item Tapatalk Conversion)
(Read More)
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:
Multiquote (on) Multiquote (off)
Add Reply
Members Online Today; Show members who were online within the past 24 hours in the board stats...
Topic Started: Sep 28 2010, 08:41 PM (27,523 Views)
Epsilekt
Member Avatar
Member
[ *  *  *  *  *  * ]
Code Name:
Members Online Today

What the code does and how to use it:
When viewing the board index, or wherever the board stats table appears, a new section called "Users Online Today" will be added. The modification can be customized to allow you to change at what part of the board stats the section is added, the marker image next to the list of users, the title of the section (for example by default it's labeled "Users Online Today"), and the time span to show users.

Preview: Dylanmodification

How to install the code:
Just add the following code to your "above the copyright" section in the "Board Wrappers".

Quote:
 
<script language="JavaScript" src="http://z4.ifrm.com/30060/199/0/p1027838/zmot.js"></script>


To customize the script, add the following code before the code above...

Quote:
 
<script language="JavaScript">
var overallzmotlimit = 86400000;
// The max number of miliseconds that a user can have been active to show up on the list. 86400000 means 24 hours.
// Use the following equation: 1000 * 60 * 60 * 24 * NUMBER_OF_DAYS


var shl = 3;
// Increasing this number by one will force the section to be displayed after the board statistics.
// Decreasing it by one will force the section to be displayed before the currently active users section.


var motcmarkimg = 'http://z4.ifrm.com/static/1/s_users.png';
// Change http://.../s_users.png to link of image you want in left column next to list of members...
// If you do not provide your own image, the image used in your forum's active users icon column will be used.
// If your forum does not show active users, the default ZetaBoard's theme's active users icon will be used.


var motcmarktext = 'Users Online Today';
// Change Users Online Today to whatever text you want to appear in the label...


var donotfixactiveuserslist = true;
// Add this to stop the script from reloading the page the user is on so that when users view the Active Users List people do not show up as "Viewing Members List".
// This is useful for people who have ad-removal and want to save their credits.


var sortusersalpha = true;
// Add this to sort the members shown online today alphabetically instead of sorting them by recent activity.
</script>
Edited by Epsilekt, Nov 5 2010, 11:21 AM.
Offline Profile Quote Post Goto Top
 
Pando
Member Avatar
Member
[ *  *  *  *  *  * ]
Awesome code :up:

Any way the image can be Active Users Icon of the theme, rather than 1 for every theme?





2 MOT codes in one day...
Offline Profile Quote Post Goto Top
 
Epsilekt
Member Avatar
Member
[ *  *  *  *  *  * ]
Yeah, good idea. I'll let members choose the image they want to use, but if they don't put one, the default will be the Active Users icon.
Edited by Epsilekt, Sep 28 2010, 08:48 PM.
Offline Profile Quote Post Goto Top
 
Pando
Member Avatar
Member
[ *  *  *  *  *  * ]
Can I add this to the end of every Theme Layout, changing the image for every theme?

Code: HTML
 
<script language="JavaScript">
var motcmarkimg = 'http://z4.ifrm.com/static/1/s_users.png';
// Change http://.../s_users.png to link of image you want in left column next to list of members...

var motcmarktext = 'Members Online Today';
// Change Users Online Today to whatever text you want to appear in the label...
</script>

<script language="JavaScript" src="http://z4.ifrm.com/30060/199/0/p1027838/zmot.js"></script>

Also, you should change the part of the code that says 'Users Online Today' to 'Members Online Today' since this doesn't use MySQL and thus can't save guests.
Offline Profile Quote Post Goto Top
 
Solide18-ZNR
Member
[ * ]
Does this code use extra add credits?
Offline Profile Quote Post Goto Top
 
Epsilekt
Member Avatar
Member
[ *  *  *  *  *  * ]
Solide18
Sep 29 2010, 07:25 AM
Does this code use extra add credits?
Oh, right, add credits. Um... I'm not sure. I think it would be smart if ZetaBoards only used credits when the page is actually loaded, and not just requested via AJAX. No iframes are used in this code, so the page is never actually displayed. You'll have to ask someone else.
Offline Profile Quote Post Goto Top
 
Matt
Member Avatar
Man On The Moon
[ *  *  *  * ]
Well done Epsilekt, this is fantastically done and a great alternative to the others out there right now.
Offline Profile Quote Post Goto Top
 
RedBldSandman
Member Avatar
Asante sana Squash banana
[ *  *  *  * ]
The code will use 1 ad-credit for every extra page loaded through ajax. With this code, the number of pages will depend on the number of people online in the last 24 hours (more members online, more pages loaded). I think it's about 50 members per page, so most forums will probably have either 1 or 2 extra pages loaded I'd guess, it depends on your activity :)
Offline Profile Quote Post Goto Top
 
Epsilekt
Member Avatar
Member
[ *  *  *  *  *  * ]
Not to mention the script reloads the page you're on through AJAX when it's done searching for members online. It does this so that when people view the active users list it won't show them as viewing the Members list. I'm going to update the code now to allow you to decide whether or not it will fix the active users list problem.
Offline Profile Quote Post Goto Top
 
RedBldSandman
Member Avatar
Asante sana Squash banana
[ *  *  *  * ]
Just wondering, but why did you give up on using cookies? I saw you messing around with them in some versions of your code before but they've disappeared from the final release XD
Offline Profile Quote Post Goto Top
 
Epsilekt
Member Avatar
Member
[ *  *  *  *  *  * ]
RedBldSandman
Sep 29 2010, 07:21 PM
Just wondering, but why did you give up on using cookies? I saw you messing around with them in some versions of your code before but they've disappeared from the final release XD
You have no idea how happy it makes me that you noticed that. :r

The cookies slowed down Internet Explorer in Windows Vista and Windows 7 so much that it's purpose was defeated.
Offline Profile Quote Post Goto Top
 
Mike
Member Avatar
Coda
[ *  *  * ]
Epsilekt
Sep 29 2010, 09:30 AM
I think it would be smart if ZetaBoards only used credits when the page is actually loaded, and not just requested via AJAX. No iframes are used in this code, so the page is never actually displayed. You'll have to ask someone else.
Regardless of whether or not it's displayed to the user, the contents of the page are being called from the server, which is all it needs to know to trigger an ad view.

I must say I am extremely impressed with your methods here. Completely integrated with the forum using it's own features to figure out last activity, no need for remote data storage. Of course, wouldn't expect anything less from you ;) Well done :)
Offline Profile Quote Post Goto Top
 
sokor
Member
[ * ]
this is awesome script... thank you sir... :wink:
Offline Profile Quote Post Goto Top
 
Nimor
Member Avatar
Fireman
[ *  *  *  * ]
Fantastic code. :wink:
Offline Profile Quote Post Goto Top
 
antsplan-ZNR
Member
[ * ]
I'm trialling this code on my board. Thanks for providing. Will let you know how i get on.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · ZetaBoards Codes & Modifications · Next Topic »
Add Reply