vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Lottery Addon For The Store Hack (https://vborg.vbsupport.ru/showthread.php?t=40056)

Lesane 06-21-2002 12:45 PM

Quote:

Originally posted by ULTIMATESSJ
whenever i try to buy a lottery ticket it always says this

Invalid SQL: UPDATE store SET quantity=quantity-1 WHERE id=10
mysql error: Unknown column 'quantity' in 'field list'

mysql error number: 1054

Date: Thursday 20th of June 2002 06:10:37 PM
Script: http://www.animexplosion.com/forums/forums/store.php
Referer: http://www.animexplosion.com/forums/...action=lottery

The lottery addon is based on the latest version of the store hack, but look at this post for the right query for earlier versions:
https://vborg.vbsupport.ru/showthrea...595#post263595

Lesane 06-21-2002 12:46 PM

Quote:

Originally posted by MrBojangle1
well I am also having probs even with the new sql query code
https://vborg.vbsupport.ru/showthrea...595#post263595 ;)

Lesane 06-21-2002 12:48 PM

Quote:

Originally posted by Itworx4me
My start dates are set wrong. Like in 1969. The money in the Jackpot don't show up either. How do I fix this?
Wich php version is running there? The code just takes the currently date & time.

Lesane 06-21-2002 12:49 PM

Quote:

Originally posted by CHoooo
Like they said before "God of Hacks" :D
Hey choooooooooooooooo, what are you doing here? Are u lost? :D

Lesane 06-21-2002 12:50 PM

Quote:

Originally posted by Limpkinw
Great hack!

Question...

When the lottery is ended is there a way to reset the tickets purchased so the ones in the previous Lotto have to buy again?

Hopefully I am clear about what I mean... Just tring to keep it interesting for the people "in" cause if for exp. it takes a month for anyone to win they won't be able to participate for a month

When the lottery will be ended then everything from the lottery table will be deleted.

Lesane 06-21-2002 12:54 PM

Quote:

Originally posted by trainer
ok have a question... my site has over 10k members and about 1/2 are not active. is there a way to pick a winny out of the tickets sold rather then from all the members. couple be weeks before someone wins.

also how does this stop people from creating bogus accounts just to buy another ticket?

great idea just thinking aloud...

1. Find this part in storeadmin.php:

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 * FROM storelottery WHERE lotnumber=2 ORDER BY RAND() desc LIMIT 1"); 

2. Tell them this:
https://vborg.vbsupport.ru/showthrea...594#post263594

Lilac 06-21-2002 01:57 PM

Quote:

Originally posted by Peace
Lesane, a question, what's the postbit or link code for "richest" person? I want to display the "richest person" on my forum home.

I need this too. Do anyone know the postbit for this? Lesane, anyone?

LightBringer 06-21-2002 02:21 PM

Quick question:


Why would you want members that haven't bought a ticket even participating in the lottery?

That's like going to your local powerball location, grabbing a scratch off, and someone else winning it even when they didn't buy it hehe :)

Lesane 06-21-2002 03:38 PM

Quote:

Originally posted by LightBringer
Quick question:


Why would you want members that haven't bought a ticket even participating in the lottery?

That's like going to your local powerball location, grabbing a scratch off, and someone else winning it even when they didn't buy it hehe :)

Huh? :confused: They aint participate on the lottery, the script just look in the user table if a user bought a ticket and if not then the lottery stays online and if so then the user will get rewarded.

Lesane 06-21-2002 03:48 PM

Quote:

Originally posted by Peace
Lesane, a question, what's the postbit or link code for "richest" person? I want to display the "richest person" on my forum home.
Richest person? This is the lottery addon thread and not the store hack thread ;):lick:

Dean C 06-21-2002 05:58 PM

does it automatically pick the winner on the day u set to end the lottery???

Peace 06-21-2002 06:45 PM

Quote:

Originally posted by Lilac



I need this too. Do anyone know the postbit for this? Lesane, anyone?

I asked like 2 or 3 times, if I'm not mistaken, inside the Store Hack thread and no answer from you. I'll post it again in the Store thread. I don't know if I'll get an answer or not.

BigJohnson 06-21-2002 07:05 PM

Wait i am lost. Does this lotto thing pick a random member that bought a ticket or just a random member even if they didn't buy a ticket? which one does this addon do? I was reading through the threads and i saw post 46 and was wondering. Thanks.

BigJohnson 06-21-2002 07:09 PM

Ok never mind about the question up above i figured it out but there is one problem with my Lotto. The winner wins the amount that everyone chipped in to buy a ticket but he does not win the actual jackpot. I put the jackpot to 100000 and i win 20 bucks because only one person bought a ticket. Now is there a fix for this?

Chris M 06-21-2002 07:13 PM

Nice Addon!:)

Just the sorta thing I was looking for:)

*Installs*

Satan

ceo_tfw 06-21-2002 07:32 PM

great Lotto Lesane, I installed it with no probs

Blue2000 06-22-2002 01:02 PM

NICE ONE FELLA ;)

top job

i will be installing this later ;)

btw i sent you a pm did you never get it?

bandersen 06-24-2002 12:14 PM

Quote:

Originally posted by BigJohnson
Ok never mind about the question up above i figured it out but there is one problem with my Lotto. The winner wins the amount that everyone chipped in to buy a ticket but he does not win the actual jackpot. I put the jackpot to 100000 and i win 20 bucks because only one person bought a ticket. Now is there a fix for this?
BigJ: See post #22
It worked like a charm after that :)

