![]() |
Random User Selection Hack
I know i have seen a hack that allows the system to randomly pick a users name that appears in a forum. I am starting a Random Giveaway every month on my sports card trading site and would like a hack that will randomly select a user from the user database....can anyone point me in the right direction?
Chris |
How exactly do you want this to work?
This will select a random username from all registered users with each and every page load. in global.php find (around line 548): Code:
// parse headinclude, header & footer Code:
$who=$DB_site->query_first("SELECT username, usergroupid, userid FROM " . TABLE_PREFIX . "user WHERE usergroupid='2' ORDER BY rand() LIMIT 1"); Then in any template add $rUsr where ever you want the username to appear. |
Is there a way to use this code so I can do this via the admin area? What I would love to be able to do is have a 'Random User Selection' option in the admincp area...then when I click on that it will choose the random user and just print it in that area...so I would need help on adding the link in the admin cp area and then also where I add a template for the admin area.
If you can help with this that would be great! |
|
Thank you - Thank you - Thank you!!!
I requested this hack because I run a sports card trading site. On this site we received product from sponsors that we give out to members. I was looking for something to pick a random user every month from the entire member base - not just a thread where a member posts. Thank you again for the hack! |
All times are GMT. The time now is 04:46 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|