Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

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
  #142  
Old 08-13-2002, 05:53 PM
BluSmurf BluSmurf is offline
 
Join Date: Nov 2001
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've added another lottery and the query result as below
mysql> SELECT * FROM storelottery WHERE lotnumber='1';
+----+-----------+--------------------------------+---------+------------+------------+--------+----------+
| id | lotnumber | lotname | jackpot | startdate | enddate | userid | username |
+----+-----------+--------------------------------+---------+------------+------------+--------+----------+
| 1 | 1 | SoccerMamak Weekend Lottery #2 | 200 | 1029297600 | 1029643200 | 0 | 0 |
+----+-----------+--------------------------------+---------+------------+------------+--------+----------+
1 row in set (0.00 sec)

But I'm still unable to buy a lottery because the page is blank
  #143  
Old 08-13-2002, 06:00 PM
Mr_P Mr_P is offline
 
Join Date: Jan 2002
Location: Uk.
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lesane if u do get around to reading this id like to thank you for all teh support u gave in this post but like to know one more thing regarding this hack.

How do we get it to show on main index page how many have been sold for the current draw.

I have on main page how much is in the lottery so the 2 would go nice together.

Anyone got a decent lotto Gif ?????//
  #144  
Old 08-13-2002, 06:20 PM
DestyNova DestyNova is offline
 
Join Date: Jun 2002
Posts: 244
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Mr_P
Lesane if u do get around to reading this id like to thank you for all teh support u gave in this post but like to know one more thing regarding this hack.

How do we get it to show on main index page how many have been sold for the current draw.

I have on main page how much is in the lottery so the 2 would go nice together.

Anyone got a decent lotto Gif ?????//
ditto, I want to know how to get that display on forumhome
  #145  
Old 08-13-2002, 06:55 PM
Mr_P Mr_P is offline
 
Join Date: Jan 2002
Location: Uk.
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

im back again with another small idea - for such a small hack the ideas are endless

Ok on index page how about the winners avator being displayed till the next lottery is won ? where it is then replaced by the new winners and if the winner dont have an avator then we can use a pre made one.

This on front page with money in lottery and how many tickets sold would look smart in a nice little box i got for it.
I mean come on if you won and you got the ugliest avator everyone is forced to see it for a week (hmm and i do have a sense of humour,so is this possible Lesane)
  #146  
Old 08-13-2002, 08:23 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 BluSmurf
Hi Lesane,

here's the result of the query
mysql> SELECT * FROM storelottery WHERE lotnumber='1';
Empty set (0.00 sec)

and attachment of my store.php
BluSmurf, you don't have the lottery code in the store.php so it never can function properly. Look on the instructions again.
  #147  
Old 08-13-2002, 08:36 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 Mr_P
Lesane if u do get around to reading this id like to thank you for all teh support u gave in this post but like to know one more thing regarding this hack.

How do we get it to show on main index page how many have been sold for the current draw.

I have on main page how much is in the lottery so the 2 would go nice together.

Anyone got a decent lotto Gif ?????//
If you have the code in root/index.php wich i gave before, on this post: https://vborg.vbsupport.ru/showthrea...353#post284353

Then find this line:

PHP Code:
$jackpot="Current Lottery Fund is now: $lot[jackpot]"
And change it to:

PHP Code:
$cost $DB_site->query_first("SELECT * FROM store WHERE action='lottery'");
$jackpot="Current Lottery Fund is now: $lot[jackpot]<br>Ticket's sold: $cost[sold]"
  #148  
Old 08-13-2002, 10:29 PM
Mr_P Mr_P is offline
 
Join Date: Jan 2002
Location: Uk.
Posts: 202
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellant and works a treat - wish there was someway to rate a hacker on this board not just for his hacks but also for the feedback they give to other users as theres some good ones on here.

Anyway thanks a million Lesane,it may only have been a small thing but once i did it i seen the amount of tickets sold from 12 to 33.

Goes to show - Its all in the packaging.

Karmed m8 if i could.
  #149  
Old 08-14-2002, 05:06 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 Lesane


Wich mysql version are you using?
http://degster.com/phpinfo.php

3.22.32

I had a feeling it had something to do with that.
  #150  
Old 08-14-2002, 09:05 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


http://degster.com/phpinfo.php

3.22.32

I had a feeling it had something to do with that.
You are using an old mysql version wich don't support that way of choosing a random user. Mysql version 3.23+ supports the "order by rand" function.

Try this way:

Open the file: admin/storeadmin.php

Find:

PHP Code:
$findus=$DB_site->query_first("SELECT * FROM user ORDER BY RAND() desc LIMIT 1"); 
And change it to:

PHP Code:
$findus=$DB_site->query_first("select *, rand() as r from user order by r limit 1;"); 
  #151  
Old 08-14-2002, 09:07 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
Excellant and works a treat - wish there was someway to rate a hacker on this board not just for his hacks but also for the feedback they give to other users as theres some good ones on here.

Anyway thanks a million Lesane,it may only have been a small thing but once i did it i seen the amount of tickets sold from 12 to 33.

Goes to show - Its all in the packaging.

Karmed m8 if i could.
You're welcome Mr_p
Closed Thread

Thread Tools

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 10:56 AM.


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.11311 seconds
  • Memory Usage 2,313KB
  • 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
  • (4)bbcode_php
  • (6)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