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)

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

Quote:

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

I wanna slove this, cuz the lottery add-on is cool

Have you gone over your edits with a fine tooth comb? And did you check line 110 to see if anything was wrong...
Quote:

Originally Posted by SavgeDusk
The lottery info in the store isn't showing up properly. It doesn't list how much is in the jackpot or the start/end dates. And when I bought a ticket, it wouldn't show up either. o.o;

If it doesn't appear properly, doublecheck your table edits. If you can't see the ticket purchase appearing then you more than likely have made a mistake in your edits. The only problem this hack really has from the getgo are jackpot errors and the solution is posted.

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

Quote:

Originally Posted by deathemperor1st
yes, i did look the 110 line, that is the line of lottery add-on. And sure i did follow the instructions of Lesance, but it shows that error
what do i have to deal with ? I cant find out myself what's wrong due to my bad knowledge of php. Hope u could

PM Sent.

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

Code:

Database error in vBulletin Control Panel 2.3.3:

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

mysql error number: 1064

Date: Friday 14th of November 2003 12:38:52 AM
Script: http://test.brothers-in-arms.com/for...A-r%20Lostnode
Referer: http://test.brothers-in-arms.com/for...min/index.php?

What is the syntax error... It doesnt seem to want to read the varialbale $kutje, it was 2000 for this, and the error would have read

Code:

UPDATE user SET storep=storep+2000 WHERE userid='1'
I think it has to do with that, but what?

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

Quote:


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

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

if($showimg=="Y") {

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

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


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



so where does that go ?

SavgeDusk 12-21-2003 04:12 AM

It would go before this line:
if($store_img=="1") {

xxxsaint 12-21-2003 04:22 AM

thanks , now that I have that there , when I try to purchase a ticket , it's not letting me , it just gives me a page layout like it used to have on your confirm buying the ticket screen , but no template context. What I did was re-do the templates for the lottery , and re-hack store.php ( the new store.php) , but since the hacks were already in place in the admin panel I didn't have to do those , and since old lottery info showed up , I didn't re-do the mysql queries , should I have to do that?

SavgeDusk 12-21-2003 04:51 AM

I'm getting the same thing. I'm thinking it has something to do with the new code. I tried everything I possibly could, re-checked, etc.. but nothing. =/

Frozen Dreams 12-21-2003 06:25 AM

I fiddled with stuff for a while and I think I have it working on my board. It wouldnt work for me at first either and I got the same errors. It's cuz the variables were changed me thinks.
$points were turned into $bbuserinfo['storep']

I copied and pasted the bits of code and the templates I used into the text file. So far it works fine, only thing I havent tested yet is picking the lottery winner (since I had one running while updating the store)

I hope it's ok I post this. Do not own this hack etc - just trying to help. ;)

SavgeDusk 12-21-2003 05:45 PM

You were right, Frozen Dreams. I can't believe I overlooked that. Actually I can, I was pretty tired. -- Anyway, I changed all the $points to $bbuserinfo['storep'] and it works. :] Thanks~

Frozen Dreams 12-22-2003 02:20 AM

Hehe - glad I could help :D
Yeah and not being a php expert myself, finding out what was wrong at first gave me a headache too :)

*~*E-DuB*~* 12-23-2003 07:55 AM

Quote:

Originally Posted by TalkHardRandy
Edit:

Never mind... change the value of jackpot from 'SMALLINT' to 'INT with a value of however many... I picked 8.

Sorry but I dont understand what hes saying, can somebody explain further in detail on changing the limit on the jackpot?

*~*E-DuB*~* 12-24-2003 05:33 AM

lesane u said in order to increase the jackpot......use lottery actions......

well here's what i came across...the jackpot is represented as.... $kutje
and i understand u can start the jackpot with a certain amount in the store cpanel....

but i want to expand the $kutje command....and make it larger than it already is.....
i was thinking some kinda of coding in front of the $kutje command here....

n e ideas?

double $kutje code?

DigitalDynasty 01-05-2004 07:09 PM

Ok I have a problem ^.^

When im editing the store.php file it ask me to find if($showimg=="Y") { well I cant find that I went to edit find in notepad and search find in edit plus and neither could find it....it also cant find $showgraphic="<b>$aw[title]</b>";

If anyone could help me that would be great...

Lesane 01-05-2004 07:27 PM

I am upgrading the lottery addon soon and will integrate it in my store hack.

*~*E-DuB*~*, to double the jackpot find this code:

PHP Code:

$kutje=$lala+$jackpot

Replace that with:

PHP Code:

$jackpot $jackpot*2;
$kutje $lala+$jackpot


DigitalDynasty 01-05-2004 08:02 PM

Quote:

Originally Posted by DigitalDynasty
Ok I have a problem ^.^

When im editing the store.php file it ask me to find if($showimg=="Y") { well I cant find that I went to edit find in notepad and search find in edit plus and neither could find it....it also cant find $showgraphic="<b>$aw[title]</b>";

If anyone could help me that would be great...

Do u think u could help with that im completly lost :(

xxxsaint 01-05-2004 08:19 PM

It would go before this line:
if($store_img=="1") {

MindTrix 01-05-2004 08:20 PM

Digital Dynasty, if your running Store 3.0 i believe this hack will not work with it.

DigitalDynasty 01-05-2004 08:32 PM

Quote:

Originally Posted by xxxsaint
It would go before this line:
if($store_img=="1") {

That made it show up on my store page...but now when I click the link its blank on the next page.

PsychoKrazy 01-08-2004 10:50 PM

I am having the same problem as DigitalDynasty. I set it up and didnt have those 2 lines. I followed xxxsaint's advice on where to put it and it all does good but when i click on it to buy it, it takes me to a blank screen and it doesnt buy it. please help asap

SavgeDusk 01-09-2004 12:11 AM

If you get a vBulletin Message box with nothing in it, you need to add an:
$error_message ="Oops, you don't have enough $pointname to buy a lottery ticket.";
before:
eval("standarderror(\"".gettemplate('store_error') ."\");");
because the store error template will be blank otherwise. -- I basically re-wrote the lottery code bit because it wouldn't work. :3

MindTrix 01-09-2004 05:20 AM

Put it after it :p

Marzas 01-12-2004 04:44 AM

does this hack work with the new Store hack 3?

MindTrix 01-12-2004 03:45 PM

Afraid not, However i believe Lesane will be porting it over soon :)

Lesane 01-17-2004 11:53 AM

Yes, a new store version will arrive soon with the lottery integration.

This thread can be closed now... *points to a mod/admin*

Dean C 01-17-2004 12:54 PM

As requested :)


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.01692 seconds
  • Memory Usage 1,808KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (30)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