SMF Shop

SMFShop => Completed Additions => Modifications => Topic started by: YamiKaitou on October 25, 2007, 10:41:09 am

Title: SMF Lottery Mod
Post by: YamiKaitou on October 25, 2007, 10:41:09 am
Information
Project Name: SMF Lottery System
Author: Yami Kaitou
Version: 1.0.1


Features

Adds a Lottery feature to SMF Shop 3.0
Shop Admin can set the following variables dealing with the tickets
-Amount of tickets per user
-Percentage of cost of ticket to be added to jackpot
-Range of the balls (example 1-10)
-User the winner PM comes from (0 will be a special guest)
Jackpot will always have a minimum of 1000
To win the lottery, a user must match all 4 balls
By default, drawings can only happen once every 6 days
Drawings can either be done by a cron or by manually going to the script (see FAQ for details)
Special page within main shop for the lottery
-Allows users to see the tickets they have entered for the current drawing
-Allows users to see their previously entered tickets and whether they have won or not
-Allows users to see previous drawings and the winners

Bug Fixes

Jackpot resetting back to 1000 when nobody won.
Jackpot not resetting when someone did win.

FAQ
http://forums.projectyami.com/showthread.php?t=4

Website
http://forums.projectyami.com/forumdisplay.php?f=17



NOTE
I will prefer if you report bugs and feature requests at the website as I want to keep track of my progress, and the fact that I check there more often than here. Also, the attached file may not always be the latest version. So, make sure you check the site for updates as well. I will try to keep this topic up-to-date, but I can't be certain that it always will be.