bandersen 06-24-2002 12:21 PM

If I buy a ticket, then click the back button, I get to buy several tickets. Similar error as the old one in the store.

Lesane 06-24-2002 12:35 PM

Quote:

Originally posted by Mist
does it automatically pick the winner on the day u set to end the lottery???
No, one of the admins need to do that in the admincp.

Lesane 06-24-2002 12:41 PM

Quote:

Originally posted by bandersen
If I buy a ticket, then click the back button, I get to buy several tickets. Similar error as the old one in the store.
Find in store.php:

PHP Code:

if ($action=="lotteryupdate") { 

Add After It:

PHP Code:

if ($reet=$DB_site->query_first("SELECT * FROM storelottery WHERE lotnumber='2' AND userid='$bbuserinfo[userid]'")) {
       eval(
"standarderror(\"".gettemplate('store_lottery_error')."\");");
       } 

Text File in 1st post updated.

Roxie 06-24-2002 01:59 PM

Works great! Finally a hack request of mine gets created! :D

Keta 06-24-2002 07:31 PM

yes this is pretty cool i installed it last night on 226

hypedave 06-25-2002 09:11 PM

is there a way to setup multiple lottery session, ending on diferent days

grog6 06-27-2002 10:07 PM

I've installed this hack too, all is good, i juste have a small pb with the link to buy a ticket, when i click on this link, i've a beautiful white page !

I asked someone to install it and he have the same pb ... my template store_lottery has the good name, nobody had this error ?

inetd 06-28-2002 09:38 AM

Quote:

Originally posted by Lesane


No, one of the admins need to do that in the admincp.

Make this automatically please... In my board ~200 members, and when i click "Pick winner" i see winner, but this member don't buy lottery ticket... Help me please with this...

inetd 06-28-2002 09:42 AM

Lesane, members on my board can buy 2 and more tickets... How fix this?

Lesane 06-30-2002 02:56 PM

Quote:

Originally posted by hypedave
is there a way to setup multiple lottery session, ending on diferent days
Nope

Lesane 06-30-2002 02:57 PM

Quote:

Originally posted by grog6
I've installed this hack too, all is good, i juste have a small pb with the link to buy a ticket, when i click on this link, i've a beautiful white page !

I asked someone to install it and he have the same pb ... my template store_lottery has the good name, nobody had this error ?

Did you not forgot to setup a lottery first in the admincp? Query executed?

Lesane 06-30-2002 03:01 PM

Quote:

Originally posted by inetd
Lesane, members on my board can buy 2 and more tickets... How fix this?
No they can't.. hehe. Are you sure about that, how did they bought the 2nd one? With a different username? ;)

inetd 06-30-2002 03:03 PM

Lesane, no.
When i click "View user who buy ticket" i see (example):
Bambi
inetd
MIU
MIU
Sir
Lola
Luckie
God
God
God

Lesane 06-30-2002 03:13 PM

Did you added the fix?
https://vborg.vbsupport.ru/showthrea...264#post265264

inetd 06-30-2002 03:17 PM

yes.
Lesane, help me please:
Quote:

quote:
Originally posted by Lesane
Quote:

No, one of the admins need to do that in the admincp.
Make this automatically please... In my board ~200 members, and when i click "Pick winner" i see winner, but this member don't buy lottery ticket... Help me please with this...
Post #66


And yes, i installed fix.

Lesane 07-01-2002 02:16 PM

Quote:

Originally posted by inetd
[B]yes.
Lesane, help me please:


Make this automatically please... In my board ~200 members, and when i click "Pick winner" i see winner, but this member don't buy lottery ticket... Help me please with this...

It's made to pick the winner manually.

Lesane 07-01-2002 02:17 PM

Important:
I'm not be able to give support anymore till August, 2. I'm going on vacation to Turkey for 2 weeks and once back in Holland i prepair for my 2nd vacation to Greece for 2 weeks.

See you guys again in August.

Take care,
Maurice aka Lesane.

Limpkinw 07-02-2002 03:51 AM

On my board...When lottery ends and no winner is chosen the people formerly in the lottery are still included in the lottery. shouldn't the users be reset when the lottery ends i.e. the ticket expires?

Thanks.

Limpkinw 07-02-2002 03:56 AM

Another request, is it possible to display the people entered in the lottery on a public page?
Thanks.

BigJohnson 07-02-2002 03:58 AM

Yes both those requests seem very nice if they could be done. I would love to see them both created.

hypedave 07-02-2002 11:22 AM

will it be possible to setup Multiple Lottery like, 1 lottery for each day, my members like this alot and having the set the lottery every time one ends is ok, but I rather have a lottery schedule set up

LightBringer 07-02-2002 02:12 PM

Quote:

Originally posted by Limpkinw
On my board...When lottery ends and no winner is chosen the people formerly in the lottery are still included in the lottery. shouldn't the users be reset when the lottery ends i.e. the ticket expires?

Thanks.

Lesane stated a few posts back that the winner is NOT automatically chosen. An admin must go in to the Lottery options within the control panel and pick the winner.

Quote:

quote:
Originally posted by Mist
does it automatically pick the winner on the day u set to end the lottery???
Quote:

Originally posted by Lesane:
No, one of the admins need to do that in the admincp.

This will reset all the values of the lottery and remove it from the Store view.


All times are GMT. The time now is 04:20 AM.

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.01559 seconds
  • Memory Usage 1,837KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (23)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete