Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Closed Thread
 
Thread Tools
Lottery Addon For The Store Hack Details »»
Lottery Addon For The Store Hack
Version: 1.00, by Lesane Lesane is offline
Developer Last Online: Oct 2004 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 06-18-2002 Last Update: Never Installs: 119
 
No support by the author.

Info:
This addon for the store hack gives you the ability to add a Lottery on your store. A lottery with the same principles as a normal lottery. Users buy a lottery ticket in the store and after the specified enddate you or any other admin execute the lottery script in the admincp wich search for a random user from the database and checks if the user bought a ticket and if so then he will receive the jackpot if not then the lottery stays online.

The jackpot will be increased with the amount of the lottery ticket everytime when a new member buy's a ticket.

What to do:
2 Query's: 1 new table, 1 new row.
3 File Edit's: Admin/Index.php, Store.php & Storeadmin.php
1 Template Edit: Store_bit
2 New Templates: store_lottery_error & store_lottery_updated

Some Features:
- A new action on the store: Lottery
- Winner will be picked randomly
- Winner will be pm'ed with a winner's message
- Losers will be pm'ed with a loser's message
- Define Start Date of the lottery
- Define End Date of the lottery
- Define title of the lottery
- Define the amount of a ticket
- Maximum of 1 Ticket Per User
- And more....

This lottery addon will only work with the latest version of the store hack and is compatible with any Vbulletin 2.*.* version.

Have fun with the addon,
Lesane.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 06-20-2002, 11:44 AM
Peace Peace is offline
 
Join Date: Apr 2002
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Peace
I'm getting errors and the "lottery Option" link/Page in the AdminCP can't be found. I followed the directions carefully. Help me solve these problems.


Parse error: parse error in /home/www/theonlinelounge/forums/store.php3 on line 2

Parse error: parse error in /home/www/theonlinelounge/forums/admin/storeadmin.php3 on line 3



When I click on "Lottery Options" in the AdminCP, I get this error

The page cannot be found


Hi, Lesane, can I get some help with these errors? Thanks.
  #23  
Old 06-20-2002, 11:55 AM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by LightBringer
Hey Lesane... Great hack.

For some feedback, I'd like to let you know that a small bug is found with the "starting Jackpot" count.

I started the count with 5000 and then bought one ticket.

Since I was the only user that bought it...I won.

Well..I was awarded the cost of the ticket...not the cost of the ticket + the starting Jackpot

My understanding was the inital jackpot count would be given...if this is incorrect..please let me know.

Thanks.
Ieek, didn't thought about the starting jackpot amount.

Here is the fix, open admin/storeadmin.php and find:

PHP Code:
$totalp $DB_site->query_first("SELECT COUNT(userid) AS usert FROM storelottery WHERE lotnumber=2");
$usertotaal number_format($totalp[usert]);
        
$kutje=$usertotaal*$costt
And Replace It With:

PHP Code:
$jack=$DB_site->query_first("SELECT * FROM storelottery WHERE lotnumber=1");
$kutje=$jack[jackpot]; 
Thanks for letting me know, Txt file in 1st post is updated.
  #24  
Old 06-20-2002, 12:00 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Lovaboye
never mind its cool, but if we wanted to change the ammount of tickets a person can buy what do we change?
It's made so that an user can buy 1 ticket per lottery. There is no purpose for buying more tickets since it takes a random user from the user table and the winner will only get rewarded once. The only difference is that when someone bought more tickets, for example 3, the he will be pm'ed 3 times.
  #25  
Old 06-20-2002, 12:03 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Itworx4me
This Query doesn't work:
INSERT INTO store VALUES (NULL, 'lottery', 'Buy A Ticket For The Lottery Entitled: ', '20', '0', 'lottery.gif', 'Buy a lottery ticket and hope that you will win the jackpot.', 'N','0');

Get this error when applying to database:
SQL-query :

INSERT INTO store VALUES (NULL, 'lottery', 'Buy A Ticket For The Lottery Entitled: ', '20', '0', 'lottery.gif', 'Buy a lottery ticket and hope that you will win the jackpot.', 'N','0')

MySQL said:


Column count doesn't match value count at row 1
I suggest you to upgrade to the latest store version

Meanwhile, use this query:

PHP Code:
INSERT INTO store VALUES (NULL'lottery''Buy A Ticket For The Lottery Entitled: ''20''0''lottery.gif''Buy a lottery ticket and hope that you will win the jackpot.''N'
  #26  
Old 06-20-2002, 12:09 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Peace
I'm getting errors and the "lottery Option" link/Page in the AdminCP can't be found. I followed the directions carefully. Help me solve these problems.

Parse error: parse error in /home/www/theonlinelounge/forums/store.php3 on line 2

Parse error: parse error in /home/www/theonlinelounge/forums/admin/storeadmin.php3 on line 3



When I click on "Lottery Options" in the AdminCP, I get this error

The page cannot be found

That's because you are using a .php3 version.

Open admin/index.php and find:

PHP Code:
makenavoption("Lottery Options","storeadmin.php?action=lottery"); 
And change it to:

PHP Code:
makenavoption("Lottery Options","storeadmin.php3?action=lottery"); 
  #27  
Old 06-20-2002, 12:13 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks everyone for the feedback. Thumbsup.
  #28  
Old 06-20-2002, 12:21 PM
Peace Peace is offline
 
Join Date: Apr 2002
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks

Lesane, I did that and I'm still getting these errors

Parse error: parse error in /home/www/theonlinelounge/forums/admin/storeadmin.php3 on line 3


Parse error: parse error in /home/www/theonlinelounge/forums/store.php3 on line 2



Can you identify line 3 in storeadmin and line 2 in store and give me examples of the correct code and I'll compare it to the codes in those files? Maybe I'm missing something.
  #29  
Old 06-20-2002, 02:14 PM
LightBringer's Avatar
LightBringer LightBringer is offline
 
Join Date: Oct 2001
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lesane, thanks for the starting jackpot fix! Works like a champ now.
  #30  
Old 06-20-2002, 03:11 PM
N9ne N9ne is offline
 
Join Date: Feb 2002
Posts: 1,495
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

YAY! IT'S FINALLY OUT! OMG **INSTALLS!**

hacker of the lifetime: Lesane!!
  #31  
Old 06-20-2002, 04:09 PM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could there be a area in someones profile that will say how many bought tickets and how many wins that user has. That would be pretty cool.
Closed Thread


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:11 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08433 seconds
  • Memory Usage 2,320KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete