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
  #242  
Old 10-10-2003, 04:23 AM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lesane, is it work for 2.3.0 ?
I tried to install this 3 times, but it doesnt work. the error is:
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in ***\www\vb2\store.php on line 110

I wanna slove this, cuz the lottery add-on is cool
  #243  
Old 10-30-2003, 10:22 PM
SavgeDusk's Avatar
SavgeDusk SavgeDusk is offline
 
Join Date: Jul 2002
Location: CA
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The lottery info in the store isn't showing up properly. It doesn't list how much is in the jackpot or the start/end dates. And when I bought a ticket, it wouldn't show up either. o.o;
  #244  
Old 11-02-2003, 05:08 PM
Darnell 0216's Avatar
Darnell 0216 Darnell 0216 is offline
 
Join Date: Feb 2003
Location: Newark, NJ
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by deathemperor1st
Lesane, is it work for 2.3.0 ?
I tried to install this 3 times, but it doesnt work. the error is:
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in ***\www\vb2\store.php on line 110

I wanna slove this, cuz the lottery add-on is cool
Have you gone over your edits with a fine tooth comb? And did you check line 110 to see if anything was wrong...
Quote:
Originally Posted by SavgeDusk
The lottery info in the store isn't showing up properly. It doesn't list how much is in the jackpot or the start/end dates. And when I bought a ticket, it wouldn't show up either. o.o;
If it doesn't appear properly, doublecheck your table edits. If you can't see the ticket purchase appearing then you more than likely have made a mistake in your edits. The only problem this hack really has from the getgo are jackpot errors and the solution is posted.
  #245  
Old 11-02-2003, 11:39 PM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes, i did look the 110 line, that is the line of lottery add-on. And sure i did follow the instructions of Lesance, but it shows that error
what do i have to deal with ? I cant find out myself what's wrong due to my bad knowledge of php. Hope u could
  #246  
Old 11-03-2003, 02:00 PM
Darnell 0216's Avatar
Darnell 0216 Darnell 0216 is offline
 
Join Date: Feb 2003
Location: Newark, NJ
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by deathemperor1st
yes, i did look the 110 line, that is the line of lottery add-on. And sure i did follow the instructions of Lesance, but it shows that error
what do i have to deal with ? I cant find out myself what's wrong due to my bad knowledge of php. Hope u could
PM Sent.
  #247  
Old 11-14-2003, 03:31 AM
Lostnode Lostnode is offline
 
Join Date: Nov 2003
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just installed the lottery hack...
Went to test it out and I got this MySQL error

MySQL is version 4.0.11a-gamma

Code:
Database error in vBulletin Control Panel 2.3.3:

Invalid SQL: UPDATE user SET storep=storep+ WHERE userid='1'
mysql error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE userid='1'' at line 1

mysql error number: 1064

Date: Friday 14th of November 2003 12:38:52 AM
Script: http://test.brothers-in-arms.com/for...A-r%20Lostnode
Referer: http://test.brothers-in-arms.com/for...min/index.php?
What is the syntax error... It doesnt seem to want to read the varialbale $kutje, it was 2000 for this, and the error would have read

Code:
UPDATE user SET storep=storep+2000 WHERE userid='1'
I think it has to do with that, but what?
  #248  
Old 11-20-2003, 05:23 AM
dstruct2k's Avatar
dstruct2k dstruct2k is offline
 
Join Date: Dec 2002
Location: Winnipeg
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone got a copy of the templates that WEREN'T fu**ed over by vbulletin.org? Attaching txt files makes vBorg parse them as PHP and replace stuff like {firstaltcolor} with vBorg's {firstaltcolor} replacement. Kinda pi**ing me off.
  #249  
Old 12-15-2003, 02:01 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how would i go about making sure this always selects a winner and that it's done via cron?
  #250  
Old 12-20-2003, 01:14 AM
xxxsaint's Avatar
xxxsaint xxxsaint is offline
 
Join Date: Jun 2002
Posts: 185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your instructions say

Quote:

Open file: root/store.php
**********************************

--------
Find:
--------

if($showimg=="Y") {

--------
Add BEFORE it:
--------

if ($aw[action]=='lottery') {
$lok=$DB_site->query_first("SELECT * FROM storelottery WHERE lotnumber='1'");
$lotname=$lok[lotname];
$startdate=vbdate($dateformat,$lok[startdate]);
$enddate=vbdate($dateformat,$lok[enddate]);
$lottery="<br><b>Start Date:</b> $startdate <br><b>End Date:</b> $enddate<br><b>Money in jackpot:</b> $lok[jackpot]";
} else {
$lotname="";
$lottery="";
}

but in the new store.php , it doesn't find if($showimg=="Y") {



so where does that go ?
  #251  
Old 12-21-2003, 04:12 AM
SavgeDusk's Avatar
SavgeDusk SavgeDusk is offline
 
Join Date: Jul 2002
Location: CA
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It would go before this line:
if($store_img=="1") {
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 11:03 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06878 seconds
  • Memory Usage 2,312KB
  • 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
  • (2)bbcode_code
  • (4)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