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)

nhawk 07-06-2011 04:21 PM

Thank you, I missed that.

I'll include it in the next update.

Note that the same code is also on line 125.

Trek 07-06-2011 04:56 PM

Quote:

Originally Posted by nhawk (Post 2217453)
Thank you, I missed that.

I'll include it in the next update.

Note that the same code is also on line 125.

Sure thing! I changed the other instance in my copy as well, thanks!

nhawk 07-06-2011 05:10 PM

Quote:

Originally Posted by Trek (Post 2217466)
Sure thing! I changed the other instance in my copy as well, thanks!

You'll also find the new version of raffledraw.php is heavily commented.

clutchthese 07-14-2011 07:53 PM

I accidentally deleted the forum side bar for raffle. Is there any way to get that back? I delete it quickly thinking it was another widget. :(

nhawk 07-14-2011 07:58 PM

Quote:

Originally Posted by clutchthese (Post 2220594)
I accidentally deleted the forum side bar for raffle. Is there any way to get that back? I delete it quickly thinking it was another widget. :(

Import the product again, and be sure "allow overwrite" is set to yes when you do.

That might bring it back.

If not, create a new block

Block Type: Custom HTML/PHP

Title: Active Raffles
Description: Active Raffle List block on forum sidebar
Cache Time: 0
Active: Yes

Content Type: PHP

c&p this code for Content..

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];
                                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 /><img class="display" src="' . $raffle['prizeimg'] . '" width="' . $picture_width . '" height="' . $picture_height . '" alt="' . $raffle['name'] . '" border="0" />';
                                }
                                $rafflelist .= '</a><br />';
                        }
                }
        }

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


Template to Use: raffle_sideblock

clutchthese 07-14-2011 08:00 PM

Awesome. Thank you sir. Disregard my pm. :)

nhawk 07-14-2011 08:05 PM

Quote:

Originally Posted by clutchthese (Post 2220601)
Awesome. Thank you sir. Disregard my pm. :)

LOL, I was editing my post when you replied. One or the other will work.

Had the wrong code there at first.. is correct now.

clutchthese 07-14-2011 08:13 PM

Parse error: syntax error, unexpected T_VARIABLE in /home/gameru5/public_html/forums/includes/block/html.php(95) : eval()'d code on line 1

I tried both ways, neither worked. Adding the block and pasting the code yields the above error.

nhawk 07-14-2011 08:20 PM

Quote:

Originally Posted by clutchthese (Post 2220606)
Parse error: syntax error, unexpected T_VARIABLE in /home/gameru5/public_html/forums/includes/block/html.php(95) : eval()'d code on line 1

I tried both ways, neither worked. Adding the block and pasting the code yields the above error.

If you can, send me temporary admin access to your site (username and password) by PM. Don't forget the URL too. ;)

clutchthese 07-14-2011 08:20 PM

oops... that was a type on my part. But i fixed the type and now the block breaks the forum. :(

Database error in vBulletin 4.1.4:

Invalid SQL:
SELECT country FROM geo_blocks
WHERE begin_num <= '212508165' AND end_num >= '212508165';

MySQL Error : Table 'gameru5_gamerumors.geo_blocks' doesn't exist
Error Number : 1146
Request Date : Thursday, July 14th 2011 @ 05:20:04 PM
Error Date : Thursday, July 14th 2011 @ 05:20:05 PM
Script : http://www.gamerumors.net/forums/forum.php?styleid=5
Referrer : http://www.gamerumors.net/forums/forum.php?styleid=3
IP Address : 12.170.158.5
Username : ClutchThese
Classname : vB_Database
MySQL Version : 5.0.91-community-log


All times are GMT. The time now is 08:14 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.01832 seconds
  • Memory Usage 1,753KB
  • 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
  • (5)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