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)

brandonE 08-02-2011 07:18 PM

Alright, thats answers it. Thanks!

nhawk 08-02-2011 07:25 PM

Quote:

Originally Posted by brandonE (Post 2228317)
Alright, thats answers it. Thanks!

You can manually change them if you like..

For the Sidebar Block, go to AdminCP->Forums & Moderators->Forum Blocks Manager, select edit Active Raffles replace the code with this..

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($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;
}


For the What's Going On box, go to AdminCP->Plugins & Products->Plugin Manager, locate the Raffles Active plugin, click edit and replace the code there with this ...

Code:

if ($vbulletin->options['raffle_show_active'] && $vbulletin->options['raffle_mode'] && !is_member_of($vbulletin->userinfo, explode(',', $vbulletin->options['raffle_perms'])))
{
        $vbulletin->db->hide_errors();
        $timenow = TIMENOW;
        $raffle_getactive = $vbulletin->db->query_read("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($raffle_list)
                        {       
                                $raffle_list .= ", " . '<a href="raffles.php?' . $session[sessionurl] . 'do=raffle&id=' . $raffle[id] . '" title="' . $raffle[name] . '" />' . $raffle[name] . '</a>';
                        }
                        else
                        {
                                $raffle_list .= '<a href="raffles.php?' . $session[sessionurl] . 'do=raffle&id=' . $raffle[id] . '" title="' . $raffle[name] . '" />' . $raffle[name] . '</a>';
                        }
                }
        }

        if(!$raffle_list)
        {
                $raffle_list = $vbphrase['raffle_noactive'];
        }

        unset($raffle_getactive);
        $templater = vB_Template::create('raffle_activelist');
        $templater->register('rafflelist', $raffle_list);
        $raffle_active = $templater->render();
        $template_hook['forumhome_wgo_pos2'] .= $raffle_active;
        $vbulletin->db->show_errors();
}


brandonE 08-02-2011 07:38 PM

Even better, I made those changes and everything looks great! Thanks once again

nhawk 08-02-2011 07:41 PM

I'll add those changes to the next release. But for now, people should be all set.

Gleedo 08-03-2011 06:46 PM

Evening - nice mod :)

I have just setup a raffle on vb4.14.

I have the following start date:
08/03/2011

And the End date:
08/07/2011

So that should be August 3rd to August 7th 2011 but on my raffle page it is displaying the following text:
Start Date: 03-08-2011
Enter Through: 05-08-2011
Draw Date: 06-08-2011 at 11:00 PM

So that thinks the end date is the 5th and draw date on the 6th, both dates before the actual end date I have set.

Any thoughts appreciated :)

nhawk 08-03-2011 07:12 PM

Quote:

Originally Posted by Gleedo (Post 2228858)
Evening - nice mod :)

I have just setup a raffle on vb4.14.

I have the following start date:
08/03/2011

And the End date:
08/07/2011

So that should be August 3rd to August 7th 2011 but on my raffle page it is displaying the following text:
Start Date: 03-08-2011
Enter Through: 05-08-2011
Draw Date: 06-08-2011 at 11:00 PM

So that thinks the end date is the 5th and draw date on the 6th, both dates before the actual end date I have set.

Any thoughts appreciated :)

Check your timezone display preferences in usercp. The dates shown are in the timezone you have chosen there.

Draw dates are by the SERVER time, not the timezone you have set in preferences.

See this post for a more in depth answer...

https://vborg.vbsupport.ru/showpost....&postcount=196

EDIT: In short, your servers current time is +11 hours from your chosen display timezone.

Gleedo 08-03-2011 07:29 PM

Thanks for the reply :)

fevredsuk 08-05-2011 08:28 PM

I mate, any chance of just 1 more option :) please

Any chance of posting winner to a thread, in any chosen forum

thread title = draw title + date drawn

body = winners name + editable message

if this is an option too far then fair enough, great mod anyway

thanks

nhawk 08-05-2011 08:59 PM

Quote:

Originally Posted by fevredsuk (Post 2229836)
I mate, any chance of just 1 more option :) please

Any chance of posting winner to a thread, in any chosen forum

thread title = draw title + date drawn

body = winners name + editable message

if this is an option too far then fair enough, great mod anyway

thanks

Check my site (click visit web site in main post), it already exists.

CharlieDelta 08-06-2011 12:44 AM

Quote:

Originally Posted by fishmaster (Post 2229903)
When members request an award, they are receiving an error, but the award request is still qued in the admin cp.

Error: "Something unexpected has happened your rank request can not be sent at this time".

You have the wrong thread and mod.


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.01396 seconds
  • Memory Usage 1,760KB
  • 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
  • (2)bbcode_code_printable
  • (4)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