The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Contest Hack -- Points hack addon Details »» | |||||||||||||||||||||||||
This is basically a hack addon to the points hack that allows users to use their points, similar to the lottery hack by Lesane for the store hack, to purchase tickets that can be used in random (or rigged.) drawings.
It has a decent admin cp interface, letting you edit/modify/delete contests, etc. and also has the option to pick a random winner. Here's install instructions... 1. Run these SQL statements: Code:
CREATE TABLE `contest_contests` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `name` TEXT NOT NULL, `price` TEXT NOT NULL, `open` TEXT NOT NULL, `winner` TEXT NOT NULL, INDEX (`id`) ); CREATE TABLE `contest_entries` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `userid` TEXT NOT NULL, `contestid` TEXT NOT NULL, INDEX (`id`) ); 3. Extract contest.php to your forum directory. 4. In admin/index.php: Find: Code:
makenavoption("New Posts","../mod/moderate.php?action=posts","<br>"); makenavoption("New Attachments","../mod/moderate.php?action=attachments"); makenavselect("Moderation","<hr>"); Code:
// ************************************************* makenavoption("Add","../mod/points.php?action=newcontest","|"); makenavoption("Modify","../mod/points.php?action=modifycontest", "|"); makenavoption("Draw","../mod/points.php?action=drawwinners", "|"); makenavoption("Past Winners","../mod/points.php?action=viewwinners"); makenavselect("Contests"); P.S.: This originally started as a hack I custom-wrote for a forum, but after some consideration, I decided to release it here to everybody. Links and Donations are greatly appreciated. P.P.S.: This is my first hack that's released here, so if you see problems, be sure to let me know. If you want each user to be able to only have one entry, view post number 19 Show Your Support
|
Comments |
#12
|
||||
|
||||
Quote:
|
#13
|
||||
|
||||
oh, whoop!
It's supposed to be contest.php?action=view :bunny: |
#14
|
|||
|
|||
Wow that doesn't work neither. What do we do now.
|
#15
|
|||
|
|||
Wait a sec. Where are the template edits? contest_main
Huh i see these in the php file but no where in the directions did it say to make templates. Something fishy is going on here. o_0 |
#16
|
||||
|
||||
Oh, whoops... yeah, you need to create a template, sorry, my bad. ^_^
Here, just put this in as your template content... Name the template contest_main :bunny: |
#17
|
|||
|
|||
This hack works great but just one thing that is wierd about it. Is there any way you can only get into a contest once. Because i can click enter contest for the same contest and still be paying not even noing that i enter the contest. So if there could be an error screen or something that says you already have entered this contest please make something like that. Thanks so much. This hack is amazng. I love it. But with out this it seems pretty funny. Thanks
|
#18
|
||||
|
||||
To prevent someone from submitting more than one ticket, you can modify the code a little to have a while() loop that checks if the results from a SQL select statement return any results.
If you make it select the username, and the number of results is greater than 0, just popup an error. |
#19
|
|||
|
|||
Thats the prob hehe. I don't no how to code hahaha. I am learning but please post the code that would help tremendously. Also where to put the code would help also hehe. Thanks.
|
#20
|
||||
|
||||
Okay...
In contest.php, find: PHP Code:
PHP Code:
|
#21
|
|||
|
|||
O it worked great. This is a great hack. Thanks so much. I think you should update the first post for everyone with this update this is a great update thanks so much you are the greatest.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|