PDA

View Full Version : Administrative and Maintenance Tools - Pick A Random User In A Specified Thread ID


Logikos
03 Oct 2004, 01:11
Random User In Specified Thread

====================
Author: Ken 'LiveWire' Iovino
Site: www.vbhacks.us (http://www.vbhacks.us/)
Version: 1.0.0
====================

Updates

Fixed SQL error when no thread id is entered. (10-02-2004)




What this does
This will allow you to generate a random username for any thread id you specify. This could be good for picking a random winner in a certain thread.

I got the idea from This thread here (http://www.vbulletin.org/forum/showthread.php?t=67657)

Anyway, it only took me a few mins to write up so i thought i would share it with everyone.

To do list...

Time to install: 2 minutes
Queries to run: 0
File Mods: 1


/admincp/index.php


Templates to edit: 0
Templates to add: 0
New Phrases: 1


Please read carefully and make all the necessary changes as stated. This is will work if installed properly.
PLEASE REMEMBER TO BACKUP BEFORE YOU BEGIN! If you like this hack

Click It
https://www.vbulletin.org/forum/ (http://www.vbulletin.org/forum/vborg_miscactions.php?do=installhack&threadid=70114)

Help & Support
Before asking for support Please make sure you have done all necessary changes! If you still need support please post a reply here.

Please post bugs and errors here. Hope you like, feedback welcomed.

https://www.vbulletin.org/forum/external/2004/12/1.gif (https://www.paypal.com/xclick/business=iovinojr%40msn.com&item_name=Initial+Z+Free+Scripts&no_note=1&tax=0&currency_code=USD)

wrongful
03 Oct 2004, 04:10
Works great, thanks I can make good use of this. :)

wrongful
03 Oct 2004, 04:14
The only small nitpick suggestion I have is to provide an error message if submit is pushed and no thread id is entered otherwise you get a database error.

Logikos
03 Oct 2004, 04:32
Ahhhh! thanks! will add that now. Thats only a simple if empty command. brb :)

Logikos
03 Oct 2004, 04:53
Okay i fixed that little problem, to update just reupload the new random.php file i added and it should work fine.

Dean C
03 Oct 2004, 12:54
Could be useful for competitions - thanks for sharing your work :)

Logikos
03 Oct 2004, 19:13
Could be useful for competitions - thanks for sharing your work :)
Thanks, and anyone who uses this hack, got many more to come.

biggazillakilla
04 Nov 2004, 04:19
Just in case anybody is as daft as I was and didn't know where to find this option in the admincp after making the changes: it's under the Users category.

I'm not terribly familiar with vB, but fortunately, looking at the code, I was able to find it pretty easily.

Now, onto seeing how it works... :)

Edit: Did what it said on the box, no problems. :)

Any chance of adding options? For me, for example, I had a rule about having to have a minimum of 50 posts. It'd be great to have some extra options like that. Oh, I also have a rule about posting more than once in the thread. Is there any way to eliminate doubleposters?

Anyway, thanks a million for your contribution!

zigx
10 Dec 2004, 20:50
This hack is EXACTLY what im looking for! thanks so much for putting it together man.

I have 2 questions:

1) How does it pick a member?
2) Does it consider how many posts the person has in the thread? ie if you have 5 posts in a thread and another guy has 1 do you have 5x better chance of being picked?

ChrisBaktis
10 Dec 2004, 22:51
I would love to use this - I have two Mods that run our contests - by the looks of this you would need access to the Admin Control Panel to do this - is there a way so I can add this to the Mod CP instead?

ChrisBaktis
15 Dec 2004, 20:43
Anyone?

Logikos
17 Dec 2004, 15:45
This hack is EXACTLY what im looking for! thanks so much for putting it together man.

I have 2 questions:

1) How does it pick a member?
2) Does it consider how many posts the person has in the thread? ie if you have 5 posts in a thread and another guy has 1 do you have 5x better chance of being picked?
Its random when it picks a member.

ChrisBaktis - if you have any PHP experiance then you should be able to, but i won't beable to do this yet as i no longer have my computer setup. It will be a couple of months before i can get back online.

zigx
22 Dec 2004, 20:25
Its random when it picks a member.

ChrisBaktis - if you have any PHP experiance then you should be able to, but i won't beable to do this yet as i no longer have my computer setup. It will be a couple of months before i can get back online.


2) Does it consider how many posts the person has in the thread? ie if you have 5 posts in a thread and another guy has 1 do you have 5x better chance of being picked?