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.
problem on newer forums i think. when i enter the query into my database it doesnt save. like, usually if i enter a query twice it says that there is a duplicate column but not for the query here. when i have the hack installed i get an sql error because of this. it there an alternative query to run?
hey dude!
do u know if this hack may be modified for giving some credits for "the Lesane´s Store Hack". But if the guy dosnt log in i that day where he was selected for the member of the day he dost win ay money???
please help, i dunno much about programing
whenever I upload the file to the admin folder and run vbhacker.php it doesnt come up, I have refreshed it about 20 times, I have the newest version of vbhacker also.
I installed this but it only shows the same two people every other day. I used the text file provided by vbhacker to install it. Are there known issues with this?
I installed this but it only shows the same two people every other day. I used the text file provided by vbhacker to install it. Are there known issues with this?
ok, now I'm running into some problems, lol. I don't have the MySQL access to the directory, so it's a coding problem (vBHacker added the query correctly, I wish all hacks where like this) anyway, it tells me it can't find
Code:
$permissions=getpermissions();
if (!$permissions['canview']) {
show_nopermission();
}
yet its on line 10 of index.php on vb2.2.8. I chose not to modify templates, because they use a modded design, and layout wise it belongs in the header. Anyway, I've done everything I'm supposed to, but vBHacker still won't reconize the changes! I found the only instance of the code, and added the code after ('require global.php') and no, the varible part isn't there twice. I just either A) want to get this thing working, or B) get vBHacker to work right. I'll try deleting the .hack.php file to get vBhacker to work again, and add the template manually and see what happens. Since everything is // ed out, I don't think it'll effect index.php.
Originally posted by J-OST I installed this but it only shows the same two people every other day. I used the text file provided by vbhacker to install it. Are there known issues with this?
I've been having this problem recently, didn't use to do it though.
I think I found a fix if you're having this problem
find
PHP Code:
if ($daybits[0]!=$thisdate or ($resetmember==1 and $bbuserinfo['usergroupid']==6)) {
below that put
PHP Code:
$seed = rand();
then find
PHP Code:
$newmember=$DB_site->query_first("SELECT userid,username
FROM user
WHERE userid<>$daybits[1] AND (usergroupid=5
OR usergroupid=6
OR usergroupid=7
OR usergroupid=2)
ORDER BY RAND()
LIMIT 1");
replace with
PHP Code:
$newmember=$DB_site->query_first("SELECT userid,username
FROM user
WHERE userid<>$daybits[1] AND (usergroupid=5
OR usergroupid=6
OR usergroupid=7
OR usergroupid=2)
ORDER BY RAND($seed)
LIMIT 1");