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; Easy, simple, and reliable!
Topic Started: Feb 20 2008, 12:41 AM (6,587 Views)
Mwr247
Member Avatar
Cæsaris Salutis!
 *   *   *   *  
Name:
Members Online Today

Description:
One of the most requested codes for InvisionFree is finally here, in an easy, simple, and reliable form! What it does is logs who has been on your board during that day, and lists it on the index in a box below your board stats. Clicking a name will also redirect you to their profile.

The only downside to this code is it requires you to sacrifice your calendar to store the user data. If you don't use your calendar anyways, you've got nothing to lose :)

As a final note, this code is still pretty new, and due to it's nature, I can only completely test it's functionability a few times every day. Thus, there could potentially be a few lingering bugs. I'm sure I've worked most of them out, but if you find any, please don't hesitate to inform me and I'll fix it when I can.

Copyright:
Mwr247

Browser compatibility:
Internet Explorer, FireFox, Mozilla, Opera, Safari, and Netscape.

Preview/Screen shot:
RandomScriptPreviews
You'll have to create an account to see it add names and such.

Installation:
First, go to your admin control panel and find the page for "Date & Time Formats". The top option should be "Native Server Time Zone". Look at the drop down box to the right and find out what timezone number your board is set to. For example, if it says "GMT", your timezone is "0". If it says "GMT - 1", your timezone is "-1". If it says "GMT + 1", your timezone is "1", and so on. You'll need this number to set the code up properly. By default, the example is set to "-5", which is U.S. Eastern Standard Time.

Now, add the following to your board wrapper footers:
Quote:
 
<script>
// Members Online Today (By Mwr247)
// Copyright MUST stay intact please!
// http://bigboardsresources.com/

// Set Default Time Zone
var timezone = -5

</script><script name="M.O.T." src="http://209.85.62.26/12221/196/pip/mot.gif"></script>
Remember to change the number in red to the timezone your board is set to.

Now, go to the "Calendar/Birthday" in the Admin CP. Change "Show birthdays on the main calendar view?" to no, "Show forthcoming events?" to yes, and "Show forthcoming events from today to [x] days ahead" to 2 days.

Finally, edit all your member groups and make sure they can create calendar events. Otherwise it won't allow them to log anything.

And that's it, your code is now configured. Yes, it is a bit complicated with the whole timezone thing, but if you need help you can always ask here.
Offline Profile Quote Post Goto Top
 
I Am Java
Member Avatar
King of Coffee!
 *   *   *   *  
Um, I hate to say it, but that's a .GIF file. It REALLY needs to be a .JS or something... It is not working..

Edit: I have gotten most of it to work by following the .GIF file and manually putting it in as a Javascript/Text code, but it still does not work. (It is not recording the users being logged in and such.)
Offline Profile Quote Post Goto Top
 
Mwr247
Member Avatar
Cæsaris Salutis!
 *   *   *   *  
I was just doing a few tweaks to allow for better compatibility. The code was down fow the past 15 minutes or so, but I have it up and running again.

P.S.
The gif file should not affect it. I have it done that way just as a light protection from ripping. It still loads as a script however.
Offline Profile Quote Post Goto Top
 
I Am Java
Member Avatar
King of Coffee!
 *   *   *   *  
Finally. Lol.

Very, very nice code!

You have to send me your other ones though :P
Offline Profile Quote Post Goto Top
 
Mwr247
Member Avatar
Cæsaris Salutis!
 *   *   *   *  
Glad to hear it :D

Here's the code your talking about, one of my other recent creations: http://support.invisionfree.com/index.php?showtopic=450053

P.S.
OOPS! Forgot one last thing! In order for the code to work, all groups must be allowed to add events to the calendar. Otherwise it can't record it. Added it to the instructions now!
Offline Profile Quote Post Goto Top
 
I Am Java
Member Avatar
King of Coffee!
 *   *   *   *  
How do you get it so that their user group color and such is the same as found on the board? (Like if their user group color is blue, then it shows them as blue in the Use Online Today.)
Offline Profile Quote Post Goto Top
 
.DeLeTeD.
Member
 *  
