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
  #112  
Old 08-09-2002, 08:37 PM
Mr_P Mr_P is offline
 
Join Date: Jan 2002
Location: Uk.
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hope im allowed to post this here

This is from my Index.php

and i have the top 5 stats installed and this is just before the stats start.

// Top 5 Statistics BY NanoEntity
// Top 5 Posters


If you do a search in your index you can find the lines before the bit that displays the lotto amount as i have given you the few lines before it.


Quote:
$lok=$DB_site->query_first("SELECT * FROM storelottery WHERE lotnumber='1'");
if ($aw[action]=='lottery') {
//if(!$bbuserinfo[usergroupid]==6) {
$lotname="";
$lottery="";
} else {
$lotname="Welcome To The $lok[lotname]";
$startdate=vbdate($dateformat,$lok[startdate]);
$enddate=vbdate($dateformat,$lok[enddate]);



$lottery="Money in jackpot: <b>$lok[jackpot]</b>";
$jackpot="Current Lottery Fund is now: <b>$lok[jackpot]</b>";
}
  #113  
Old 08-10-2002, 03:35 AM
BluSmurf BluSmurf is offline
 
Join Date: Nov 2001
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks, it worked
  #114  
Old 08-10-2002, 03:49 AM
BluSmurf BluSmurf is offline
 
Join Date: Nov 2001
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A question, I've already bought a lottery and I tried to click on the link under the Store Statistics
Most Sold Action: Buy A Ticket For The Lottery Entitled7)

But I was brougth to a blank page, is that an error?
  #115  
Old 08-10-2002, 05:58 AM
xxxsaint's Avatar
xxxsaint xxxsaint is offline
 
Join Date: Jun 2002
Posts: 185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

when I click on BUY A TICKET all I get is a blank white page. ANYBODY with any help here ??
  #116  
Old 08-10-2002, 05:45 PM
BluSmurf BluSmurf is offline
 
Join Date: Nov 2001
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

mine too.. it was working perfectly a few days earlier, not sure why it stopped working now
  #117  
Old 08-12-2002, 12:53 AM
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Location: PA
Posts: 1,014
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by tpearl5
When I try to end a lottery I get this error in the admin cp:
Quote:
Invalid SQL: SELECT * FROM user ORDER BY RAND() desc LIMIT 1
mysql error: You have an error in your SQL syntax near 'RAND() desc LIMIT 1' at line 1

mysql error number: 1064
I just tried rehacking the store files with no avail. What's wrong? :ermm:
Anyone else getting this?
  #118  
Old 08-12-2002, 07:54 PM
xxxsaint's Avatar
xxxsaint xxxsaint is offline
 
Join Date: Jun 2002
Posts: 185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well , I have just sat here another 2 hours and tried everything i even read every post in this thread again and remade my templates , redid the mysql queries and everything still functions perfectly , right down to the pick winner in admin cp , and it will pick one , but the only thing is this:

When i try to buy a ticket it comes up a blank page. No ticket is bought. The url of the blank page is http://www.tdleague.com/forums/store.php?action=lottery

Can somebody please help or do I just need to uninstall this one ?

thanks :S
  #119  
Old 08-13-2002, 04:49 AM
BluSmurf BluSmurf is offline
 
Join Date: Nov 2001
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no one can figure out why we're having blank pages?
  #120  
Old 08-13-2002, 11:24 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 tpearl5
When I try to end a lottery I get this error in the admin cp:


I just tried rehacking the store files with no avail. What's wrong? :ermm:
Wich mysql version are you using?
  #121  
Old 08-13-2002, 11:30 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 Mr_P
Is there anyway to change the $ in the hack to something else such as P for points as we dont use $ so when u get pm its defeats the object when u have 500 points ans someone robs $200

But all said and done top hack and i look forward to many more addons for this.
Search for this line for the pm to the losers:

PHP Code:
$pmloser="Dear Loser,\n\n You lost the lottery named $lotop[lotname]. The winner is: '$username' and the winner received a total of $kutje points.\n\n Good luck on any new upcoming lottery's.\n\n Thanks for your participation on this lottery."
And search for this line for the pm to the winners:

PHP Code:
$pmwinner="Congratulations $username,\n\n You won the lottery named $lotop[lotname]. Your amount of points is increased with $kutje points.\n\n Thanks for your participation on this lottery."
In the file, admin/storeadmin.php.
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.05028 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_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
  • (2)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