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 08-02-2011 10:04 AM

Quote:

Originally Posted by teach1st (Post 2228104)
I posted a picture of the problem in my previous post.

http://www.teach1st.com/bobo/vb/forum.php

Guests can't see the raffles or much anything else, so the link won't help. I can't allow anybody except class members and parents to register due to student privacy.

EDIT: I see the images you just posted...

Does the image show in the raffle itself?

teach1st 08-02-2011 10:13 AM

OK...give me four minutes, cause I have to enable guests to see the sidebar, too.

teach1st 08-02-2011 10:16 AM

It's ready

The image shows in the raffle

In Firefox 4 and Opera (latest), there is no double bar, but clicking on the bar or trying to change styles takes the user to the latest raffle.

nhawk 08-02-2011 10:27 AM

Quote:

Originally Posted by teach1st (Post 2228106)
OK...give me four minutes, cause I have to enable guests to see the sidebar, too.

Quote:

Originally Posted by teach1st (Post 2228108)
It's ready

The image shows in the raffle

Ok, you can kill guests now. I've seen what I needed to see.

I can't see the image in IE8 on your site either. I'm not sure what the problem is.

Try replacing the block 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 (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 /><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;
}

That code is direct from my test server and it does display that exact image in the default vBulletin template.

That is one other thing you can try.. try changing to the default vB template and see if it shows that way. If it does, then there's a problem with your site template.

teach1st 08-02-2011 10:35 AM

Quote:

That code is direct from my test server and it does display that exact image in the default vBulletin template.
That did the trick with the double bar and the leaking link. Yay! Thanks for your help. Still no picture showing, though.

ON EDIT: Picture is working now! Thanks!

nhawk 08-02-2011 10:38 AM

Edit the raffle itself and be absolutely certain the 'Show Image in Sidebar' is set to 'Yes'.

That option vanished in version 1.2.6 and if the raffle was created with that version, it is automatically set to 'No' by default.

teach1st 08-02-2011 10:43 AM

Quote:

Originally Posted by nhawk (Post 2228115)
Edit the raffle itself and be absolutely certain the 'Show Image in Sidebar' is set to 'Yes'.

That option vanished in version 1.2.6 and if the raffle was created with that version, it is automatically set to 'No' by default.

Yup! You are right. Picture is showing now. Thanks again for your help. I just donated to this great product.

nhawk 08-02-2011 10:46 AM

Quote:

Originally Posted by teach1st (Post 2228119)
Yup! You are right. Picture is showing now. Thanks again for your help. I just donated to this great product.

I like happy endings :D

And thank you!

brandonE 08-02-2011 06:18 PM

In the side bar no matter what, it always says "No active raffles at this time" for unregistered users. User group permissions are all set correctly for them to view but not enter. Raffles Do not appear in the What's Going On section either for unregistered users

nhawk 08-02-2011 07:13 PM

Quote:

Originally Posted by brandonE (Post 2228288)
In the side bar no matter what, it always says "No active raffles at this time" for unregistered users. User group permissions are all set correctly for them to view but not enter. Raffles Do not appear in the What's Going On section either for unregistered users

The only places unregistered members can see raffles are..

1) From the community menu

2) From a direct link to raffles.php


All times are GMT. The time now is 09:58 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.01577 seconds
  • Memory Usage 1,754KB
  • 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