To Upgrade to 1.0.1 from 1.0.0
Look here (http://projectyami.com/forum/index.php?topic=10.0), simple and easy way to upgrade without having to install the new package.
Title: Re: SMF Lottery Mod
Post by: Joshsux on October 26, 2007, 11:02:29 am
The hell is the cron job? I won't download this because i don't wanna do that. Pitty i really liked the look of this mod too.
Title: Re: SMF Lottery Mod
Post by: inkstains on October 26, 2007, 07:52:33 pm
it's not hard to set up and Yami has provided clear instruction on how to do it. a mod well worth having imo.
Title: Re: SMF Lottery Mod
Post by: feeble on October 26, 2007, 08:43:27 pm
nice work with this mod, its been asked for a long time so thank you.

good solid list of features, nice one
Title: Re: SMF Lottery Mod
Post by: YamiKaitou on October 27, 2007, 01:15:02 am
The hell is the cron job? I won't download this because i don't wanna do that. Pitty i really liked the look of this mod too.

Then do it the same way that you do your shops interest. The file is Sources/shop/LotteryDraw.php
Title: Re: SMF Lottery Mod
Post by: YamiKaitou on November 01, 2007, 03:36:36 am
Version 1.0.1 released due to a bug that I didn't notice. Uploaded new package here and method to upgrade to the latest version is found on my forums (very easy upgrade, involves changing 1 character in the source)
Title: Re: SMF Lottery Mod
Post by: Slacker on November 03, 2007, 11:17:49 am
What exactly is cron and why do you have to do it? So you're saying everytime we want to draw a lottery we have to go through this cron stuff/scripting?

I have this mod installed on my forums. How would I test the system and see what it's like to win?

When I click "Previous tickets" it's already told me that I havent won before the lottery has been drawn. is that normal? Will it change after  the lottery has been drawn.

Is it possible for the people who have purchased a lottery ticket and lost get a pm saying they lost?
Title: Re: SMF Lottery Mod
Post by: YamiKaitou on November 03, 2007, 11:31:20 am
A cron is something that allows you to do something on certain days of the week/month/etc. It is all automated. So, unless you want to remember to run the script yourself every week, this is the easiest way. And no, you just have to set the cron up once and it will always run on the specified date you give it.
Title: Re: SMF Lottery Mod
Post by: Slacker on November 03, 2007, 11:45:17 am
Alright thanks.

Is there a way to keep it so that the jackpot doesn't reset and keeps on going till someone wins it all?
Title: Re: SMF Lottery Mod
Post by: YamiKaitou on November 03, 2007, 01:54:08 pm
If you use 1.0.1, it will do that
Title: Re: SMF Lottery Mod
Post by: Slacker on November 04, 2007, 02:53:43 am
Feature request=

Make this mod editable in the admin section, like the time between drawings, the option to reset the jackpot after no winners or not, and make it so that we don't have to go through this cron job stuff. It's kinda alot of work just to get this mod running in my opinion. Especially for the not so advanced people here. :-/

It's an excellent mod and has nice features. Now try to make it easier for us to use maybe?

(P.S. I still can't get it to work. lol...)
Title: Re: SMF Lottery Mod
Post by: YamiKaitou on November 04, 2007, 04:41:40 am
I will see about making it more editable through the admin section (maybe a lottery section in the shop admin area that only works when you have the lottery item enabled, maybe). But, the cron will not go away. You don't have to use the cron though, you can always run the script manually when you want to. The only reason why there is the time limit in between drawings is so other members don't run the script when their not supposed to. Changing the time limit is not that hard either. I don't see any way that I can make the setup for this any easier than it is. The cron is not mandatory, it is just a good idea. You set it up the same way you set up the cron for the bank interest.
Title: Re: SMF Lottery Mod
Post by: Slacker on November 05, 2007, 08:21:56 am
Thanks, I got it to run every friday at 5pm. My members love this new feature.

Sorry about the loads of questions, Im learning. :]
Title: Re: SMF Lottery Mod
Post by: Str8up-Nate on November 14, 2007, 12:45:47 pm
wow i found a error (at least for me) when you uninstall it there a error in the uninstall and it told me the tables were unknown and it wouldn't uninstall so i just reinstalled smf and deleted it :P i hope you  can help me i really liked this mod

thanks you for your time
Title: Re: SMF Lottery Mod
Post by: YamiKaitou on November 15, 2007, 04:18:07 am
What tables did it error on? Cause, it worked fine for me to uninstall. Though, I haven't tried it lately
Title: Re: SMF Lottery Mod
Post by: AndyII on November 15, 2007, 06:17:26 am
great and thank you  :)
any problems running this with TP & SMF? (Tiny Portal)
Title: Re: SMF Lottery Mod
Post by: YamiKaitou on November 15, 2007, 08:11:18 am
I have no idea. If there is, please tell me as I don't use TP
Title: Re: SMF Lottery Mod
Post by: AndyII on November 15, 2007, 08:16:45 am
thanks for the reply, I will surely let you know soon,  TP is very popular as the portal for SMF, I use these as a pair and I know that the themes have to be coded separately as well
Title: Re: SMF Lottery Mod
Post by: AndyII on November 15, 2007, 09:46:40 am
Good news here, works perfectly with Tiny Portal  :)
using, SMF 1.1.2 and TP .9.8  O0.
question, possible to award the lotto one of the selected tickets?, no matter how many enter, or how many tickets  a user will purchase...., so a random drawing of only the lotto numbers entered. I want it to be easy for members to win as we will give a specific gift to keep them coming back lol
And how about a way to see the winning number so it can be posted?, in other words, where do I go to see the numbers that were picked by the script?, in the shop admin would be a nice place to see the winning numbers.
Title: Re: SMF Lottery Mod
Post by: YamiKaitou on November 15, 2007, 01:18:28 pm
Winning numbers are publicaly visible in the Shop section. There is a Lottery link below the Trade Centre link. Then, just click the Past Winners link to view old winners/drawings.


The numbers. I was thinking about making it have the capabilities of the normal lotteries but I just haven't had the time to work on it. I will take your suggestion into mind. If you don't mind, could you post that on my site as well so I can remember it?
Title: Re: SMF Lottery Mod
Post by: Alundra on November 26, 2007, 07:19:32 am
okay i know ima sound like an idiot but i dont care

Code: [Select]
/usr/bin/php -q /home/user/public_html/forums/Sources/shop/LotteryDraw.php > /dev/null

am i supposed to personalise that?!

