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)

fishmaster 08-06-2011 01:52 AM

Dohhhhh....

Reycer 08-15-2011 03:29 AM

Everything has been working fine until tonight when it pulled a raffle here was the results.

Nxxx Mxxx (Ticket #13), Debj (Ticket #3), Michael (Ticket #12), achantrenne (Ticket #11), Lynette (Ticket #15), ladybigg (Ticket #9), Lynette (Ticket #15), MrBill (Ticket #7), MrBill (Ticket #7), Lynette (Ticket #15), tedcrosby (Ticket #2), achantrenne (Ticket #11)

Notice the multiple winners? Any idea why it would do this?

nhawk 08-15-2011 10:15 AM

Without a screenshot of your scheduled task log for that draw (which is hopefully in debug mode), I have no clue because in versions newer than 1.2.2 that was fixed. Did you set 'Multiple Wins' to No in the raffle itself? That setting moved to individual raffle settings in 1.2.6. How many prizes were to be awarded? How many members entered? Was more than one raffle drawn at that same time?

Also, was this a manual draw or a scheduled task draw?

I've been running an perpetual test raffle on my site that draws daily and have not seen a multiple winner in over 100 draws. The last 28 are posted on my site.

Also, you've made it even more dificult for me to check things by removing the copyright for the add-on. I went to simply double check what version you were running and the copyright isn't there for me to establish that.

Reycer 08-15-2011 07:01 PM

Quote:

Originally Posted by nhawk (Post 2233706)
Without a screenshot of your scheduled task log for that draw (which is hopefully in debug mode),

I have no clue because in versions newer than 1.2.2 that was fixed. Did you set 'Multiple Wins' to No in the raffle itself?

Yes, multiple wins was set to NO

That setting moved to individual raffle settings in 1.2.6. How many prizes were to be awarded?

12 Prizes was awarded.

How many members entered?

There were about 50 entries, with 12 winners.

Was more than one raffle drawn at that same time?

No, this was the only one going on.

Also, was this a manual draw or a scheduled task draw?

Scheduled task draw

I've been running an perpetual test raffle on my site that draws daily and have not seen a multiple winner in over 100 draws. The last 28 are posted on my site.

Also, you've made it even more dificult for me to check things by removing the copyright for the add-on. I went to simply double check what version you were running and the copyright isn't there for me to establish that.

I didn't remove any copyright. I don't do that to people. The only thing in the copyright that has been removed from me was the Vbulletin Version. ;) Edit: I just searched all of the files for the raffle and found a reference to a copyright in raffles.php however there isn't one in the raffle phrases. If there is supposed to be one, there is no problem on my part for it being shown, however there simply isn't one. I uploaded my raffles.php file directly from my server. Here you can see that the copyright is still there as well as the version number.

Reycer 08-15-2011 07:07 PM

Think I may see the problem. Take a look:

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

It's adding Usergroups in twice.

nhawk 08-15-2011 07:56 PM

Ok, I didn't mean to upset you with the copyright thing. It does tell me that something is very wrong on your end though. The copyright is in a plugin and it should be showing.

And another good indication of something being amiss with your system is the usergroups coming up twice. The usergroups are read directly from the vBulletin database.

I would seriously suggest you do this..

Completely delete all of these files...

raffles.php
admincp/raffleadmin.php
includes/functions_raffles.php
includes/cron/raffledraw.php
includes/xml/bitfield_raffles.xml
includes/xml/cpnav_raffles.xml
includes/xml/hooks_raffles.xml

Uninstall the raffle system from AdminCP->Plugins & Products->Manage Products

Download the lastest version and install that.

If you don't want to uninstall the raffle system, be absolutely certain the files get overwritten when uploading the new files. And be sure to upgrade the system when you install the XML file by selecting 'Yes' for 'Allow Overwrite' when installing.

nhawk 08-15-2011 07:59 PM

On the page where the usergroups are being shown twice, right click on the page and select 'View Source'.

Send me that source in a C&P via PM please. It's odd that only 2 groups are duplicated.

Edit: It was found that the problem was indeed on his system. There were duplicate usergroups defined in his system.

OverhaulNetwork 09-07-2011 04:51 PM

I am trying to setup the sideblock so that guests are able to view the raffles. Problem I am running into is the only way I can seem to do this allows guests to get tickets.

Doesn't make any sense to me for guests to be able to get tickets. Shouldn't they be prompted to register or log into their account?

I tested and when buying a ticket as a guest the only field unique to that person is an IP adress. How can you contact a winner based on that? Not sure if this is a bug or what to think.

It would be great to show raffles to guests in the sidebar and prompt them to register or log in to get a ticket. Am I doing something wrong?

nhawk 09-07-2011 06:16 PM

In Raffle Settings, don't put the usergroup you want to 'see' raffles in the Banned Usergroups and set Show in Forum Sidebar to 'Yes'.

Then in the Raffle itself, don't allow that usergroup to enter the raffle.

Then when they view it, they should see a message that says...

"'You're in a usergroup that's not allowed to enter this raffle. Contact the raffle administrator for details."

nhawk 09-07-2011 06:33 PM

Hold on, for some reason the change that took place in 1.2.9 didn't carry over to 1.3.0.

Go to ACP->Forums & Moderators->Forum Blocks Manager. Locate the Active Raffle Block and click 'Edit'.

Copy and paste this code into the Content box, completely overwriting the code that's already in there...
Code:

global $vbulletin;

if ($vbulletin->options['raffle_mode'] && $vbulletin->options['raffle_showsidebar'] && !is_member_of($vbulletin->userinfo, explode(',', $vbulletin->options['raffle_perms'])))
{
        $timenow = TIMENOW;
        $allow_view = true;
        $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))
                {
                        ($hook = vBulletinHook::fetch_hook('raffle_active')) ? eval($hook) : false;
                        if($allow_view == true)
                        {
                                if($raffle_list) $raffle_list .= '<br />';
                                $raffle_list .= '<a href="raffles.php?' . $session[sessionurl] . 'do=raffle&id=' . $raffle[id] . '" title="' . $raffle[name] . '" />' . $raffle[name];
                                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 .= '<br /><center><img class="display" src="' . $raffle['prizeimg'] . '" width="' . $picture_width . '" height="' . $picture_height . '" alt="' . $raffle['name'] . '" border="0" /></center>';
                                }
                                $raffle_list .= '</a><br />';
                        }
                }
        }

        unset($raffle_getactive);
   
        $statsarray = array('currentraffles'  => $raffle_list,);
   
        return $statsarray;
}

EDIT: I re-uploaded 1.3.0 with the proper sideblock in the install file. There was no change in version numbers.


All times are GMT. The time now is 10:30 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.01610 seconds
  • Memory Usage 1,759KB
  • 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
  • (1)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