vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Add-On Releases - vBulletin Raffles (https://vborg.vbsupport.ru/showthread.php?t=265536)

nhawk 06-19-2011 10:00 PM

vBulletin Raffles
 
THIS ADD-ON IS NO LONGER AVAILABLE AND IS NOT SUPPORTED

NOTE: This add-on is designed for use with vBulletin 3.8.6 or higher. It may not work with earlier versions of vBulletin.

Raffles, giveaways, and contests, whatever you wish to call them, are a great way to increase traffic on any forum.

This is a port of my Raffle add-on for vBulletin 4.1.x to vBulletin 3.8.x. For the 4.1.x version see this thread.. https://vborg.vbsupport.ru/showthread.php?t=262901

Features:
  • Define a different prize image for each raffle.
  • Set raffle rules on a per raffle basis.
  • Set raffles to start in the future or on the day you create the raffle.
  • Allow One or more entries per user.
  • Allow multiple entries at one time if desired.
  • Admin settable time delay between user entries.
  • One or more prizes per raffle.
  • One or more winners per raffle (multiple winners require multiple prizes).
  • Allow members to win multiple times in one raffle if desired.
  • Display winning 'ticket' numbers if desired.
  • Selectable usergroups
  • Post count limit if desired.
  • Require Human Verification if desired.
  • Will show in Community Menu if desired.
  • Show active raffles what's going on.
  • Automatic raffle draw via vBulletin scheduled tasks.
  • Manual raffle draw to override end date and/or scheduled draws.
  • Turn raffles on or off via admincp. (Only raffle admins can view raffles when they are turned off)
  • Support for just about any credit system such as vBCredits II, ICash, kBank and vbBux.
  • Support for AW Coding's Credit Purchase System so member can purchase "raffle tickets".
  • XHTML 1.0 Transitional validated (provided your current template passes the tests)

NOTE: Except for bug fixes, this mod is no longer being updated. I strongly suggest upgrading to vB 4.

* DISCLAIMER *
----------------
Laws about how raffles should be handled vary from location to location. Be sure to check with local authorities and to comply with any laws that may apply to you. The author of this add-on can not be held responsible if the use of this add-on results in any violation of local laws.
By downloading this add-on, you agree to abide by local laws and to hold the author of this add-on harmless for any damages that may occurr from the use of this add-on.

* INSTALLATION *
------------------
1) If you intend to use AW Coding's Credit Purchase System with the Raffle System, install the Credit Purchase System FIRST.

2) Upload the contents of the 'upload' folder to your forum's root.
(If your forum's location is http://www.example.com/forums/, the root is /forums/)
(If your forum's admincp is named something other than admincp, upload raffleadmin.php to your renamed admincp folder.)

3) Import the product XML file (product-raffles.xml) into the Product Manager in AdminCP.

4) If you want to view raffles on your site while the raffle system is turned off, go to AdminCP -> Usergroups -> Administrator Permissions select yourself and set "Can Admin Raffles" to 'Yes'.

5) Anyone you want to be able to administer raffles on your site must also have Administrator Permissions and have "Can Admin Raffles" set to 'Yes' or they will not be able to administer raffles.

6) Take some time to set the options in Raffle Settings.

7) Set up a raffle.

8) Make sure this add-on is marked as 'Installed' on vBulletin.org!
(If you want to get notices from me about updates for this add-on.)

* UPGRADE INSTRUCTIONS *
-----------------------------
1) Upload the contents of the 'upload' folder to your forum's root.
(If your forum's location is http://www.example.com/forums/, the root is /forums/)
(If your forum's admincp is named something other than admincp, upload raffleadmin.php to your renamed admincp folder.)

2) Import the product XML file (product-raffles.xml) into the Product Manager in AdminCP and be sure 'Allow Overwrite' is set to 'Yes'.

* USING RAFFLES *
-------------------
The whole system is pretty self explanatory, but there are a few things to keep in mind...

1) A default raffle image is supplied with the add-on. You must always supply an image for your raffles. You may change the default image if you like.

2) The entry period for raffles always end at 12:00am (midnight) on the day the raffle is to be drawn. (ie: Draw date is set 12/21/2011.. members can enter through 12/20/2011, the moment the date changes to 12/21/2011 no more entries are possible)

3) The scheduled task to draw the raffles is set to take place at 10:00am the day the raffle is to be drawn. You may change this by going to AdminCP->Scheduled Tasks->Scheduled Task Manager, find "Draw raffles", click on Edit and change the time of the draw to what you want it to be.

4) There are replacement variables used in several phrases. These are what the variables are:

raffle_agree: {1} = Forum name
raffle_eligible: {1} = Forum name {2} = Raffle name
raffle_message_body: {1} = Raffle name {2} = Draw date
raffle_message_close: {1} = Raffle admin name {2} = Phrase (raffle_admin_title)
raffle_message_salute: {1} = Winner name
raffle_recent: {1} = Time remaining before a user can enter again
raffle_winner_multi: {1} = Winner names for multiple raffle winners {2} = Raffle name
raffle_winner_one: {1} = Winner name for single raffle winner {2} = Raffle name'

More replacement variables are in the read.me included with this add-on.

5) When adding a custom user profile field for this add-on, be sure to 'Private Field' is set to 'Yes' and 'Field Searchable on Member List' is set to 'No'.

6) If you don't want to have Raffles in the community menu, you can use a forum link to raffles.php.

* History (Changelog) *
-------------------------
1.1.2 (October 6, 2011) (No need to import the xml file when upgrading from 1.1.0 or 1.1.1 to 1.1.2, just upload files to server.)
- Removed all direct mysql queries due to some systems having trouble with them.
- Corrected cpnav xml file (was showing an add-on option).

1.1.1 (October 5, 2011) (No need to import the xml file when upgrading from 1.1.0 to 1.1.1, just upload files to server.)
- Fix display of html on Edit Raffles screen.
- Improved user entry list function in AdminCP.
- Fix database warnings on some systems.
- Fix raffle ticket purchase link for AWCoding Credit Purchase System Pro.
- Fix detection of AWCoding Credit Purchase System Pro.

1.1.0 (August 1, 2011)
- Restored missing AWCPS patch in install script.
- Code enhancements for future expansion.

1.0.9 (July 20, 2011)
- Moved 'Allow Multiple Wins' from main settings to individual raffle settings. (user requested)

1.0.8 (July 16, 2011)
- Added Debug Logging option to raffle system.

1.0.7 (July 15, 2011)
- MAJOR FIX - Fix raffle draw so no duplicates happen when allow multiple wins is set to no.
- Add PM to raffle admin if no members enter a single prize raffle.

1.0.6 (July 13, 2011)
- Fix - Raffle not being drawn by scheduled task.

1.0.5 (July 11, 2011)
- Fix - members can no longer enter multiple times by using the back button on their browser.

1.0.4 (July 6, 2011)
- Fix Allow multiple wins to one member now works.
- Fix database error when no members enter raffle.
- Removed un-needed left joins in some DB queries that were needed in original release.

1.0.3 (July 4, 2011)
- Installation script change for systems not fully importing the parse templates plugin.
- Fix raffle draw time now displays in members's usercp chosen time zone format.
- Fix error in scheduled task when multiple prizes are awarded.
- Changed copyright so it only displays on raffle pages.

1.0.2 (June 27, 2011)
- Minor bug fix of active raffles in What's Going On area (was not collapsing properly).

1.0.1 (June 22, 2011)
- Converted missed 'view entries' from 4.x to 3.8.x format.

1.0. (June 20, 2011)
- Initial release for vBulletin 3.8.6.

* Known Working on vB Versions *
------------------------------------
3.8.6
3.8.7 PL 1

MagicThemeParks 06-20-2011 02:23 PM

YES! :)

Gonna give this one a try this week. Thanks for sharing! :up:

FreshFroot 06-21-2011 05:36 AM

Looks good will test it out :D

nascartr 06-21-2011 12:23 PM

When I test it and try to see who has entered I get this error.

Fatal error: Call to undefined function render_navbar_template() in /home/nascartr/public_html/community/raffles.php on line 670

nhawk 06-21-2011 01:15 PM

Quote:

Originally Posted by nascartr (Post 2210835)
When I test it and try to see who has entered I get this error.

Fatal error: Call to undefined function render_navbar_template() in /home/nascartr/public_html/community/raffles.php on line 670

Thank you, I missed that conversion.

For now, don't allow viewing of entries. I'll post an update as soon as I can to correct the problem.

Just so you know, I would normally post an update for this within minutes. But, my dev server's power supply took out the motherboard and I'm waiting for replacements. They should be here tomorrow. So, an update will come in the next day or two.

biftek 06-22-2011 12:22 AM

thanks been looking for something like this , will be giving it a burl on my site

EddyMaxx 06-22-2011 01:28 PM

Working good on 3.8.7 P1. Just need to fix the error as mentioned by nascartr.

Nice job!

nhawk 06-22-2011 03:35 PM

Quote:

Originally Posted by nascartr (Post 2210835)
When I test it and try to see who has entered I get this error.

Fatal error: Call to undefined function render_navbar_template() in /home/nascartr/public_html/community/raffles.php on line 670

Fixed today with version 1.0.1.

MentaL 06-23-2011 12:53 PM

very nice!

/EDIT

It appears the mod is incompatible with vbseo and this; https://vborg.vbsupport.ru/showthread.php?t=218773

Shame :(

nhawk 06-23-2011 01:29 PM

Quote:

Originally Posted by MentaL (Post 2211745)
very nice!

/EDIT

It appears the mod is incompatible with vbseo and this; https://vborg.vbsupport.ru/showthread.php?t=218773

Shame :(

A little more info would be helpful. To come in and say something is incompatible with something else provides very little information to fix or locate the problem.

The plugin you show (Colors For Usergroup In Forum Last Post) should have no effect on mine and mine should have no effect on it. The Raffle system does not write or access any posts or threads, anywhere, at any time. (Edit: I just tested it on 3.8.6 with that plugin. Both work.)

And what exactly happens with vbseo?

nascartr 06-24-2011 01:41 AM

I'm using it and have vbseo installed and see no conflict?

klaush 06-24-2011 12:33 PM

Works like a charme and has no known conflict with vbseo.

Thanks for this great stuff!

bada_bing 06-24-2011 07:08 PM

tagged....

MentaL 06-25-2011 01:19 PM

Top left (Disabled) = Homepage
Top right (Disabled) = Thread
Bottom left (Enabled) = Homepage
Bottom right (Enabled) = Thread

User-name markups are disabled on the forum home and when viewing a thread css outputs are corrupted.

https://vborg.vbsupport.ru/attachmen...1&d=1309011581

nhawk 06-25-2011 01:49 PM

Quote:

Originally Posted by MentaL (Post 2212579)
Top left (Disabled) = Homepage
Top right (Disabled) = Thread
Bottom left (Enabled) = Homepage
Bottom right (Enabled) = Thread

User-name markups are disabled on the forum home and when viewing a thread css outputs are corrupted.

I would be looking elsewhere. As I said, the username markups work on a 3.8.6 install with just that mod and the Raffle system. And others have posted that the Raffle system works fine with vBSEO.

And there is nothing in the Raffle system that touches the Thread display CSS, or even connects to the thread/post system in vBulletin.

I am now installing 3.8.7 to double check that version. I don't think the result will be any different than 3.8.6.

EDIT: As suspected, the username markups work with Raffles on a fresh vB 3.8.7 install without any problems. I suggest looking at your other mods to see what is interfering with them. Or what might be changing the install for the raffle system. I don't know if such a thing exists, but if you have a mod that includes all css styles globally, that could be the culprit. Even then I wouldn't think that would cause a problem because the raffle css styles are only used in the raffle system. Not on other pages.

You also have an abundance of HTML errors on your site that could be affecting performance (53 Errors, 12 warnings on the page where you show the post example alone). Among the errors are missing end tags and a style element in the body of your site. That is a no-no, and could cause cascading effects.

See this validation report: http://validator.w3.org/check?uri=ht...Inline&group=0

Until you can correct all of the HTML errors on your site and establish exactly what other mod is interfering with the Raffle system, I can't even begin to work on a fix. The only thing I know for certain is that username markups and the Raffle system work together on vB 3.8.7 without a problem. And that others running vBSEO on their systems aren't having any problems.

MentaL 06-25-2011 09:53 PM

Hi

I use a custom admincp address and the setup required me to edit my location , that may have intervened. If you wish to test my method simply rename admincp to say admincp123 and edit the admincp url in the product to admincp123 and import.

Regards.

nhawk 06-26-2011 10:39 AM

Quote:

Originally Posted by MentaL (Post 2212792)
Hi

I use a custom admincp address and the setup required me to edit my location , that may have intervened. If you wish to test my method simply rename admincp to say admincp123 and edit the admincp url in the product to admincp123 and import.

Regards.

So long as the new name for admincp is properly defined in config.php, there would have been no need to edit the installation file. The installation automatically picks up the location of admincp.

You have other problems with your site that just rear their ugly heads when you install raffles. It isn't the raffle system causing them, it is just revealing them. Correct all of the HTML errors and I would bet your problems go away.

To test it, temporarily switch to the default skin, turn off all other mods and customizations except raffles and you'll find it's working fine. Turn on your other mods/customizations one at a time and correct the ones that are causing problems. If a conflict is found with raffles, let me know exactly what the conflict is and I'll correct it. But from what I can tell, what you're showing in your screenshot is all HTML errors most likely cause by an unclosed <table> tag and possibly other errors in the HTML for the pages.

MentaL 06-26-2011 12:30 PM

I don't define the admincp location on the configuration as a security prevention. I'll do a few tests later and report back.

Cheers.

tommydamic68 06-26-2011 01:22 PM

Does not install completely, say please finish installing all items etc. hmmm, weird, i ftp'd all folders to the root directory, will not take the xml...? i too have a different name for my admincp if that would make the difference.

nhawk 06-26-2011 01:40 PM

Quote:

Originally Posted by tommydamic68 (Post 2213001)
Does not install completely, say please finish installing all items etc. hmmm, weird, i ftp'd all folders to the root directory, will not take the xml...? i too have a different name for my admincp if that would make the difference.

If your admincp is named something other than admincp, upload raffleadmin.php to that folder.

So instead of..

admincp/raffleadmin.php

you would have

youradmincpname/raffleadmin.php


EDIT: If you do that and your admincp is not properly defined in config.php then you are on your own. I can't support and diagnose improperly configured or totally custom systems.

tommydamic68 06-26-2011 02:36 PM

worked! thanks! how do you change color etc. html ?

MentaL 06-26-2011 06:36 PM

Disabled all plugins and still no joy. Strange.

nhawk 06-27-2011 10:03 AM

Quote:

Originally Posted by tommydamic68 (Post 2213020)
worked! thanks! how do you change color etc. html ?

By editing the raffle templates and css.

nhawk 06-27-2011 07:53 PM

For those that downloaded v1.0.2 in the past few minutes, please download again. I included a wrong file in the first upload.

Sorry about that. :(

MentaL 06-29-2011 09:59 PM

Great mod now that I got it working. Two suggestions.

- When inside the raffle (raffles.php?do=raffle&id=1) there is no table backround, it would look better with one.
- When viewing the users who have entered (raffles.php?do=entries&id=1) there is also no table backround.

Food for thought.

dizzynation 07-01-2011 03:12 AM

getting this at the bottom of my "raffle edit page"

Database error in vBulletin 3.8.7:

Invalid SQL:
SELECT currencyid, title FROM credits_currency
ORDER BY currencyid ASC;

MySQL Error : Table 'cvf.credits_currency' doesn't exist
Error Number : 1146
Request Date : Thursday, June 30th 2011 @ 10:09:52 PM
Error Date : Thursday, June 30th 2011 @ 10:09:53 PM
Script : [url
Username : Nick
Classname : vB_Database
MySQL Version : 5.0.77

nhawk 07-01-2011 10:31 AM

Quote:

Originally Posted by dizzynation (Post 2215295)
getting this at the bottom of my "raffle edit page"

Database error in vBulletin 3.8.7:

Invalid SQL:
SELECT currencyid, title FROM credits_currency
ORDER BY currencyid ASC;

MySQL Error : Table 'cvf.credits_currency' doesn't exist
Error Number : 1146
Request Date : Thursday, June 30th 2011 @ 10:09:52 PM
Error Date : Thursday, June 30th 2011 @ 10:09:53 PM
Script : url/options.php?do=options&dogroup=raffle
Referrer : url/admincp/options.php?null=0
IP Address : XX.XXX.XXX.XXX
Username : Nick
Classname : vB_Database
MySQL Version : 5.0.77

That's not the raffle edit page, that should be from the raffle settings page.

What credit system are you running on your system?

It looks like one that isn't supported and is using the same product ID as vBCredits. Either that, or you're running vBCredits and changed the table name for the vBCredit system.

dizzynation 07-01-2011 10:03 PM

I only have VBcredits, and casino. Is this my problem?

nhawk 07-02-2011 09:40 AM

Quote:

Originally Posted by dizzynation (Post 2215647)
I only have VBcredits, and casino. Is this my problem?

Hmm.. the default database table for vBCredits is 'credits_currency'. I don't think that would change between versions.

Let me contact Darkwaltz to see what the problem might be. He's usually very helpful when it comes to other mods interfacing with vBCredits.

It might take a while for an answer, so just hang in there and when I hear something I'll let you know.

But, do you have a link to the Casino mod? I can't find one for vB 3.8. Or, is this the one you're using?.. https://vborg.vbsupport.ru/showthrea...ghlight=casino

nhawk 07-04-2011 10:16 AM

Quote:

Originally Posted by dizzynation (Post 2215647)
I only have VBcredits, and casino. Is this my problem?

I received a reply from Darkwaltz4.

The credits_currency table is only in vBCredits II.

Therefore, the system does not support older versions of vBCredits.

You can always upgrade to the new versions of vBCredits..

https://vborg.vbsupport.ru/showthread.php?t=245952

Sorry about the confusion and I've updated the info in the Raffle product description.

viper357 07-08-2011 07:14 AM

This looks nice, will install it a bit later, just one question please.

I run a marine aquariums forum and I want to hold a raffle where you are only allowed to enter if you upload a photo of your fish tank, is there any way this mod could do something like that?

Thanks.

nhawk 07-08-2011 10:00 AM

Quote:

Originally Posted by viper357 (Post 2218064)
This looks nice, will install it a bit later, just one question please.

I run a marine aquariums forum and I want to hold a raffle where you are only allowed to enter if you upload a photo of your fish tank, is there any way this mod could do something like that?

Thanks.

Not on it's own it can't.

But, if you somehow move the person that uploads a photo to a different user group. Then the raffle could be restricted to that usergroup.

viper357 07-08-2011 11:32 AM

Ok, thanks, I'll try work something out.

nascartr 07-10-2011 06:18 AM

Alright, I'm allowing one entry per day in a 30 day raffle for a maximum of 30 entries and received this from a member.

Quote:

Ok since you have switched the contest to being able to enter once per day during the month I have discovered one flaw that allows people to enter multiple times a day but still only up to the allowed 30 entries per person. If you hit the submit entry button but don't wait for it to transfer you away from the "thank you for entering the contest next page will load soon"(I forget the exact wording) but hit the back button you can continue to submit over and over again as many times as you want in one day but the next day if you did it 30 times it won't allow you to enter more times.


Just thought I would inform you just incase you didn't already know.

nhawk 07-10-2011 12:56 PM

Quote:

Originally Posted by nascartr (Post 2218801)
Alright, I'm allowing one entry per day in a 30 day raffle for a maximum of 30 entries and received this from a member.

Thank you.

A fix should be out some time next week.

Abu2 07-12-2011 08:21 PM

It doesn't draw. Cron doesn't work on the latest version (104)

nhawk 07-13-2011 03:15 PM

Quote:

Originally Posted by Abu2 (Post 2219769)
It doesn't draw. Cron doesn't work on the latest version (104)

Check the vB 3.8.x mods at www.snogssite.com, the fix is already posted there.

It will follow here soon.

viper357 07-13-2011 07:11 PM

Quick question just to clarify, if I have 3 prizes to give away and I enter the number 3 into the "Number of Prizes" field, can I assume that it will then have 3 draws with 3 winning ticket numbers? Thanks.

An awesome feature would be if it created a thread announcing the winners once the draw had been completed. I would pay for that feature. ;)

Thanks for the great mod.

nhawk 07-14-2011 01:20 PM

Quote:

Originally Posted by viper357 (Post 2220166)
Quick question just to clarify, if I have 3 prizes to give away and I enter the number 3 into the "Number of Prizes" field, can I assume that it will then have 3 draws with 3 winning ticket numbers? Thanks.

An awesome feature would be if it created a thread announcing the winners once the draw had been completed. I would pay for that feature. ;)

Thanks for the great mod.

Yes, if you set the number of prizes to 3, then there will be 3 winners on the draw date.

However, if you set 'Allow One Member Multiple Wins' to 'No' in Raffle Settings and don't have enough entries to give away all 3 prizes, the raffle will not draw. That is unusual, but it can happen.

Winners are listed for the raffle after it's drawn. Just be sure to set 'Show Raffles Already Drawn' to 'Yes' in Raffle Settings.

viper357 07-15-2011 02:46 PM

This is not working, I ran a test raffle, 3 prizes, 6 people entered, and the same person won all 3 prizes with the same ticket number, with "Allow One Member Multiple Wins" set to No.


All times are GMT. The time now is 05:26 PM.

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.01462 seconds
  • Memory Usage 1,868KB
  • 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
  • (15)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