(http://i18.photobucket.com/albums/b108/yuk75/cron.jpg)

^ and which of those options do i select? lol just select 6 days?
Title: Re: SMF Lottery Mod
Post by: YamiKaitou on December 08, 2007, 06:23:28 am
First, this is the actual command that is used, not the one you have

/usr/bin/php -q /home/user/public_html/forums/Sources/shop/LotteryDraw.php > /dev/null


For the time, if you want it to run 1 day a week, choose a Weekday and change the time (Hour and Minute) to what every you want


PS: Sorry for the late reply. I knew when I posted this I wouldn't check here much
Title: Re: SMF Lottery Mod
Post by: JMV290 on December 15, 2007, 03:36:18 pm
Pretty good.  Is there a way to limit how many a person can purchase? I initially set it to 3, thinking it would stop them from buying tickets at 3 tickets.  A user then bought 12 and put them all in the trade center.  Is there a way to limit both the purchases and the entries of the item?

Other than that, it's pretty cool.  Thanks.
Title: Re: SMF Lottery Mod
Post by: voyager on December 22, 2007, 04:46:13 am
That image that the guy posted up there from the drawing times isn't on my shop anywhere. Is there somewhere that it is that I'm missing or did my installation just miss it when it installed, or is there a whole other mod that I need for that part? Thanks for any help with this.
Title: Re: SMF Lottery Mod
Post by: AZ-{OVGY} on December 23, 2007, 01:41:59 am
That image Alundra posted is a screenshot of the cron job settings in CPanel. CPanel may or may not be provided with your webhosting, you will need to check.
Title: Re: SMF Lottery Mod
Post by: JMV290 on December 24, 2007, 02:38:15 pm
I'm not sure if the item is working or not.

If there are no winners, should the results of the drawing show up in the past winners section? If so, I have a problem--they aren't.

Yes, I've set a cron job.  I set it to go every friday at 3PM and then edited the file like you said
Code: [Select]
// 518400 is the amount of seconds in 6 days. Change this to change the time between the draws.
if ($currentTime - $last_draw < 604800)
fatal_error("Lottery draws are to close together.",true);
Which, should result in a 7 day drawing period.

Title: Re: SMF Lottery Mod
Post by: jdv on December 27, 2007, 10:52:46 pm
awesome mod YamiKaitou,

works great in tp and smf. quick question... i'd like to pull the $ amount and post in front page of site what the lottery is currently at. was curious if there is a quick ssi function or what not to pull that info to display. sort of a way to advertise on the site how big the lottery jackpot is getting. i know you can go to the shop and see it, but its hard to get folks to look in there to spark their interest in using the lottery. just looking for something that would pull the current jackpot amount and updates as it grows. also something to pull the lottery numbers drawn and post as well on front page.
Title: Re: SMF Lottery Mod
Post by: Bandit on January 04, 2008, 01:11:52 pm
I haven't been able to get the cron job to run. The lottery center indicates no draws have taken place yet. I have the crom job set to run every Thursday at 11:30 PM, and I've edited the LotteryDraw.php file to allow for a period of 7 days between draws. It just doesn't run. When I try to access the file with my browser to run it that way I get an internal server error. I have the interest for the bank working, and I've made sure the path is the same for both jobs. I really don't know much at all about cron jobs, so I'm at a loss. I even tried chmod 777 on the lotterydraw file. Can anyone give me any ideas? I love this mod and my users are buying up tickets left and right, but I've got to get the draw working.

Thanks in advance for any help anyone can offer.

UPDATE: I got it to work by choosing every weekday instead of a specific day of the week, and changing the time between draws to 24 hours. I don't want a daily draw, though, I only want a weekly draw. And I don't even care what day of the week it happens on, just that it only happens once a week. If I leave it at every weekday, and change the time between draws to 7 days, will that allow it to run weekly?

UPDATE #2: Now that the lottery draw has run once, none of my regular members can use their tickets. They are able to buy them fine, they go into their inventory and choose their numbers but when they click to use the item, they get this:

Quote
"Database Error Please try again. If you come back to this error screen, report the error to an administrator."

When I look in the forum's error log, this is the error that shows up:

Code: [Select]
test   Today at 08:54:23 PM 

 74.77.24.187     8ffbf09aa0698d68c39dfa13e9636742 

 http://www.lacrosse-network.com/forum/index.php?option=com_smf&amp;Itemid=26&amp;action=shop;do=inv3;id=199 

Database Error: Incorrect table name ''
File: /home/xxxxxx/public_html/lacrosse-network/forum/Sources/shop/items/Lottery.php
Line: 115   


Here is line 113-117 of my lottery.php file:

Code: [Select]
$result = db_query("SELECT `MemberTicketID` FROM `{$db_prefix}shop_lottery` WHERE
        `ID_MEMBER` = '$ID_MEMBER' AND
        `ID_TICKET` > $lastTicket",__FILE__,__LINE__);
        if (mysql_num_rows($result) == $item_info[1])
        {

I don't get any errors using my admin account, I am able to use the tickets without issue. I'm lost. I can't figure out why the table name would be incorrect for one user group and not another. I haven't changed anything in any of the files except the time between draws. Using SMF 1.1.4, shop 3.0 (build 12) and lottery mod 1.0.1. Any ideas?

Bandit
Title: Re: SMF Lottery Mod
Post by: JusPlay77 on February 07, 2008, 09:37:30 am
When I try to use my ticket, I get this:

Table 'xxxxxxx.smf_lottery_win' doesn't exist
File: /home/content/x/x/x/xxxxxxxx/html/smf/Sources/shop/items/Lottery.php
Line: 106
Title: Re: SMF Lottery Mod
Post by: AndyII on February 16, 2008, 04:40:43 am
question, possible to award the lotto one of the selected tickets?, no matter how many enter, or how many tickets  a user will purchase...., so a random drawing of only the lotto numbers entered. I want it to be easy for members to win as we will give a specific gift to keep them coming back lol
Title: Re: SMF Lottery Mod
Post by: kinggreg10 on February 23, 2008, 12:15:38 am
how do i increase the start amount of 1000 to a higher amount? ???
Title: Re: SMF Lottery Mod
Post by: AndyII on February 23, 2008, 01:18:42 am
I would try this,
in  Lottery.php   there is this line
Code: [Select]
$this->price = 1000;put to what you like, no guarantee as I am not a coder
there is also reference in the db
Code: [Select]
// Add a place to store the jackpot. Start jackpot off at 1000 just because I want to
db_query("INSERT INTO {$db_prefix}settings (`variable`, `value`) VALUES ('lottery_pot', '1000')",__FILE__,__LINE__);
Title: Re: SMF Lottery Mod
Post by: Organic on February 25, 2008, 05:53:08 am
I just installed this, having no problems except that I couldn't see anywhere to buy or use the tickets. The Shop had a link for 'Lottery', but all it did was offer links to previous winners & stuff like that. I snooped around, looking in admin, my profile, & the avatar box of posts & found nothing, so I checked the FAQs page at his site, had a good laugh at that, then uninstalled it.

I then got this error:

Code: [Select]
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 '' at line 1
File: /home/xxxxx/public_html/xxxxx.com/forums/Packages/temp/LotterySQLUninstall.php
Line: 32

I'm not looking for help, because I can manage, but I wanted to let you all know what happened because that's what helps a mod evolve. Great idea for a mod; it's just too bad it didn't work for my site, which btw is smf 1.1.4.

Now I'm going in for a manual removal, but I should have listened to my gut & not fiddled with this mod. From now on, I'm just sticking with the stuff Daniel makes.  O0


Title: Re: SMF Lottery Mod
Post by: AndyII on February 25, 2008, 07:10:07 am
after you set up the defaults in Add/Edit/Delete Items (drop down list of shop items), you or a member would find in "Buy Stuff" an Item called "Lottery Ticket".
for the drawing, you would setup a cron or manually run the file to complete the lottery
I think its a very good mod, I havent tried to "Un Install" it as it works great for me.
I have modified a few of the variables to suite my needs
What I would like, and I have asked the author, is for the lottery to choose only from the numbers entered, so I will always have a winner :)
Title: Re: SMF Lottery Mod
Post by: Organic on February 25, 2008, 07:18:54 am
I actually thought of looking for it in the items drop down list, but not until after I uninstalled it. You see, that's something that should be included in the FAQs page, in my opinion. I mean, come on... there's only 2 questions there, lol. Thanks for the reply. Maybe I'll try reinstalling it, since I haven't completed the manual uninstall yet.
Title: Re: SMF Lottery Mod
Post by: m1ss1nnocent on April 03, 2008, 06:39:27 am
ve got no admin feature that I can find for the lottery (it is showing in the shop fine, but I dont have anything in the shop admin for me to configure with regards to percentage etc......any suggestions?
Title: Re: SMF Lottery Mod
Post by: AndyII on April 03, 2008, 07:22:30 am
login as admin
in the shop administration choose Add/Edit/Delete Items.
if you haven't already, from drop down menu choose Lottery Ticket by YamiKaitou, from there you can configure the mod.
other wise you will have a list of items in the shop, again you can edit any of them after adding them
Title: Re: SMF Lottery Mod
Post by: m1ss1nnocent on April 03, 2008, 08:50:16 am
thank you Andy...not the most obvious way to find it, but its all sorted now and we are sooooo loking forward to the new edition!  :D

(incidentally, many apologies for scanning this thread and not noticing you already mentioning how to find my requested info.....me bad  :-[

Thanks again  :smitten:
Title: Re: SMF Lottery Mod
Post by: AndyII on April 03, 2008, 09:24:01 am
no problem
Daniel is a very intelligent young man and Yami did a nice job on the lottery mod  ;)
Title: Re: SMF Lottery Mod
Post by: Faver on April 04, 2008, 12:33:31 pm
Is a newbie question :)
How buy a ticket? :S
Title: Re: SMF Lottery Mod
Post by: m1ss1nnocent on April 04, 2008, 07:37:11 pm
you need to use the BUY ITEM feature in the shop like you do for other items. Once bought it puts it into YOUR INVENTORY where it will stay until you use it. Once you use it, it will ak you to choose your numbers and enter it into the next draw

HTH  :-*
Title: Re: SMF Lottery Mod
Post by: Lew_Cipher on April 28, 2008, 07:03:27 am
Information
Project Name: SMF Lottery System
Author: Yami Kaitou
Version: 1.0.1


Features

-Range of the balls (example 1-10)


Excellent system! I've got it installed & working but I can't find a place to set the range of balls in the item. It's got 4 balls  and nowhere I can see to change the setting. I'm sure I'm just missing it somewhere.

Any advice?
Title: Re: SMF Lottery Mod
Post by: YamiKaitou on May 04, 2008, 11:24:07 am
Wow, this thread got popular in the time that I spent not here. Anyways, the forums have changed. Main post updated with new stuff (switched to vB, but still plan on doing 1 or 2 things for SMF and maybe even adding a few features to this mod).


Remember, if you need to ask me something, best way to contact me is via email, PM, or on my site.
Title: Re: SMF Lottery Mod
Post by: AndyII on May 04, 2008, 11:34:02 am
YamiKaitou, can you post your site addy?
Title: Re: SMF Lottery Mod
Post by: YamiKaitou on May 07, 2008, 12:20:51 am
Website
http://forums.projectyami.com/forumdisplay.php?f=17

It is in the first post, lol
Title: Re: SMF Lottery Mod
Post by: Geolion1 on May 24, 2008, 04:24:02 am
I just registered in your site but can post.
I have a question, do I need to set up a cron job for 1.0.1?
Thanks, and if I do am I supposed to do it daily or weekly?
Thanks again.
Title: Re: SMF Lottery Mod
Post by: dico on June 28, 2008, 11:57:40 am
i dont see any of this:

Special page within main shop for the lottery
-Allows users to see the tickets they have entered for the current drawing
-Allows users to see their previously entered tickets and whether they have won or not
-Allows users to see previous drawings and the winners


^its not showing on my 1.1.5

Title: Re: SMF Lottery Mod
Post by: damo3933 on July 22, 2008, 07:48:56 am
Ok people,  a n00b at forum stuff, so i was wandering if anyone could help me set up when the lottery drawings are ... i dont have a clue how to do this!

any help is appreciated, many thanks

damo3933
Title: Re: SMF Lottery Mod
Post by: darkacex on July 26, 2008, 09:46:50 am
lol the website got shutdown. any1 have 1.01?
Title: Re: SMF Lottery Mod
Post by: Toups on July 27, 2008, 06:26:37 am
lottery drawing balls are going in numeric order.. if someone picks balls 5,3,6,2 it will take it as 2,3,5,6.  Same thing for the winning balls.. if it was actually 8,5,9,2 it would set the winning balls as 2,5,8,9... any way to fix this?
Title: Re: SMF Lottery Mod
Post by: bocco on July 30, 2008, 08:02:32 am
why does it matter, the person will still win.... its something that should not matter...

Title: Re: SMF Lottery Mod
Post by: Toups on July 30, 2008, 08:34:59 am
why does it matter, the person will still win.... its something that should not matter...



Umm... because it's not going in the order that they pick them in.. nor is it going in the order it is drawn in = not like a lottery at all..
Title: Re: SMF Lottery Mod
Post by: bocco on July 30, 2008, 11:48:12 am
why does it matter, the person will still win.... its something that should not matter...



Umm... because it's not going in the order that they pick them in.. nor is it going in the order it is drawn in = not like a lottery at all..

I understand what you are saying, but i thinks  its something that should not matter, maybe its cause of the array... So from what i can understand about PHP
Look for this

// Sort array
array_multisort($winning,SORT_ASC);

and do this

// Sort array
//array_multisort($winning,SORT_ASC);

----------------------
that above code will cancel out the sort.  I have not tested this yet.
Title: Re: SMF Lottery Mod
Post by: Nascar on August 04, 2008, 12:51:06 am
Stupid question:

Where do I start the drawing?
Title: Re: SMF Lottery Mod
Post by: bocco on August 05, 2008, 06:45:43 am
must use a crons job
Title: Re: SMF Lottery Mod
Post by: bocco on August 05, 2008, 06:51:47 am
Is there a way to make it so that there is a winner all the time.

something like if there is no winner, then draw again till winner appears
Title: Re: SMF Lottery Mod
Post by: Riey on August 22, 2008, 09:28:24 am
when the lottery and has just one member receives the credits?
Title: Re: SMF Lottery Mod
Post by: Riey on August 22, 2008, 09:40:16 pm
eu gostava de saber quando a lotaria acaba! e há um vencedor! Estou a testar ma não vejo maneira de ela acabar e eleger um vencedor! obrigado!




I wonder just when the lottery! and there is a winner! I do not see the test ma way to stop it and elect a winner! thanks!



Title: Re: SMF Lottery Mod
Post by: Riey on August 26, 2008, 07:24:17 am
I wonder just when the lottery! and there is a winner! I do not see the test ma way to stop it and elect a winner! thanks!


 :-X
Title: Re: SMF Lottery Mod
Post by: MeowMommy on January 05, 2009, 09:39:32 pm
for the drawing, you would setup a cron or manually run the file to complete the lottery

Could someone tell me how to manually run the file?

Thanks!  :)
Title: Re: SMF Lottery Mod
Post by: DarthKayla on January 06, 2009, 04:46:14 am
I need to know how I can make it too :-\
Looooooooooooool! Never Mind!!!! :D  ;D  :uglystupid2:  :2funny:
Title: Re: SMF Lottery Mod
Post by: God on January 14, 2009, 09:09:24 pm
for the drawing, you would setup a cron or manually run the file to complete the lottery

Could someone tell me how to manually run the file?

Thanks!  :)

I am interested in this too.... THANKS
Title: Re: SMF Lottery Mod
Post by: DarthKayla on January 15, 2009, 10:57:14 am
To run it manually, you only need to open the file LotteryDraw.php
Title: Re: SMF Lottery Mod
Post by: kyawhein on April 11, 2009, 07:57:46 am
Hello.. i hve one error.
My members bought ticket and submit numbers. Every week end (at Friday) . whenever i draw the ticket and found member submit member but system show Nobody won.
How can i fix?
Title: Re: SMF Lottery Mod
Post by: slackerpunk on May 30, 2009, 09:16:11 am
is there a way to edit the amount of prize manually not going to the database?
Title: Re: SMF Lottery Mod
Post by: paul^ on June 07, 2009, 05:39:53 am
how do i open the LotteryDraw.php file
Title: Re: SMF Lottery Mod
Post by: eddieG on July 16, 2009, 03:36:37 pm
This is a pretty good mod.. but no one seems to know how to explain the little cron job thing so I have no choice but to stop using it.
Title: Re: SMF Lottery Mod
Post by: randommaker on August 18, 2009, 06:41:41 am
How do you install this mod?
Title: Re: SMF Lottery Mod
Post by: iShot on September 21, 2009, 03:06:54 pm
Dearest programmer,

I've looked true your entire topic but didn't found the following:
I'm using SMF 1.1.10 with TinyPortal (latest) and SMF Shop (latest)

I've tried to install SMF Pets but failed, and now that I have Lottery installed the link didn't show up in the shop menu, so I placed it there myself. Now what are the links to the admin section of the lottery so I can adapt that as well?

- Thanks in advance
-- iShot
Title: Re: SMF Lottery Mod
Post by: Dawni on October 16, 2009, 04:13:46 pm
This is a pretty good mod.. but no one seems to know how to explain the little cron job thing so I have no choice but to stop using it.

I think the cron job should look like this:

Command entry to run: /usr/bin/php -q  /home/YOURINFO/public_html/Sources/shop/LotteryDraw.php > /dev/null

(http://i75.photobucket.com/albums/i283/BassChick98208/lotteryCron.jpg)
Title: Re: SMF Lottery Mod
Post by: Tucayo on May 20, 2010, 03:40:27 am
I installed the mod like a month ago, and no drawings haev occured. the mod files have not been modified, so they should be happening every 6 days, but they wont..... Why can this be?
Title: Re: SMF Lottery Mod
Post by: Tucayo on May 29, 2010, 05:56:23 am
Hi?
Title: Re: SMF Lottery Mod
Post by: Killer Uchiha on June 16, 2010, 07:02:35 am
as I install it on smf 2.0 rc3
Title: Re: SMF Lottery Mod
Post by: hcfwesker on August 21, 2010, 03:00:52 am
I'm afraid there may not be support left for this addition.  I had this going on my forum, but members weren't interested, now they are, so I re-Installed it, but getting this error when going to the Lottery section in Shop.

Database Error
Table 'brawldom_website.smf_lottery_win' doesn't exist
File: /home/brawldom/public_html/Sources/shop/Shop-Lottery.php
Line: 32

I'm lost on what to do.

Title: Re: SMF Lottery Mod
Post by: WhiteEagle on February 20, 2011, 07:33:26 am
Using this with the latest edition of the shop and SMF 2.0 RC5 (emulating RC3).

I see Error: Could not create instance of 'Lottery' item!

How do I fix said error? Thanks in advance!

Fixed the error!
Title: Re: SMF Lottery Mod
Post by: shuban on March 26, 2011, 11:56:08 am
When I run the file manually, I get this damn error:

Warning: require_once(SSI.php) [function.require-once]: failed to open stream: No such file or directory in /home/biologyf/public_html/Sources/Load.php(2021) : eval()'d code on line 3

Fatal error: require_once() [function.require]: Failed opening required 'SSI.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/biologyf/public_html/Sources/Load.php(2021) : eval()'d code on line 3

Address: http://biology-forums.com/Sources/shop/LotteryDraw.php

What the hell does this mean and how do I correct it?
Title: Re: SMF Lottery Mod
Post by: ceylankral on June 09, 2012, 10:48:09 pm
projectyami is down.can anybody give me a direct download link?
Title: Re: SMF Lottery Mod
Post by: Kendrall on August 23, 2012, 10:46:03 am
Good evening everyone...

I'm currently attempting to install SMF Lottery Mod 1.0.1, using SMF Shop v.3.2.  My SMF forum that I'm using for testing purposes before putting any changes into production is version 2.0.2.  The only other mods I currently have installed are SimplePortal 2.3.5 and Member Awards 2.2.3.

When attempting to install the lottery mod, this is the error I encounter:

Fatal error: Call to undefined function db_query() in /home/.../public_html/izukoislandweyr/Packages/temp/LotterySQL.php on line 17

I have some familiarity with coding, but it's mostly limited to CSS and JavaScript.  However, looking over the source code in LotterySQL.php, I don't know why it's throwing this error when attempting to install the mod.  I've attempted to uninstall the mod, cleared my browser cache, even went so far as to try this from two different computers but still no go.

Attached is the exact copy of my LotterySQL.php for review.  I figure I could use an extra set of eyes to look this over, and I would be grateful for the help.

Thanks in advance...
Title: Re: SMF Lottery Mod
Post by: The Wizard on August 25, 2012, 01:54:02 am
Hello:

When they updated SMF 1.x to SMF 2.0.2 they changed the core of how SMF works. The designers of SMF created a variant off some of the database code, and you now how to use that instead of the basic php/mySeql code we all know and love. It's been driving me crazy this new design. The worst part is they have not documented exactly what the new changes do. Some of the mod developers are working on a manual now.

How do I know this? Simple I have been working on a mini gallery and graphic items for the shop mod to work with smf 2.0.2. I have been driving all the coders crazy asking questions and getting help from who I can. If you want the lottery mod/plugin to work your going to have to post the database code on SMF comunity and ask for help in changing it.

On the plus side I am almost finished designing the new min gallery code and should have something cool to use next week.

Dumb as it sounds the SMF Hacks Team updated the shop mod, but did not update any of the items/plugins.

I hope this helps.

Wiz
Title: Re: SMF Lottery Mod
Post by: Kendrall on August 25, 2012, 02:05:38 am
Hello:

When they updated SMF 1.x to SMF 2.0.2 they changed the core of how SMF works. The designers of SMF created a variant off some of the database code, and you now how to use that instead of the basic php/mySeql code we all know and love. It's been driving me crazy this new design. The worst part is they have not documented exactly what the new changes do. Some of the mod developers are working on a manual now.

How do I know this? Simple I have been working on a mini gallery and graphic items for the shop mod to work with smf 2.0.2. I have been driving all the coders crazy asking questions and getting help from who I can. If you want the lottery mod/plugin to work your going to have to post the database code on SMF comunity and ask for help in changing it.

On the plus side I am almost finished designing the new min gallery code and should have something cool to use next week.

Dumb as it sounds the SMF Hacks Team updated the shop mod, but did not update any of the items/plugins.

I hope this helps.

Wiz

Incidentally, one of the regulars over on SMF indicated this mod was probably for 1.1.x and was never upgraded for 2.0.x.  I was hoping that the original author of this script was still providing support, but that no longer appears to be the case.   Hopefully, one of the SMF Hacks Team can take a look and update this for 2.0.x, but otherwise I suppose I may not have any other alternative BUT to post the source code - as you suggested - and try to get help in making the necessary updates.
Title: Re: SMF Lottery Mod
Post by: Coolgem on March 29, 2013, 08:09:48 am
Links broken. Anyone have a working link? That would help.
Title: Re: SMF Lottery Mod
Post by: Lokitox on October 15, 2013, 06:37:12 am
Link broken..
Title: Re: SMF Lottery Mod
Post by: mali on June 18, 2016, 01:53:54 am
Links broken!!!
Title: Re: SMF Lottery Mod
Post by: next409 on November 24, 2016, 06:48:26 pm
I often get this error. It's not scary! Good luck)
1-855-865-9553 (http://reachcustomerservicenumber.com/sprint-customer-service/)