good code, 2 things:

1) I have ipb shoutbox 2.5 and with this code it doesnt show up once you first login, you must refresh the page. Any easy way to fix it?

2) Can you remake this for zetaboards :)
Offline Profile Quote Post Goto Top
 
mixapella
Member
 *   *  
Sup Mwr247...
I have a problem with the page loading.
when i put that code in and chane the other bits, the page loads (says Done) then it'll start loading again. Then (says Done) and on and on.

I think it may have somthing to do with the .gif file,
becuse when i try to open it it says:

The image “http://209.85.62.26/12221/196/pip/mot.gif” cannot be displayed, because it contains errors.

Also theres no names showing up in the box Members Online Today.
Offline Profile Quote Post Goto Top
 
I Am Java
Member Avatar
King of Coffee!
 *   *   *   *  
Well, two things I found from this code:

1. the .GIF works whether it gives you that error or not.

2. Your members have to actually login for it to count them.

What it sounds like is you have an autorefresh code on there somewhere.
Offline Profile Quote Post Goto Top
 
Pats_rule
Member Avatar
Lets Go Pats!
 *   *   *  
I recommend you show the actual number, because for bigger boards, it will be tiredsome counting each member.
Offline Profile Quote Post Goto Top
 
Mwr247
Member Avatar
Cæsaris Salutis!
 *   *   *   *  
Perhaps I was a tad bit hasty in releasing this all out lol. The code seems to have a few "spontaneous, random, and irrational bugs" to be sorted out with. It all seems to be circumstantial though, since it works almost perfectly on my main test board, but 2 board I know of don't seem to like it =\

I Am Java:
The colors are from another code of mine. If you want them I can show you.

.DeLeTeD.:
I fixed the original problems between this code and my shoutbox, and I've since tested it on 3 boards with the shoutbox and it works perfectly, so that shouldn't be the problem. As for your other question, I've already begun :)

mixapella:
Interesting, seems that its redirecting you to that window or something. It doesn't have anything to do with the gif file however. The purpose of the gif file is it allows the code to load, but when someone tries to view it in a browser it will display that error. It's a low level anti ripping thing, but it works exactly like any other script code would.

I Am Java:
Yes, the whole alternate filename thing was something I experimented with a long time ago. I could have saved it as a .exe if I wanted and it would have still worked, but many people don't like those, so I thought a gif would work fine (plus, doesn't give you that annoying download prompt). As for your second question, sorta yes. It was designed and typically works where once the person views the index, it will check the calendar, then write their name to the calendar. They don't have to logout and login to be counted by it's intentional design. As for the auto refresh, that's the iframe doing it's thing. It has to go through several pages in just a few seconds.

Pats_rule:
Lemme get this code working right before I move on to more features lol. No a bad idea though :)

Offline Profile Quote Post Goto Top
 
.DeLeTeD.
Member
 *  
ok maybe its just me, but Ive warned my members, and thanks for part 2, cant wait
Offline Profile Quote Post Goto Top
 
DCRJ
Member
 *   *  
The code works on my board but some members aren't listed while some does...what could be the reason for that ?

Thanks, hoping for future updates on this code, very useful
Offline Profile Quote Post Goto Top
 
Tamapal3000
Member
 *   *  
I have to say that this would be the best "User Online Today" code ever. I have successfully applied it onto my forum and so far, it is working pretty well. We will have to see if it will have problems in the future. Nice work, Mwr247! It actually works!
Offline Profile Quote Post Goto Top
 
Mwr247
Member Avatar
Cæsaris Salutis!
 *   *   *   *  
.DeLeTeD.:
After a little more testing, I discovered that there is a circumstantial problem this code has with the shoutbox. It only occurs if the code is above the shoutbox code, which is why I never saw it. Simply change the code's placement in your footers to below the shoutbox, and you're all set :)

DCRJ:
The code was designed to only check for online users from the index, so it doesn't have to load an iframe every time, and keeps the code minimally intrusive. Thus, if I go to a page on that given day without going through the index, I won't be logged.

Tamapal3000:
Glad to hear it :D
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