vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Add-On Releases - Jujubins Lottery (https://vborg.vbsupport.ru/showthread.php?t=201437)

jujubins 01-10-2009 10:00 PM

Jujubins Lottery
 
1 Attachment(s)
Coder(s): jujubins (Nando)

Compatibility: 3.6.x, 3.7.x, 3.8.x

Product Info:
Files to upload - 2
Files to import - 1
Templates - 8
Plugins - 2
Phrases - 33

Languages:

English
Portuguese

Purpose:
Drawn awards for your forum users or if you want, just to one usergroup.

How it works:
The users whom have permission to participate, those who have more than "x" posts, registered before "y" and members of "z" group, can take one ticket for day, until the day you set your scheduled tasks of your forum to close the lottery and drawn. As soon as drawn, there will be a congratulation message to the winner and disseminating him.


Demo: http://forum.glords.com/lottery.php

Installing:
  1. Upload the files in the forum folder to your vBulletin root.
  2. Import the product_jlottery.xml via Product Manager system.
Upgrading:
  1. Upload the files in the forum folder to your vBulletin root.
  2. Import the product_jlottery.xml via Product Manager system.
Setting:
Go to Admin CP > vBulletin Options > Jujubins Lottery and type in the fields:
  • Enable: Set this option to yes to enable Jujubins Lottery.
  • Topic: Topic ID with details of the lottery.
  • Members Allowed: This option prevent new users to participate in the lottery. Only users before the date chosen could participate. Use Unix time.
  • Posts Required: Number of posts required to participate.
  • Usergroups Allowed: Usergroups allowed to participate. Separate with comma the usergroups.
  • Round tickets:Example:
    14 tickets will appear 20 tickets.
    34 tickets will appear 40 tickets.
  • Moderators: Now you can choose the moderator's group to reset in the lottery's page
  • Post the winner? Automatically post the winner in thread.
  • Poster userid: The userid that will post the congratulations.
  • Post message: Post message.
    Variables: {winner}, {ticket}, {hour} and {date}
To change the date of the lottery go to Admin CP> Scheduled Taks> Scheduled Task Manager> Jujubins Lottery and modify the fields of the Day of month, Hour and Minute.


Requirements:
PHP 4.3.3 and MySQL 4.0.16 or later.

History:
v0.5.0 - Dec 29. 2008
First Release
v0.7.0 - Dec 31. 2008
Added Phrases
Added option to reset when repeated the scheduled task
v0.7.1 - Jan 01. 2009
Correction in the variables of phrases
Correction in pharses
Added language in Portuguese
v0.8.0 - Jan 10. 2009
Added option to choose which usergroups can participate
Compatible with version 3.8.0
v1.0.0 - Jan 11. 2009
Added auto-link in the quick links, pop-up of community and navbar
Added option of types of drawn, "per day", "per drawn", "without limits"
v1.1.0 - Jan 12. 2009
Fixed: SQL table prefix
v1.2.0 - Jan 12. 2009
Added "see all" tickets link
Added option to enable link to see all tickets
v1.2.5 - Feb 1. 2009
Fixed: Show winners
v1.2.6 - Feb 6. 2009
Fixed: Winner link (member.php)
v1.2.6 - Feb 6. 2009
Fixed: Winner link (member.php)
v2.0.0 - Out 27. 2009
Re-writted the mod's intire code
Simplified code
SQL with fewer fields
2 new settings: Round tickets and moderators
Now you reset in lottery's page
Fixed: All known bugs
v2.1.0 - Out 29. 2009
Added: Automatic congratulations post in the thread (editable) (thanks paul41598)
Fixed: Some insignificant bugs
v2.1.1 - Out 30. 2009
Fixed: Posts limit (thanks pipibunny)
v2.1.3 - Out 30. 2009
Fixed: Usergroups colors in "See all" (thanks kalisekj)
Fixed: Links in menu (thanks kalisekj)
Fixed: Reset link to moderators (thanks kalisekj)
Fixed: Update version 2.0.0 to above will not reset your lottery (thanks kalisekj)

Quick support in english/portuguese: http://forum.glords.com/showthread.php?t=8927


Quote:

Originally Posted by jujubins (Post 1907194)
I apologize to everybody who have donwloaded and waited for the Jujubins Lottery's updates. Today, I've re-writted the mod's intire code, making it simplier and with an easy lecture. I've tested it and no bug was found, I ask for help for everyone of you to make it better.
I promise that, starting from today, I'll be giving support about the mod.

The version 2.0.0 have been lauched, and it's in the topic.



:)

GlamRockTalk 01-11-2009 08:38 PM

Demo has no permission for visitors.

Also, can you share in English?

jujubins 01-11-2009 09:17 PM

The default language is English.

Added screenshot in English.

cafenetland 01-12-2009 09:55 AM

Você não tem permissão para participar.

yeah i got that ??

do i have to register to see ur demo ?

adhmwagde 01-12-2009 10:02 AM

great but i have problem in SQL

PHP Code:

