Version: 1.00, by Admin (Coder)
Developer Last Online: Nov 2024
Version: 2.2.x
Rating:
Released: 02-03-2002
Last Update: Never
Installs: 103
No support by the author.
The idea is from SitePoint Forums.
I think a lot of people really want this hack, and I've even seen a released version of it here, but it used cronjobs and stuff like that I'm sure not all of use want to mess with.
So, here's my version of the hack, completely crobjob-less and 100% working.
The hack also includes an easy way for the admins to change the member of the day at any given time. (see note below)
You can see it in action in this board, on the main page in the stats box.
To install this hack download the attached file (memberofday.hack.php), upload to your /admin folder and use vbHacker.
A couple of notes:
The member of the day will reset every day at 12:00am server time.
It is possible for the admins to re-choose the member of the day at any given time, by adding "?resetmember=1" when visiting index.php. (only logged in admins can use this; for regular users it won't do anything)
The only check in the code is to prevent the same member of the day two days in a row. It is possible, however, that the same member will be chosen two days after he was already a member of the month.
I don't recommend using this hack on a small forum (with not-so-many members) because of the above.
That's it, have fun.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
I'm having the "member shows up repeatedly 2/3 times" problem and have applied mheinemann and boofo's update to this. But will this limit the number of times a member can be chosen ina specific set of time?
For instance, I do not want the same member of the day more than one time every XX days (thirty, preferably), but I do not want the member's activity level to be a qualifying factor. For ever member of the day who catches themself as the "motd", I will give them a free Sunday Brunch to our restaurant. This is why I don't want the same member showing up but once a month, basically.
I've read through the thread and haven't found a solution for this. Any takers?
Keep an eye on it a couple of days and let me know how it goes. I changed it on my site and will also keep an eye on it, although I don't have very many members. It should work fine, though.
It goes by the last site visit so activity should have nothing to do with it.
Originally posted by Boofo Keep an eye on it a couple of days and let me know how it goes. I changed it on my site and will also keep an eye on it, although I don't have very many members. It should work fine, though.
*hehe* Aye aye! I'll keep an eye on it. I don't have many members, either. In all usergroups, I have approximately 125 members and I've limited the "MOTD" to only two usergroups (approximately 106 so far) - so I'm quite small as well.
I mainly use my site for installing and playing with hacks. Kind of a learning center, I guess. I have about 25 users and most of them only show up once in a while.
Ummm, yeah. Boofo? The fix we tried comes up with a great big ol' db error when resetting. Try again? Or is it the "rand now" fix I tried? :S
Quote:
Database error in vBulletin 2.2.8:
Invalid SQL: -2592000
AND (usergroupid=8
OR usergroupid=2)
ORDER BY RAND(NOW())
LIMIT 1
mysql error: You have an error in your SQL syntax near '-2592000
AND (usergroupid=8
' at line 1
mysql error number: 1064
Date: Sunday 09th of March 2003 12:13:48 AM
Script: http://mysite/forum/
Referer: