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=262901)

Trek 07-20-2011 07:57 PM

Glad you decided to make premium (cost associated) add-ons, but sad at the same time. ;)

nhawk 07-20-2011 08:08 PM

Quote:

Originally Posted by Trek (Post 2223003)
Glad you decided to make premium (cost associated) add-ons, but sad at the same time. ;)

It was actually a tough choice to make. It wasn't what I originally intended to do.

But now that the mysterious multiple winner bug seems to be squashed, people have a very strong base system to run raffles.

Any add-ons from here out would most likely be something only a few people want, or need. So, it made sense from that standpoint because the base code was becoming bloated with functions only some people use. ;)

Besides, the cost won't be outrageous. A pack of smokes and a cup of starbucks coffee in US $. :D

Trek 07-20-2011 09:08 PM

Quote:

Originally Posted by nhawk (Post 2223009)
Besides, the cost won't be outrageous. A pack of smokes and a cup of starbucks coffee in US $. :D

But I don't smoke or drink coffee... ;) Seriously though, it's a good thing, hope it get's ya more cash than hoping for donations does. =)

nhawk 07-21-2011 09:29 PM

Quote:

Originally Posted by mdelcour (Post 2223362)
So are there any plans on implementing this so that users can use a points system to purchase raffle tickets. For me, it's just not worth the legal hassles with using real cash.

It's already there..

Quote:

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 in forum sidebar and/or in 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)


Reycer 07-21-2011 09:49 PM

I apologize, I mistated my question. I meant to say, any way to get this to use with VBExperience?

nhawk 07-21-2011 09:55 PM

Quote:

Originally Posted by mdelcour (Post 2223369)
I apologize, I mistated my question. I meant to say, any way to get this to use with VBExperience?

If you know the name of the table for the point system, the name of the userid field in that table and the name of the points field in that table.. it will already work with that.

It is set up to work with any point system when those three items are known.

csavern 07-29-2011 04:32 AM

How do we go about adding this to cms ?

nhawk 07-29-2011 10:52 AM

Quote:

Originally Posted by csavern (Post 2226312)
How do we go about adding this to cms ?

What would you want in the CMS?

Just a widget to show what raffles are running?

csavern 07-29-2011 01:29 PM

yes same block that is on the forum side block

nhawk 07-29-2011 06:15 PM

Quote:

Originally Posted by csavern (Post 2226443)
yes same block that is on the forum side block

AdminCP->vBulletin CMS->Widgets

Click the "Create New Widget" button.

Widget Type = PHP Direct Execution
Title = Current Raffles
Description = Current Raffle List

Click "Save"

Click "Configure"

Paste this code in the box that comes up..

Code:

global $vbulletin;

if ($vbulletin->options['raffle_mode'] && $vbulletin->options['raffle_showsidebar'] && !is_member_of($vbulletin->userinfo, explode(',', $vbulletin->options['raffle_perms'])))
{
        $timenow = TIMENOW;
        $raffle_getactive = $vbulletin->db->query_read_slave("SELECT * FROM " . TABLE_PREFIX . "raffle
                        WHERE enddate > $timenow AND startdate <= $timenow
                        ORDER BY id DESC
                        ");

        if ($vbulletin->db->num_rows($raffle_getactive))
        {
                while($raffle = $vbulletin->db->fetch_array($raffle_getactive))
                {
                        if (is_member_of($vbulletin->userinfo, explode(',', $raffle['groupperm'])))
                        {
                                if($raffle_list)
                                {
                                        $raffle_list .= '<br />';
                                }
                                $raffle_list .= '<a href="raffles.php?' . $session[sessionurl] . 'do=raffle&id=' . $raffle[id] . '" title="' . $raffle[name] . '" />' . $raffle[name] . '<br />';
                                if($raffle['showimage'])
                                {
                                        if(empty($raffle['prizeimg']))
                                        {
                                                $raffle['prizeimg'] =  'images/raffles/default.gif';
                                        }

                                        $target =  $vbulletin->options['raffle_sidebar_maxpicture'];
                                        $picturesize = getimagesize($raffle['prizeimg']);
                                        $percentage = ($target / $picturesize[0]);
                                        $picture_width = round($picturesize[0] * $percentage);
                                        $picture_height = round($picturesize[1] * $percentage);
                                        $raffle_list .= '<img class="display" src="' . $raffle['prizeimg'] . '" width="' . $picture_width . '" height="' . $picture_height . '" alt="' . $raffle['name'] . '" border="0" /></a><br />';
                                }
                        }
                }
        }

        unset($raffle_getactive);

        $output = $raffle_list;   
}

Click "Save"

Then add the widget to the layout manager.


All times are GMT. The time now is 04:23 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.01564 seconds
  • Memory Usage 1,756KB
  • 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
  • (1)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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