Invalid SQL:
SELECT FROM `jlotteryWHERE `userid` = AND `winner` = '1';

MySQL Error   Table '3omda.jlottery' doesn't exist
Error Number  : 1146
Request Date  : Monday, January 12th 2009 @ 02:01:20 PM
Error Date    : Monday, January 12th 2009 @ 02:01:20 PM
Script        : http://localhost/vb/lottery.php
Referrer      : http://localhost/vb/index.php 


adhmwagde 01-12-2009 10:17 AM

Not Supported !!!

RedeemedWarrior 01-12-2009 10:37 AM

15 minutes between your two posts? and you declare it unsupported?

R-D 01-12-2009 11:00 AM

Oh man, that's funny. I doubt even a paid modification would manage 15 minute support.

Looks like he just forgot to use the tableprefix when initially installing (and also uninstalling) the database table. A simple edit should fix it.

Note: It's probably best to uninstall before you make this change, then re-install the product again, otherwise the old db table probably won't be removed.

Open the product and find:
Code:

<codes>
                <code version="1.0.0">
                        <installcode><![CDATA[$db->reporterror = false;
$db->query("CREATE TABLE `jlottery` (
  `ticket` int(8) NOT NULL AUTO_INCREMENT,
  `userid` varchar(500) NOT NULL,
  `username` varchar(500) NOT NULL,
  `email` varchar(500) NOT NULL,
  `usertitle` varchar(500) NOT NULL,
  `time` int(10) NOT NULL,
  `day` int(2) NOT NULL,
  `winner` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ticket`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1");
$db->reporterror = true;]]></installcode>
                        <uninstallcode><![CDATA[$db->reporterror = false;
$db->query("DROP TABLE `jlottery`");
$db->reporterror = true;]]></uninstallcode>
                </code>
        </codes>

Replace with:
Code:

<codes>
                <code version="1.0.0">
                        <installcode><![CDATA[$db->reporterror = false;
$db->query("CREATE TABLE " . TABLE_PREFIX . "jlottery (
  ticket int(8) NOT NULL AUTO_INCREMENT,
  userid varchar(500) NOT NULL,
  username varchar(500) NOT NULL,
  email varchar(500) NOT NULL,
  usertitle varchar(500) NOT NULL,
  time int(10) NOT NULL,
  day int(2) NOT NULL,
  winner int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (ticket)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1");
$db->reporterror = true;]]></installcode>
                        <uninstallcode><![CDATA[$db->reporterror = false;
$db->query("DROP TABLE " . TABLE_PREFIX . "jlottery");
$db->reporterror = true;]]></uninstallcode>
                </code>
        </codes>


jujubins 01-12-2009 12:29 PM

@cafenetland:
My demo is being used in a draw. If someone who has installed and doesn't use the Jujubins Lottery, please post a demo link for me to post here.

@adhmwagde:
Fixed.

beduino 01-12-2009 05:07 PM

Congrats jujubins!
Installed ! :)
all the best
beduino

jujubins 01-12-2009 08:46 PM

Updated

v1.2.0 - Jan 12. 2009
Added "see all" tickets link
Added option to enable link to see all tickets

Idawg 01-14-2009 07:34 PM

How often does it draw??

Nevermind, saw it in the initial post LOL

sparky5693 01-18-2009 08:48 PM

I currently hold a manually done lottery for new members. I have a drawing monthly for users that registered that month, and have 25 or more posts. Can this handle that? From what I read, it sounds like the exact opposite.

edermix 01-18-2009 09:51 PM

Very good boy. Is installed on my forum and I'm enjoying.

Excellent!

iBardia 01-18-2009 10:40 PM

Could this work for contests?

jujubins 01-19-2009 04:47 PM

@sparky5693
It's what you do.

@iBardia
Sure.
I did for this.

dxflw 01-23-2009 11:59 AM

you have PM

dxflw 01-25-2009 12:21 AM

if i have a winner how i show it?
I have set the shedulled task to (example) 4:15 for today and i wait to view the winner in the thread of the lottery but nothing.
I have all ready set the minimum post to 10 ,allowed usergroups 2,6 and and for topic 3914.

I need litle help please.
Thanks nice Hack!

jujubins 01-25-2009 03:51 PM

Quote:

Originally Posted by Jujubins
To reset the draw you need to run two times the product scheduled task, but if you already have a winner, you just need to run once.

You did that?

dxflw 01-25-2009 08:54 PM

no,i will check this out.

VFKWorld09 01-28-2009 11:40 PM

When I set the lotto up on my forum, and the schedule task was preformed, it still showed the "Take a Ticket", but the person who won, it showed they won. Is this a bug or something?

jujubins 02-01-2009 05:01 PM

Quote:

Originally Posted by VFKWorld09 (Post 1727659)
When I set the lotto up on my forum, and the schedule task was preformed, it still showed the "Take a Ticket", but the person who won, it showed they won. Is this a bug or something?

v1.2.5 - Feb 1. 2009
Fixed: Show winners

