View Full Version : Lottery Addon For The Store Hack
Lesane
06-18-2002, 10:00 PM
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.
Lovaboye
06-19-2002, 09:36 PM
word? can wait to install this!
Velocd
06-19-2002, 09:40 PM
Another excellent hack from another excellent coder. Great job Lesane ;)
inetd
06-19-2002, 09:41 PM
AAA!
I install small time later :)
squawell
06-19-2002, 09:56 PM
Lesane another excellent hack u did......
great job.... i like!!:D:D:D:D
BigJohnson
06-19-2002, 10:02 PM
Very amazing. I love you Lesane.
Lovaboye
06-19-2002, 10:10 PM
were in the store does this show up? we need a pic
ZiRu$
06-19-2002, 10:16 PM
dope man.......can't wait on your Betting Hack now :)
Lovaboye
06-19-2002, 10:38 PM
never mind its cool, but if we wanted to change the ammount of tickets a person can buy what do we change?
TalkHardRandy
06-19-2002, 10:44 PM
SWEET!!!!
Itworx4me
06-19-2002, 11:13 PM
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
inetd
06-20-2002, 12:44 AM
Good work, Lesane :)
Please release Gambling add-on and You will be the God of HACKS! :)
BigJohnson
06-20-2002, 01:20 AM
Yes gambling addon on seems to be so amazing and i was dying for that one as well. I will kill anyone for that one. You are already god. You are simply amazing.
Velocd
06-20-2002, 01:27 AM
Thats some power you got there Lesane, they're starting to refer to you as "GOD" ;)
Oo There will never be unique rpg forum will there?
Velocd
06-20-2002, 02:26 AM
This isn't really an RPG hack, but to answer your question anyway--no, 'fraid not :(
Erwin
06-20-2002, 02:40 AM
Lesane is very generous to release his hacks. I applaud him - he deserves all the accolades he gets.
Peace
06-20-2002, 02:50 AM
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
LightBringer
06-20-2002, 03:21 AM
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.
bandersen
06-20-2002, 10:42 AM
Installing.... thanks Lesane!!
Peace
06-20-2002, 11:44 AM
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.
Lesane
06-20-2002, 11:55 AM
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:
$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:
$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.
Lesane
06-20-2002, 12:00 PM
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.
Lesane
06-20-2002, 12:03 PM
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:
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')
Lesane
06-20-2002, 12:09 PM
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:
makenavoption("Lottery Options","storeadmin.php?action=lottery");
And change it to:
makenavoption("Lottery Options","storeadmin.php3?action=lottery");
Lesane
06-20-2002, 12:13 PM
Thanks everyone for the feedback. Thumbsup.
Peace
06-20-2002, 12:21 PM
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.
LightBringer
06-20-2002, 02:14 PM
Lesane, thanks for the starting jackpot fix! :) Works like a champ now.
YAY! IT'S FINALLY OUT! OMG **INSTALLS!**
hacker of the lifetime: Lesane!!
BigJohnson
06-20-2002, 04:09 PM
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.
GReat Hack Lesane.
Thanks again
trainer
06-20-2002, 04:40 PM
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...
-=Sniper=-
06-20-2002, 08:51 PM
ok this is a great hack, will be using it in the near future!
would it not be better to create another table, which contains all the people who enter, so a user may get multiple entrys into the lottery! simply his user name will go into the table, and the script will choose, that way the more tickets a users buys the more chance he/she has off wining!
also I have another idea, a bit like the above but instead it would be like entrying points to win a DVD, A Game, or something! you can create your own prize, where people enter their points to win stuff...
thanks for the great hack!
ULTIMATESSJ
06-20-2002, 09:16 PM
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/store.php?action=lottery
Peace
06-20-2002, 09:29 PM
Lesane, I fixed the error problems. Thanks for the nice hack and your help.
Itworx4me
06-20-2002, 11:17 PM
My start dates are set wrong. Like in 1969. The money in the Jackpot don't show up either. How do I fix this?
Peace
06-20-2002, 11:32 PM
Lesane, a question, what's the postbit or link code for "richest" person? I want to display the "richest person" on my forum home.
MrBojangle1
06-21-2002, 03:09 AM
well I am also having probs even with the new sql query code
CHoooo
06-21-2002, 03:12 AM
Like they said before "God of Hacks" :D
Limpkinw
06-21-2002, 05:51 AM
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
Lesane
06-21-2002, 12:45 PM
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/store.php?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/showthread.php?postid=263595#post263595
Lesane
06-21-2002, 12:46 PM
Originally posted by MrBojangle1
well I am also having probs even with the new sql query code
https://vborg.vbsupport.ru/showthread.php?postid=263595#post263595 ;)
Lesane
06-21-2002, 12:48 PM
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
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
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
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:
$findus=$DB_site->query_first("SELECT * FROM user ORDER BY RAND() desc LIMIT 1");
And change it to:
$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/showthread.php?postid=263594#post263594
Lilac
06-21-2002, 01:57 PM
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
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
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
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
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
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
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:
if ($action=="lotteryupdate") {
Add After It:
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
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
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
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
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
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/showthread.php?postid=265264#post265264
inetd
06-30-2002, 03:17 PM
yes.
Lesane, help me please:
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...Post #66
And yes, i installed fix.
Lesane
07-01-2002, 02:16 PM
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
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:
Originally posted by Mist
does it automatically pick the winner on the day u set to end the lottery???
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.
hypedave
07-05-2002, 04:15 AM
Help I have a user that has purchased a lottery ticket 22 times, he probably has found a way around the system.
Has anyone noticed this problem ?
okay here is an update,
when the user bought his ticket, it gives you the screen that you bought a ticket, at that point all you have to do it refresh your browser and buy another ticket
there has got to be a fix to this before it gets out of hand
bandersen
07-05-2002, 07:43 AM
see post#61 (page5)
Originally posted by hypedave
Help I have a user that has purchased a lottery ticket 22 times, he probably has found a way around the system.
Has anyone noticed this problem ?
okay here is an update,
when the user bought his ticket, it gives you the screen that you bought a ticket, at that point all you have to do it refresh your browser and buy another ticket
there has got to be a fix to this before it gets out of hand
Lesane Great hack thanks again for making another fine addition to the store hack:)
Lesane, is it possible to remove a lottery? I accidentally created two, but I need to remove them *IMMEDIATELY*
Lesane
07-26-2002, 07:38 AM
Originally posted by Tha Rock
Lesane, is it possible to remove a lottery? I accidentally created two, but I need to remove them *IMMEDIATELY*
Give me the lottery name of the second one or do you want to delete them both?
trainer
07-26-2002, 03:32 PM
Lesane is there a way to give away something other then points/cash. we would like to give away sponsor prizes but this addon didn't seem to support it
quick one guys
Is it possible to call in on main forum home page how much is in the Lottery as this will encourage members to buy a ticket in hope of winning it.
Example :
Current Lottery Fund is now : 2300
etc so then they pay 200 for a ticket (im expensive) and then when they refresh it says
Current Lottery Fund is now : 2500
Basically just need the code that calls it in .........Anyone ?????
Another Idea if poss
is it poss if no Lottery is running then the line above dont show on forum home but if admin choose to run a lottery then the line auto appears with current jackpot and how many users have bought tickets etc
I know not much of ideas but they can be built upon.
proxyMX
07-27-2002, 03:56 AM
Parse error: parse error in /home/virtual/site20/fst/var/www/html/forums.proxymx.com/admin/index.php on line 252
i cant get in to edit the templates and finish the add on, because i get this stinking error everytime i go to admin index :| Elp
proxyMX
07-27-2002, 05:02 AM
Tis ok ive fixed it doh!
when it works
for my post 2 back i know if u go to shop u can see these things i want but i need to code to call them in on homepage as users are lazy as we all know so the easiest way is always the best way.
starting to look like im spamming this page but i dont mean to guys.
I have tried all variables on forum home just so it says Lottery is now at ???
but i dont know the correct one
anyone know the right one ?
It shows in the shop so im presuming i must be able to get it on me main page so all users can see what they can win without going shop...
Lesane: I want to remove both lotteries
Lesane
07-28-2002, 04:23 PM
Originally posted by Tha Rock
Lesane: I want to remove both lotteries
Execute this query:
DELETE FROM storelottery
Lesane
07-28-2002, 04:31 PM
Originally posted by Mr_P
quick one guys
Is it possible to call in on main forum home page how much is in the Lottery as this will encourage members to buy a ticket in hope of winning it.
Example :
Current Lottery Fund is now : 2300
etc so then they pay 200 for a ticket (im expensive) and then when they refresh it says
Current Lottery Fund is now : 2500
Basically just need the code that calls it in .........Anyone ?????
Another Idea if poss
is it poss if no Lottery is running then the line above dont show on forum home but if admin choose to run a lottery then the line auto appears with current jackpot and how many users have bought tickets etc
I know not much of ideas but they can be built upon.
Put this code in root/index.php:
$check=$DB_site->query_first("SELECT * FROM store WHERE ok='Y'");
if ($check[action]=='lottery') {
$lok=$DB_site->query_first("SELECT * FROM storelottery WHERE lotnumber='1'");
$jackpot="Current Lottery Fund is now: $lok[jackpot]";
} else {
$jackpot="";
}
Open forumhome template and put $jackpot wherever you want.
just like to say thanks to lesane for his help
much appreciated m8
trainer
07-28-2002, 06:04 PM
Lesane is there a way to give away something other then points/cash. we would like to give away sponsor prizes but this addon didn't seem to support it
proxyMX
07-28-2002, 07:33 PM
What i have planned is the main lottery prise draw, then a random, Moderator for a month prize to one of the losers, who then enjoy the beneifits of being a mod for one whole month, until the next draw
Ok worked well and it updates as well so cheers
Welcome To The Lotto
Money in jackpot: 2002
One more question : i have 15 awards using the awards cards hack - how can i make some of them apear in shop so users can buy them.I use the red card in the shop so if a user gets this he can pay to have it removed but how can it be implented so they can buy other awards from shop.
Example we play a lot of RTCW so we have a few awards for the game but users keep asking for a rtcw logo under their name so they can say they are part of the team on the board who play.
Well for a price and a hack they can.
Is this possible ?
This shop business is one of best ideas i have seen in long while as it can be expanded to cover just about anything(wish i was a coder)
tpearl5
07-29-2002, 10:09 PM
When I try to end a lottery I get this error in the admin cp:
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:
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.
ZiRu$
08-01-2002, 03:12 PM
i shall install it now!!!!!
Dean C
08-07-2002, 04:59 PM
is there any way of changing the amount a ticket costs?
Thanks in Advance
- Mist
Limpkinw
08-07-2002, 05:11 PM
Originally posted by LightBringer
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.
This will reset all the values of the lottery and remove it from the Store view.
Yes I do realize this the problem I am having is this
When I MANUALLY end a lottery and NO WINNER is choosed by the random function. The current users are still IN the lottery and the lottery doesnt close. My board is small so not many people buy tickets. What I would like to do is when I push the end lottery button and a random winner IS NOT choose the people who bought tickets are reset so they can buy tickets again. Otherwise it will be MONTHS before they will be able to buy again. Plus the lottery doenst end when no winner is choosen it just stays there.
Am I clear as to what Im trying to do here?
BluSmurf
08-07-2002, 10:24 PM
Originally posted by Lesane
Put this code in root/index.php:
$check=$DB_site->query_first("SELECT * FROM store WHERE ok='Y'");
if ($check[action]=='lottery') {
$lok=$DB_site->query_first("SELECT * FROM storelottery WHERE lotnumber='1'");
$jackpot="Current Lottery Fund is now: $lok[jackpot]";
} else {
$jackpot="";
}
Open forumhome template and put $jackpot wherever you want.
I'm having problem with this, I placed $jackpot in forumhome template but on the index page it didn't show up. Any help?
xxxsaint
08-09-2002, 03:33 PM
I am having the same problem that another guy posted on here , everything installed just fine, and when I created my lottery in admin cp it went just fine , but when I try to purchase a ticket all I get is a white page and no ticket is purchased. Please help :D
DestyNova
08-09-2002, 05:12 PM
Originally posted by BluSmurf
I'm having problem with this, I placed $jackpot in forumhome template but on the index page it didn't show up. Any help?
Me either, it didnt show up.
Lesane, Do I have to put your jackpot codes in right place or? since I dont know which so I put it below ?> in index.php but it doesnt work anyway
Any idea?
Originally posted by Limpkinw
Yes I do realize this the problem I am having is this
When I MANUALLY end a lottery and NO WINNER is choosed by the random function. The current users are still IN the lottery and the lottery doesnt close. My board is small so not many people buy tickets. What I would like to do is when I push the end lottery button and a random winner IS NOT choose the people who bought tickets are reset so they can buy tickets again. Otherwise it will be MONTHS before they will be able to buy again. Plus the lottery doenst end when no winner is choosen it just stays there.
Am I clear as to what Im trying to do here?
you have to read the posts - go backwards though them not from beginning as i had to do this so when i ended lottery it picked a winner from ones who had bought a ticket.
I think its around page 40 but dont quote me on that
Its just a query u run
BluSmurf
08-09-2002, 05:43 PM
Originally posted by Mr_P
Ok worked well and it updates as well so cheers
Welcome To The Lotto
Money in jackpot: 2002
One more question : i have 15 awards using the awards cards hack - how can i make some of them apear in shop so users can buy them.I use the red card in the shop so if a user gets this he can pay to have it removed but how can it be implented so they can buy other awards from shop.
Example we play a lot of RTCW so we have a few awards for the game but users keep asking for a rtcw logo under their name so they can say they are part of the team on the board who play.
Well for a price and a hack they can.
Is this possible ?
This shop business is one of best ideas i have seen in long while as it can be expanded to cover just about anything(wish i was a coder)
Mr_P , can you tell me how you managed to display the jackpot amount on the front page? I'm having problem with it. Thanks!
xxxsaint
08-09-2002, 05:48 PM
And if anyone figured out why some of us get a blank white screen when we try to buy a ticket it would be greatly apreaciated :D
Roxie
08-09-2002, 06:24 PM
Originally posted by Limpkinw
Yes I do realize this the problem I am having is this
When I MANUALLY end a lottery and NO WINNER is choosed by the random function. The current users are still IN the lottery and the lottery doesnt close. My board is small so not many people buy tickets. What I would like to do is when I push the end lottery button and a random winner IS NOT choose the people who bought tickets are reset so they can buy tickets again. Otherwise it will be MONTHS before they will be able to buy again. Plus the lottery doenst end when no winner is choosen it just stays there.
Am I clear as to what Im trying to do here?
You can hit the back button and try ending the lottery again until selects a winner. There is a fix on if you read back that you can use so that it only selects a winner from those that bought a ticket.
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.
$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>";
}
BluSmurf
08-10-2002, 03:35 AM
thanks, it worked :D
BluSmurf
08-10-2002, 03:49 AM
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 Entitled:(7)
But I was brougth to a blank page, is that an error?
xxxsaint
08-10-2002, 05:58 AM
when I click on BUY A TICKET all I get is a blank white page. ANYBODY with any help here ??
BluSmurf
08-10-2002, 05:45 PM
mine too.. it was working perfectly a few days earlier, not sure why it stopped working now :(
tpearl5
08-12-2002, 12:53 AM
Originally posted by tpearl5
When I try to end a lottery I get this error in the admin cp:
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?
xxxsaint
08-12-2002, 07:54 PM
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
BluSmurf
08-13-2002, 04:49 AM
no one can figure out why we're having blank pages?
Lesane
08-13-2002, 11:24 AM
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?
Lesane
08-13-2002, 11:30 AM
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:
$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:
$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.
Lesane
08-13-2002, 11:32 AM
Originally posted by Mist
is there any way of changing the amount a ticket costs?
Thanks in Advance
- Mist
You can do that by going to the "Lottery" action.
Lesane
08-13-2002, 11:37 AM
Originally posted by xxxsaint
I am having the same problem that another guy posted on here , everything installed just fine, and when I created my lottery in admin cp it went just fine , but when I try to purchase a ticket all I get is a white page and no ticket is purchased. Please help :D
Did you changed anything? Upgraded to an other vbulletin version?
xxxsaint
08-13-2002, 11:41 AM
no sir , 2.2.6 all the way , no other changes
www.tdleague.com/forums
Lesane
08-13-2002, 11:51 AM
Originally posted by BluSmurf
I'm having problem with this, I placed $jackpot in forumhome template but on the index page it didn't show up. Any help?
Put this code in index.php:
if ($lot=$DB_site->query_first("SELECT * FROM storelottery WHERE lotnumber='1'")) {
$jackpot="Current Lottery Fund is now: $lot[jackpot]";
} else {
$jackpot="";
}
You can put it before:
//Most Popular Thread by Replies
And don't forget to put $jackpot in the forumhome template. That should work.
Lesane
08-13-2002, 11:51 AM
Originally posted by DestyNova
Me either, it didnt show up.
Lesane, Do I have to put your jackpot codes in right place or? since I dont know which so I put it below ?> in index.php but it doesnt work anyway
Any idea?
Look the post above this one. :)
Lesane
08-13-2002, 11:55 AM
Originally posted by BluSmurf
no one can figure out why we're having blank pages?
Did you changed anything, like a vbulletin upgrade or did you host upgraded to a new php/mysql version?
xxxsaint
08-13-2002, 11:59 AM
no new host upgrades either :(
Lesane
08-13-2002, 12:11 PM
Look if you have these 2 templates:
store_lottery_error
And:
store_lottery
xxxsaint
08-13-2002, 12:15 PM
yes i have
store_lottery
store_lottery_error
store_lottery_updated
Lesane
08-13-2002, 12:19 PM
Send me your store.php by pm and could u give me the result of this query:
SELECT * FROM storelottery WHERE lotnumber='1'
xxxsaint
08-13-2002, 12:39 PM
sent the store.php and the result of running that query in php my admin is
http://www.tdleague.com/images/sql.jpg
Lesane
08-13-2002, 12:56 PM
I checked your store.php and you don't even have the lottery code in it.
You forget the most important step in the instruction file:
**********************************
Open file: root/store.php
**********************************
--------
Find(on the end of the file):
--------
?>
--------
Add BEFORE it:
--------
// ###################### Start Lottery #######################
if ($action=="lottery") {
$lott = $DB_site->query_first("SELECT * FROM store WHERE action='lottery'");
$storeid=$lott[id];
$cost=$lott[costs];
$need=$points - $cost;
if ($cost>$points) {
eval("standarderror(\"".gettemplate('store_error')."\");");
}
if ($reet=$DB_site->query_first("SELECT * FROM storelottery WHERE lotnumber='2' AND userid='$bbuserinfo[userid]'")) {
eval("standarderror(\"".gettemplate('store_lottery_error')."\");");
} else {
eval("dooutput(\"".gettemplate("store_lottery")."\");");
}
}
// ###################### Start Lottery Update #######################
if ($action=="lotteryupdate") {
if ($reet=$DB_site->query_first("SELECT * FROM storelottery WHERE lotnumber='2' AND userid='$bbuserinfo[userid]'")) {
eval("standarderror(\"".gettemplate('store_lottery_error')."\");");
}
$contest = $DB_site->query_first("SELECT * FROM store WHERE action='lottery'");
$checkcost=$contest[costs];
if ($checkcost != $cost) {
eval("standarderror(\"".gettemplate('store_error')."\");");
}
if ($checkcost>$points) {
eval("standarderror(\"".gettemplate('store_error')."\");");
}
$addlot = $DB_site->query("INSERT INTO storelottery (id,lotnumber,lotname,jackpot,startdate,enddate,us erid,username) VALUES (NULL,'2','0','0','0','0','$bbuserinfo[userid]','".addslashes($bbuserinfo[username])."')");
$changeusernow = $DB_site->query("UPDATE user SET storep=storep-$cost WHERE userid='$bbuserinfo[userid]'");
$changestorenow = $DB_site->query("UPDATE store SET sold=sold+1 WHERE id=$storeid");
$updatelottery = $DB_site->query("UPDATE storelottery SET jackpot=jackpot+$cost WHERE lotnumber='1'");
$storequant = $DB_site->query_first("SELECT * FROM store WHERE action='lottery'");
if ($storequant[quantity]=='0') {
$ilove++++++s="";
} elseif ($storequant[quantity]=='1') {
$closequan = $DB_site->query("UPDATE store SET quantity='0', ok='N' WHERE id=$storeid");
} else {
$updatequan = $DB_site->query("UPDATE store SET quantity=quantity-1 WHERE id=$storeid");
}
$moneycheck = $DB_site->query_first("SELECT storep FROM user WHERE userid='$bbuserinfo[userid]'");
$money = $moneycheck[storep];
eval("dooutput(\"".gettemplate("store_lottery_updated")."\");");
}
**********************************
Save file: root/store.php
**********************************
You have the action code "lotteryupdate" in it but u don't have the action code "lottery" in it.
xxxsaint
08-13-2002, 01:01 PM
WHOOOOHOOOOO!!!!!
man ty ty ty
I looked and looked and looked but since i'm a noobie i didn't catch that , thanks so much for all your time and support !!!!
xxxsaint
08-13-2002, 01:04 PM
man we have been wanting that hack to work so bad , where do you vote around here for hacker of the year , this guy gets my vote , he even came to my forums and checked it out.
awesome job :D :D :D :D
Dean C
08-13-2002, 01:07 PM
Originally posted by Lesane
You can do that by going to the "Lottery" action.
where?
Lesane
08-13-2002, 01:16 PM
Originally posted by xxxsaint
WHOOOOHOOOOO!!!!!
man ty ty ty
I looked and looked and looked but since i'm a noobie i didn't catch that , thanks so much for all your time and support !!!!
You're Welcome :bunny:
Lesane
08-13-2002, 01:17 PM
Originally posted by xxxsaint
man we have been wanting that hack to work so bad , where do you vote around here for hacker of the year , this guy gets my vote , he even came to my forums and checked it out.
awesome job :D :D :D :D
haha :D
Lesane
08-13-2002, 01:18 PM
Originally posted by Mist
where?
Admincp -> Veb Store -> View/Modify Actions -> Lottery -> Edit -> Costs
Dean C
08-13-2002, 01:37 PM
thanks :D
BluSmurf
08-13-2002, 05:51 PM
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
08-13-2002, 05:53 PM
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 :(
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 ?????//
DestyNova
08-13-2002, 06:20 PM
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
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)
Lesane
08-13-2002, 08:23 PM
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.
Lesane
08-13-2002, 08:36 PM
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/showthread.php?postid=284353#post284353
Then find this line:
$jackpot="Current Lottery Fund is now: $lot[jackpot]";
And change it to:
$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]";
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.
tpearl5
08-14-2002, 05:06 AM
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.
Lesane
08-14-2002, 09:05 AM
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:
$findus=$DB_site->query_first("SELECT * FROM user ORDER BY RAND() desc LIMIT 1");
And change it to:
$findus=$DB_site->query_first("select *, rand() as r from user order by r limit 1;");
Lesane
08-14-2002, 09:07 AM
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 :)
tpearl5
08-14-2002, 08:40 PM
Originally posted by Lesane
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.
Yep! that did the trick. Cept I changed it to pick from the storelottery table so it looks like:
$findus=$DB_site->query_first("select *, rand() as r from storelottery where lotnumber=2 order by r limit 1;");
You rawk Lesane! :)
Now I just need to get the display on the main page working. http://degster.com/midi/board/ Nothing shows up? (should be right under member # and above newest member)
Lesane, amazing work man. :) I installed the store yesterday, and my board had over 1000 new posts the same day, that's triple the usual amount. Today is lottery day, and the users are loving it.
I just still (!) can't make the lottery jackpot display on the index.php. I tried every step in this thread, and it just doesn't display.
I am wondering if I'm doing something wrong - I don't have this:
//Most Popular Thread by Replies
in my index.php either?
Board is http://gamesdebat.jubii.dk by the way...
Lesane
08-25-2002, 04:37 PM
You're welcome.
The forumhome code on this post works great, it's tested.
https://vborg.vbsupport.ru/showthread.php?postid=284353#post284353
You can add the code before:
// get newest member
It still does not work...
Index.php attached.
One other thing, the colors on the page where you're shown the cost of the lottery tickey are off on my board, they're some shade of blue and my board is in grey only.
Lesane
08-25-2002, 06:34 PM
2 things:
1. There must be an active lottery.
2. Maybe you forgot to put the variable $jackpot in the forumhome template.
I have a lottery going and about 5 different $jackpots in various places in forumhome, without anything happening. :(
Hi Lesane, how could I remove the upper limit for the jackpot for the lottery, which is 32000 or something right now?
dgessler
09-01-2002, 01:32 AM
Quicky Question: Did anyone figure out how to fix the extra line of space below the username when a user has glow on?
Thanks,
Dan
tpearl5
09-01-2002, 01:44 AM
That's related to the store hack itself, but if you put the glow tag in a table than it won't return. i.e. http://degster.com/midi/board/t2604.html
Peace
09-05-2002, 04:34 PM
Lesane, how can I change the PM from "Dear Loser" to Dear Member"?
Peace
09-06-2002, 01:10 AM
^
Cold Steel
09-30-2002, 11:25 PM
Originally posted by Lesane
You're welcome.
The forumhome code on this post works great, it's tested.
https://vborg.vbsupport.ru/showthread.php?postid=284353#post284353
You can add the code before:
// get newest member
I did this.
And I added $jackpot to forumhome.
And I have an active lottery going.
And nothing shows up on forumhome.
jitzs
10-06-2002, 11:25 PM
is there a way to put the last winners name and the amount they won on the homepage? I'd want to keep a history of all the winners also. I'm a VB programmer, but i've never used php before. So I know what needs to be done, but just not how to do it.
Pancreas Paul
10-12-2002, 04:49 PM
Umm lesane, when I click the lottery, it takes me to a blacnk screen which is http://bw.xtreme-host.net/vb/store.php?action=;ottery
or something. its just like al white. can someone help me fix this?
Pancreas Paul
10-13-2002, 01:48 PM
Ahh cant someone help me :(
girlzclan
10-19-2002, 05:02 AM
I don't know what went wrong, I finally got the hack working, but why is it showing in the store twice?
http://girlz.reactionzero.com/store.php
Pancreas Paul
10-19-2002, 09:46 PM
Make sure there is only 1 lottery going and in the store.php you dident add the variable twice.
sklwer
10-29-2002, 04:21 AM
I just installed the Hack and as an admin i used the end lottery pick a winner and this is what I am getting.. Help Help
Database error in vBulletin Control Panel 2.2.8:
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
girlzclan
11-08-2002, 10:39 AM
I'm useing the store version that was posted here (https://vborg.vbsupport.ru/showthread.php?s=&threadid=36991&highlight=lottery) and when i try to install the lottery addon ::
I can't seem to find this
$storegraphic = $DB_site->query_first("SELECT showimg FROM storeadmin");
Anywhere in the root/store.php file.
pgowder
11-08-2002, 11:53 AM
I just tried to end and pick winners of my first lottery.
Here is the error?
Database error in vBulletin Control Panel 2.2.8:
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
Date: Friday 08th of November 2002 09:12:19 AM
Script: http://www.powwows.com/gathering/gathering/admin/storeadmin.php?action=lotwinner
Referer: http://www.powwows.com/gathering/admin/storeadmin.php?action=lottery
Kars10
11-09-2002, 05:03 PM
Originally posted by girlzclan
I'm useing the store version that was posted here (https://vborg.vbsupport.ru/showthread.php?s=&threadid=36991&highlight=lottery) and when i try to install the lottery addon ::
I can't seem to find this
$storegraphic = $DB_site->query_first("SELECT showimg FROM storeadmin");
Anywhere in the root/store.php file.
Same problem with the new Version of the Store....please help... :(
partang2
11-10-2002, 02:22 PM
I have the same problem! Can`t find this line.... :ermm:
AZone
11-10-2002, 07:34 PM
:(
Same problem I have! File store.php from Store Hack 2.0 for vBulletin 2.2.8 doesn't have $storegraphic ...!
Please, help!
Schorsch
11-10-2002, 09:18 PM
same problem here with the $storegraphic :(
Kars10
11-11-2002, 10:03 AM
^bumb^
partang2
11-11-2002, 10:18 AM
hm... Is it only we that don`t have this line...???
Kars10
11-11-2002, 11:49 AM
hmm, ...im using the New Version of the store-hack.
This addon is made for the old version!!
.... can someone please help us??? :(
Lesane
11-11-2002, 03:31 PM
Yes, that query was taken away in the new version.
You'll need to find this piece of code now:
if($showimg=="Y") {
File in 1st post updated.
Limpkinw
11-11-2002, 03:52 PM
Awesome All better now thanks Lesane!
pgowder
11-11-2002, 04:12 PM
You da Man!
Dean C
11-11-2002, 05:53 PM
I dont like the way this hack selects users from the whole database of users and not those who have just chosen a ticket..
With over 1000 users it takes AGEEEEEESSSSSSS..
Why not have it just select from those users who have purchased a ticket :)
Regards
- miSt
Schorsch
11-11-2002, 06:15 PM
how can I change the hardcoded colors ?
Limpkinw
11-11-2002, 06:43 PM
Originally posted by Mist
I dont like the way this hack selects users from the whole database of users and not those who have just chosen a ticket..
With over 1000 users it takes AGEEEEEESSSSSSS..
Why not have it just select from those users who have purchased a ticket :)
Regards
- miSt
And here is how to stop this and it works GREAT
https://vborg.vbsupport.ru/showthread.php?postid=263956#post263956
partang2
11-11-2002, 06:43 PM
Originally posted by Mist
I dont like the way this hack selects users from the whole database of users and not those who have just chosen a ticket..
With over 1000 users it takes AGEEEEEESSSSSSS..
Why not have it just select from those users who have purchased a ticket :)
Regards
- miSt
Agree 100%!
Originally posted by Limpkinw
And here is how to stop this and it works GREAT
https://vborg.vbsupport.ru/showthread.php?postid=263956#post263956
Woops! There it was.... Thanks m8! :banana:
girlzclan
11-11-2002, 10:57 PM
Originally posted by Lesane
Yes, that query was taken away in the new version.
You'll need to find this piece of code now:
if($showimg=="Y") {
File in 1st post updated.
perfect!!! THANK YOU VERY MUCH :d
AZone
11-14-2002, 02:12 AM
Thanks, it works!
But I have one problem - information about Lottery (when I press "Lottery Options) always display twice. The same when I try to edit lottery, or view user who bought tickets - always twice...
AZone
11-14-2002, 02:14 AM
Actions
Lottery Name Money In The Jackpot Start Date End Date # Sold Already Modify
Lottery 40 2002-11-15 00:00:00 2002-11-16 00:00:00 1 [Edit] [View Users] [End Lottery/Pick Winner]
Actions
Lottery Name Money In The Jackpot Start Date End Date # Sold Already Modify
Lottery 40 2002-11-15 00:00:00 2002-11-16 00:00:00 1 [Edit] [View Users] [End Lottery/Pick Winner]
<!-- Like this - always the same things twice
AZone
11-14-2002, 02:22 AM
Also I have another mistake after end of lottery:
<!--
Updating user, set storeaction to offline and delete lottery and lotteryusers...
'User' is rewarded with 20 points.
'User' is pm'ed with the winner's message.
Lottery action on the store is set to offline.
Lottery and his users are deleted.
Done!
Updating user, set storeaction to offline and delete lottery and lotteryusers...
Database error in vBulletin Control Panel 2.2.8:
Invalid SQL: UPDATE user SET storep=storep+ WHERE userid='1'
mysql error: You have an error in your SQL syntax near 'WHERE userid='1'' at line 1
mysql error number: 1064
--!>
traekwon
11-19-2002, 09:48 PM
Yes, Lesane PLEASE PLEASE PLEASE make it so when drawing for the winner, it only searches through a list of people who bought a ticket.
AsedaH
11-19-2002, 10:12 PM
nevermind.wrong thread
Linus
11-22-2002, 04:49 PM
I seem to be getting double of the hack when I click on Lottery Options ? Isit supposed to be this way or did I do something wrong ? In addition, is there anyway I can display the jackpot amount in the store so users know how much they stand to win ?
Linus
11-23-2002, 03:47 AM
Originally posted by AZone
Also I have another mistake after end of lottery:
<!--
Updating user, set storeaction to offline and delete lottery and lotteryusers...
'User' is rewarded with 20 points.
'User' is pm'ed with the winner's message.
Lottery action on the store is set to offline.
Lottery and his users are deleted.
Done!
Updating user, set storeaction to offline and delete lottery and lotteryusers...
Database error in vBulletin Control Panel 2.2.8:
Invalid SQL: UPDATE user SET storep=storep+ WHERE userid='1'
mysql error: You have an error in your SQL syntax near 'WHERE userid='1'' at line 1
mysql error number: 1064
--!>
I got exactly the same error, and i've made the changes to storeadmin.php as you advised so that it will only pick a user who has bought a ticket. Seems users can't get the initial amount in the jackpot as well
Zombie-F
11-29-2002, 12:10 PM
I'm also having the same problem as Azone and Linus. :disappointed:
Zombie-F
11-29-2002, 02:24 PM
I've solved my own problem!
It would appear with the latest version of the store hack, all the lottery stuff is already in the storeadmin.php file, so in the instructions for the lottery hack, ignore the additions they say to make to storeadmin.php. That's why everything appears twice.
It's also causing that error at the end of the lottery since the first lottery ends and deletes the info from the tables, the second instance of it can't end the lottery and produces that error we've been seeing.
SO, to fix the problem, open storeadmin.php and find both sets of lottery code and delete one of them. Mine works great now... clicking "Install". :D
i am getting a blank page too i have the info in store.php i did everything right...
Cyclonus888
01-10-2003, 04:42 AM
Im sorry but Im completelt new to installing hacks..I managed to install the board and its working fine...I really want the lottery and all the other add ons, but I have no clue as to what you mean by making queries. How do I make a query?
sebastien69
01-15-2003, 12:27 AM
Yes I do realize this the problem I am having is this
When I MANUALLY end a lottery and NO WINNER is choosed by the random function. The current users are still IN the lottery and the lottery doesnt close. My board is small so not many people buy tickets. What I would like to do is when I push the end lottery button and a random winner IS NOT choose the people who bought tickets are reset so they can buy tickets again. Otherwise it will be MONTHS before they will be able to buy again. Plus the lottery doenst end when no winner is choosen it just stays there.
here is a fix
in storeadm.php
find:
$graa=$DB_site->query("SELECT * FROM user WHERE posts>100 ORDER BY RAND() desc LIMIT 15");
replace by
$graa=$DB_site->query("SELECT * FROM storelottery WHERE lotnumber='2' ORDER BY RAND() desc LIMIT 1");
thats all
Bungie
01-15-2003, 11:24 PM
The hack works great, there is just one problem I'm having since I've installed it. Noone's post count increases when they post. I've posted like 20 times and my post count is still the same. Any ideas on where I can even attempt to look?
I also recently installed the Store Hack and am not sure which one caused it.
Cyclonus888
01-18-2003, 05:10 AM
The store hack gives values based on the posts so one of its features is that it increments the users post count. Make sure you havent installed another hack that does the same action. In my board I installed the user class hack. Since that hack is based on post counts it included a piece of that incremented the users post count. When it was added after the store hack code the user would get their count incremented once by the store and the once more by the user class. Make sure you dont have something like that.
When you delete the extra store code in the storeadmin.php becareful wich piece you delete. If you delete the pieces lowest in the file you will delete the bug fix that pays out the entire jackpot and not just the money from tickets sold. That fix is in the pieces higher up in the code.
Lesane...fantastik hack...the one question you never answered was could you make an addon that would be for awarding things the admins choose.....like merchandise. We set the price and as an action the person buying is deducted the money and the admin is sent a PM saying they bought the item. We could then initiate contact with the person to arrange delivery. Just an idea...
:Judge:
01-18-2003, 05:25 AM
Originally posted by Cyclonus888
The store hack gives values based on the posts so one of its features is that it increments the users post count. Make sure you havent installed another hack that does the same action. In my board I installed the user class hack. Since that hack is based on post counts it included a piece of that incremented the users post count. When it was added after the store hack code the user would get their count incremented once by the store and the once more by the user class. Make sure you dont have something like that.
When you delete the extra store code in the storeadmin.php becareful wich piece you delete. If you delete the pieces lowest in the file you will delete the bug fix that pays out the entire jackpot and not just the money from tickets sold. That fix is in the pieces higher up in the code.
Lesane...fantastik hack...the one question you never answered was could you make an addon that would be for awarding things the admins choose.....like merchandise. We set the price and as an action the person buying is deducted the money and the admin is sent a PM saying they bought the item. We could then initiate contact with the person to arrange delivery. Just an idea...
Was thinking of this myself.
TalkHardRandy
02-07-2003, 06:24 PM
Originally posted by N9ne
Hi Lesane, how could I remove the upper limit for the jackpot for the lottery, which is 32000 or something right now?
Edit:
Never mind... change the value of jackpot from 'SMALLINT' to 'INT with a value of however many... I picked 8.
BTW Lesane, since it hasn't been said in a few pages - YOU ROCK!
mantra
02-17-2003, 05:17 PM
i installed this hack. How come it does not show up in the store?
Any ideas?
dstruct2k
03-09-2003, 06:35 AM
You have to go in to the Admin CP and start a lottery. Remember to only start one, unless having 2 running at the same time doesn't bother you. I'm going to run 1 weekly, and the other monthly. I hope it works out! :D
EDIT: Turns out that my "2 lotteries" thing didn't work out as planned. I was just seeing an echo of the first one.... :rolleyes:
DigitalDesktops
03-26-2003, 05:39 PM
i get this error after i pick the winner, and click the link to reward the user:
Database error in vBulletin Control Panel 2.3.0:
Invalid SQL: UPDATE user SET storep=storep+ WHERE userid='5'
mysql error: You have an error in your SQL syntax near 'WHERE userid='5'' at line 1
mysql error number: 1064
this is where the error occured (Line 720)
$rewarduser = $DB_site->query("UPDATE user SET storep=storep+$kutje WHERE userid='$userid'");
DigitalDesktops
03-27-2003, 01:21 AM
^ is anyone else having problems with this?
DPoole
03-27-2003, 02:25 AM
yep i always got that so the way i got round it was when i picked a winner was to always start another lottery for the following wekk.Aint sure why it happens though
thamyeuvn
03-27-2003, 03:23 AM
YEAH< this hack is very nice. But I have a idea for LESANE: Can you add a page like "WINNER" which show who is the winner and the number of ticket the winner has chossen . :D
It's very cool, really?
DigitalDesktops
03-27-2003, 01:18 PM
Today at 04:25 AM DPoole said this in Post #206 (https://vborg.vbsupport.ru/showthread.php?postid=373888#post373888)
yep i always got that so the way i got round it was when i picked a winner was to always start another lottery for the following wekk.Aint sure why it happens though
The winner of the lottery doesn't get the jackpot. they just get 20 points back even though i set the lottery to 500 points.
EDIT: nvm i got it fixed. :)
RobinHood
03-28-2003, 05:50 AM
Yesterday at 03:18 PM DigitalDesktops said this in Post #208 (https://vborg.vbsupport.ru/showthread.php?postid=374020#post374020)
The winner of the lottery doesn't get the jackpot. they just get 20 points back even though i set the lottery to 500 points.
EDIT: nvm i got it fixed. :)
How did you fix it? I got this error too.
Madacc
04-02-2003, 08:23 PM
03-26-03 at 07:39 PM DigitalDesktops said this in Post #204 (https://vborg.vbsupport.ru/showthread.php?postid=373696#post373696)
i get this error after i pick the winner, and click the link to reward the user:
Database error in vBulletin Control Panel 2.3.0:
Invalid SQL: UPDATE user SET storep=storep+ WHERE userid='5'
mysql error: You have an error in your SQL syntax near 'WHERE userid='5'' at line 1
mysql error number: 1064
this is where the error occured (Line 720)
$rewarduser = $DB_site->query("UPDATE user SET storep=storep+$kutje WHERE userid='$userid'");
I'm getting the same error.. can anyone help out?
Darnell 0216
04-11-2003, 04:52 AM
Make sure you don't have errors in the the following lines:
$jack=$DB_site->query_first("SELECT * FROM storelottery WHERE lotnumber=1");
$kutje=$jack[jackpot];
Your error says that it's trying to add nothing (storep=storep+ WHERE) to the current storepoints which implies kutje is returning an empty value.
BTW I'm running 2.2.9 and haven't had any errors other than choosing from only those who have bought a ticket and the fact he hardcoded the colors and bullet images in which were all rectified...
dstruct2k
04-13-2003, 03:32 AM
Anyone feel like telling me the meaning of "kutje"? I tried translating it to no avail.... :(
vurton
05-02-2003, 02:00 AM
everything worked fine until i picked a winner
Database error in vBulletin Control Panel 2.3.0:
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
hmmmhhhhhhhhhhhhhh
Zelda-King
05-02-2003, 10:22 AM
Mine's ok on 2.3.0 but I want to change the userid of the winner/loser PM sender (I use Admin-Bot for jobs like this. :D).
Darnell 0216
05-03-2003, 12:37 AM
Today at 07:22 AM Zelda-King said this in Post #214 (https://vborg.vbsupport.ru/showthread.php?postid=390370#post390370)
Mine's ok on 2.3.0 but I want to change the userid of the winner/loser PM sender (I use Admin-Bot for jobs like this. :D). Find in storeadmin.php$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.";
$pmw = $DB_site->query("INSERT INTO privatemessage (privatemessageid,userid,touserid,fromuserid,title ,message,dateline,messageread,folderid) VALUES (NULL,'$userid','$userid','$bbuserinfo[userid]','You Won The Lottery','".addslashes($pmwinner)."',".time().",0,0)");Replace $bbuserinfo[userid] with the userid you wish the message to come from.
Zelda-King
05-03-2003, 01:33 PM
Yeah, I knew that had to be the key. I just wasn't sure if you just stick the userid on its own or whatnot.
Right, I've now replaced '$bbuserinfo[userid]' with '192' and done the same for the loser PM. I'll see how that goes when the next lottery ends in a week.
Thanks a lot!
On another note, with the last lottery the jackpot was over 30000 but the lottery awarded little over 1000. Maybe the jackpot just went over the maximum at the last minute? I've made the jackpot for the current lottery less to see if this one goes better.
Darnell 0216
05-03-2003, 01:51 PM
There's a fix mentioned earlier in the thread regarding award issues... You might wanna doublecheck that problem if you haven't already corrected it. I've got my lottery to award over $10,000,000...
mcyates
05-03-2003, 03:45 PM
http://www.myfootballforum.com/myfootballforum/store.php?action=lottery
When i try to buy a ticket i click on the buy button BUT it does nothing.. Below is the code for it which i'm using.
template: store_lottery
<html>
<head>
<title>$storename - Buy A Lottery Ticket</title>
$headinclude
</head>
<body>
$header
<table cellpadding="2" cellspacing="0" border="0" width="95%" align="center">
<tr>
<td width="100%"><img src="https://vborg.vbsupport.ru/images/vb_bullet.gif" alt="" border="0" align="absmiddle">
<normalfont><b><a href="index.php?s=$session[sessionhash]">$bbtitle</a> >
<a href="store.php?s=$session[sessionhash]">$storename</a> > Buy A Lottery Ticket</b></normalfont></td>
</tr>
</table>
<br>
<p><form action="store.php" name="name" method="post">
<input type="hidden" name="action" value="lotteryupdate">
<input type="hidden" name="cost" value="$cost">
<input type="hidden" name="storeid" value="$storeid">
<br>
<table cellpadding="0" align=center cellspacing="0" border="0" width="90%"><tr><td>
<table cellpadding="0" align=center cellspacing="1" border="0" bgcolor="#0A293E" width="90%">
<tr>
<td colspan="2" bgcolor="#1D6AA0"><normalfont color="#EEEEFF"><b>Verify:</b></normalfont></td>
</tr>
<tr bgcolor="#13486D" valign='top'>
<td><p><normalfont color="#000000">Buying a lottery ticket costs:</p></td>
<td><p><normalfont color="#000000">$cost</p></td>
</tr>
<tr bgcolor="#13486D" valign='top'>
<td><p><normalfont color="#000000">$pointname you have:</p></td>
<td><p><normalfont color="#000000">$points</p></td>
</tr>
<tr bgcolor="#13486D" valign='top'>
<td><p><normalfont color="#000000">$pointname after buying the lottery ticket:</p></td>
<td><p><normalfont color="#000000">$need</p></td></tr>
<tr>
<td bgcolor="#1D6AA0" colspan='2' align='center'><p id='submitrow'><input type="submit" value="Ok, Buy The Lottery Ticket">
</p></td>
</tr>
</table>
</form>
</td></tr>
</table>
$footer
</body>
</html>
Any help would be welcomed. Thanks in advance
getting problem.. well dunno if its a problem or not, but the lotto insert is appearing twice in admin
check attached gif
Nur1 I also have that problem. It doesn't seem to mess anything up, just shows everything twice though. I just ignore it.
I also have the same problem as you vurton. Members still get their money, but I get your error along with a nice vbulletin error email. I hate those LOL!
But yeah I get this too in 2.2.9. Anyone know what could be wrong?
05-01-03 at 10:00 PM vurton said this in Post #213 (https://vborg.vbsupport.ru/showthread.php?postid=390247#post390247)
everything worked fine until i picked a winner
Database error in vBulletin Control Panel 2.3.0:
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
hmmmhhhhhhhhhhhhhh
DigitalDesktops
05-05-2003, 08:38 PM
Yesterday at 11:31 PM Nur1 said this in Post #219 (https://vborg.vbsupport.ru/showthread.php?postid=391456#post391456)
getting problem.. well dunno if its a problem or not, but the lotto insert is appearing twice in admin
check attached gif
Nur1, ignore all of the instructions it tells you to do in storeadmin.php, because the code is already in it. :p This should fix your problem. :)
Zelda-King
05-08-2003, 02:48 PM
05-03-03 at 03:51 PM Darnell 0216 said this in Post #217 (https://vborg.vbsupport.ru/showthread.php?postid=390860#post390860)
There's a fix mentioned earlier in the thread regarding award issues... You might wanna doublecheck that problem if you haven't already corrected it. I've got my lottery to award over $10,000,000... Actually that WAS the problem. I'd ignored that post assuming I was exempt to that problem due to having installed the hack only recently. Lesane had said the problem is fixed.
Is there any way to show how much (including the starting ammount) is in the current jackpot??
DarkDraco07
05-20-2003, 03:02 AM
i dont know if anyone has this problem or if its the same but when someone wins a lottery, they only get the amount that people bought tickets with, they dont recieve the amount added by an admin
It's been mentioned many times in this thread before, along with the fix. It's on like page 4 or something..
sonic3d
05-21-2003, 09:30 PM
can this be a stand alone hack
if not can some1 do it?
l8er
sonic
legendarysk8er
05-21-2003, 11:31 PM
Database error in vBulletin 2.3.0:
Invalid SQL: SELECT storecost FROM usergroup WHERE usergroupid=6
mysql error: Unknown column 'storecost' in 'field list'
mysql error number: 1054
Date: Wednesday 21st of May 2003 08:03:51 PM
Script: http://www.amp.exilehosting.com/store.php?s=&action=main
Referer: http://www.amp.exilehosting.com/index.php?s=
I keep getting this error and I've doubled-checked everything..any help?
legendarysk8er
05-21-2003, 11:34 PM
05-04-03 at 11:31 PM Nur1 said this in Post #219 (https://vborg.vbsupport.ru/showthread.php?postid=391456#post391456)
getting problem.. well dunno if its a problem or not, but the lotto insert is appearing twice in admin
check attached gif
You must've added that one edit twice, go over it again. I did that too, but I had clicked copy twice on accident.
Holidazed
06-04-2003, 07:23 PM
I have not seen a post on here in awhile. Is anybody still supporting this hack?
Lesane, I know it is a pain in the butt, but is there a way you can make a modification so that this hack works with Zajako's RPG Hack? I do not have the store hack installed on my system. Actually, it is a bit too complicated for me.
It might require a couple of changes (like DB field name changed to have maybe an "RPG" in front of it), bank.php changed to rpgbank.php. This is so people could have this hack running on the Store hack as well as Zajako's RPG hack.
For money, Zajako uses a variable called "$rpgmoney". If you could do this, I would greatly appreciate it.
Thank you.
midnightz
06-05-2003, 09:56 PM
Hi Lesane,
I would like to have the Lottery winners information such as a copy of the pm or something of such. Post inside of a Lotto Winners Thread in my contest winners forum.
How is this possible.
Awesome work you do, I would still kill or pay well to get my forumhome columns to look like yours though :)
Cheers,
midnightz
Big J
06-05-2003, 11:48 PM
Now that I have installed the lottery I have no way to increase/decrease the points given when someone rates a thread. Any ideas?
Holidazed
06-06-2003, 02:09 PM
Again, does Lesane even look at this thread anymore?
7harmonicz
06-26-2003, 07:37 PM
I just installed the hack but dont see anywhere to modify the start and end date of the lotto? Where is this found? If not when does it end?
7harmonicz
06-26-2003, 11:58 PM
anyone, please?
7harmonicz
06-27-2003, 02:32 AM
lol, never mind Im tired and feel like an idiot now,
I'm sharing the problem of the mysterious "white page" with the lottery action. Can anyone help?
I'm running vB 2.3.0, and the latest rev of MySQL. I've double checked everything I could, but came up with nothing.
Looks sorta like nobody's here...
Galls
08-08-2003, 04:42 AM
i am not able to download it, lol
Azhrialilu
08-24-2003, 06:58 PM
yup, I'm getting the white page too *sigh*
livewars
08-28-2003, 06:13 AM
I am having the same problem with just getting a blank white page... please help, it seems I'm not the only one!
NexDog
09-11-2003, 04:08 AM
For the white page dudes:
https://vborg.vbsupport.ru/showpost.php?p=284374&postcount=132
deathemperor
10-10-2003, 04:23 AM
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
SavgeDusk
10-30-2003, 10:22 PM
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;
Darnell 0216
11-02-2003, 05:08 PM
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...
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.
deathemperor
11-02-2003, 11:39 PM
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
Darnell 0216
11-03-2003, 02:00 PM
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.
Lostnode
11-14-2003, 03:31 AM
Just installed the lottery hack...
Went to test it out and I got this MySQL error :(
MySQL is version 4.0.11a-gamma
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/forums/forums/admin/storeadmin.php?action=lotreward&userid=1&username=-BIA-r%20Lostnode
Referer: http://test.brothers-in-arms.com/forums/admin/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
UPDATE user SET storep=storep+2000 WHERE userid='1'
I think it has to do with that, but what?
dstruct2k
11-20-2003, 05:23 AM
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.
sabret00the
12-15-2003, 02:01 PM
how would i go about making sure this always selects a winner and that it's done via cron?
xxxsaint
12-20-2003, 01:14 AM
Your instructions say
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 ?
SavgeDusk
12-21-2003, 04:12 AM
It would go before this line:
if($store_img=="1") {
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.