:)

marianoblesa 02-06-2009 12:46 AM

Hello

Here is a small bug when the winner of the draw.

Code:

http://www.miforo.net/user.php?u=X
Should be

Code:

http://www.miforo.net/member.php?u=X
As exchange rate?

Thanks

jujubins 02-06-2009 11:29 PM

Quote:

Originally Posted by marianoblesa (Post 1735666)
Hello

Here is a small bug when the winner of the draw.

Code:

http://www.miforo.net/user.php?u=X
Should be

Code:

http://www.miforo.net/member.php?u=X
As exchange rate?

Thanks

Thanks.

v1.2.6 - Feb 6. 2009
Fixed: Winner link (member.php)

marianoblesa 02-07-2009 01:24 AM

Quote:

Originally Posted by jujubins (Post 1736600)
Thanks.

v1.2.6 - Feb 6. 2009
Fixed: Winner link (member.php)

Thanks.

dxflw 02-09-2009 03:11 PM

Warning: array_fill() [function.array-fill]: Number of elements must be positive in [path]/includes/cron/lottery.php on line 19

Warning: array_rand() [function.array-rand]: First argument has to be an array in [path]/includes/cron/lottery.php on line 20

I get this if i try to reset the shedulled rask after upgrage to 1.2.6!!

My board 3.7.3

Artes_Marciales 02-12-2009 08:56 AM

Amazing!!!

Noblefist 02-15-2009 01:16 AM

Q: Have it installed and is working ok, I would like to post the results in a thread or group, At a loss on how to do this. Kind of a newbe admin for our guild, and new to vB. BTW: this rocks.

sparky5693 02-15-2009 10:27 PM

I see how to reset the lottery, but it still shows the number of tickets from the previous drawing. Shouldn't it discard all the old tickets? As it currently is, the "statistics" can actually list members that aren't part of the current lottery.

sparky5693 02-15-2009 10:49 PM

Is it possible to allow members who aren't part of the lottery see who won?

pipibunny 02-23-2009 04:49 AM

I installed it. But I had a error.

When a new person access to lottery, it's display "Only members registred before of 13:47 of the date 23/02/2009 and have 0 posts can participate. ". But I disable Members Allowed funtion.

jujubins 02-23-2009 02:30 PM

No, you not disabled.
To disable you need set 0.

pipibunny 02-24-2009 01:05 AM

Dear Jujubins,

I had set 0 in function but it didn't work. Pls see image

http://img11.imageshack.us/img11/2169/lottery.jpg

cynthetiq 02-27-2009 03:23 AM

Quote:

Originally Posted by sparky5693 (Post 1745366)
I see how to reset the lottery, but it still shows the number of tickets from the previous drawing. Shouldn't it discard all the old tickets? As it currently is, the "statistics" can actually list members that aren't part of the current lottery.

Quote:

Originally Posted by sparky5693 (Post 1745386)
Is it possible to allow members who aren't part of the lottery see who won?

I have the same questions.

Also, is it possible to make it so that they need to post once that day to get the ticket for the day?

itsIAN 03-02-2009 12:23 AM

I have similar questions as well.

Whenever I clear the lottery it saves the tickets from last week. Though it wasn't hard just going into the database and deleting them, shouldn't this be automatic?

Also, I noticed it keeps counting up in the ticket numbers. Maybe I'm wrong, but shouldn't it start over for each week?

DobieGillis? 03-04-2009 06:16 PM

Quote:

Originally Posted by itsIAN (Post 1758111)
I have similar questions as well.

Whenever I clear the lottery it saves the tickets from last week. Though it wasn't hard just going into the database and deleting them, shouldn't this be automatic?

Also, I noticed it keeps counting up in the ticket numbers. Maybe I'm wrong, but shouldn't it start over for each week?

yep, still bugged rendering this thing useless

kaderith 03-15-2009 10:55 PM

I'm having the same issue reported by 'pipibunny'

The script is set to "0" for both the Members Allowed and Posts Required options, so that it should allow all members who are registered on the forum (and I do have my user groups set correctly) to take part however, even though its set for 0 posts, its not letting people get a ticket until they've posted at least once on the board.

Which is in turn, causing a great deal of irritation for me since I'm being bombarded with complaints.

marianoblesa 03-16-2009 04:09 PM

How good would be possible if it is not much trouble to add the option to delete all tickets in the database or set to 0.

Thank you.

kaderith 03-18-2009 02:41 AM

I reset the drawing after its first use following the directions as listed. Now, I'm sitting here trying to pick a winner for tonight.. and it isn't working. At all.

Rob Hephner 03-23-2009 05:10 PM

I can't figure out how to clear tickets from the previous lottery, it seems they just stay.

How can I make it start with a clean slate each time.

Thanks


All times are GMT. The time now is 07:34 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.01431 seconds
  • Memory Usage 1,843KB
  • 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
  • (6)bbcode_code_printable
  • (1)bbcode_php_printable
  • (8)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
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete