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)

JetLee 06-28-2012 06:06 PM

It's working perfect on my vB4.2.0-PL2 except for the sidebar, that part is just blank, so I have that part of it turned off.

Other than that, I'm happy with the Raffle system, thank you!

nhawk 06-28-2012 06:24 PM

Quote:

Originally Posted by JetLee (Post 2343643)
It's working perfect on my vB4.2.0-PL2 except for the sidebar, that part is just blank, so I have that part of it turned off.

Other than that, I'm happy with the Raffle system, thank you!

If you have an active raffle, there's no reason it should be blank. I would need to see the setup for the raffle to know what's going on.

JetLee 06-29-2012 10:08 PM

I get this at the top:

Code:

Warning: getimagesize(<image url>) [function.getimagesize]: failed to open stream: No such file or directory in [path]/includes/block/html.php(95) : eval()'d code on line 25

Warning: Division by zero in [path]/includes/block/html.php(95) : eval()'d code on line 26


nhawk 06-30-2012 08:44 AM

Quote:

Originally Posted by JetLee (Post 2343952)
I get this at the top:

Code:

Warning: getimagesize(<image url>) [function.getimagesize]: failed to open stream: No such file or directory in [path]/includes/block/html.php(95) : eval()'d code on line 25

Warning: Division by zero in [path]/includes/block/html.php(95) : eval()'d code on line 26


That can mean a few things...

1) You didn't upload the image folder to your server

2) You didn't upload the raffle image to your server in the images/raffles folder.

3) Your server doesn't allow http references to images (http://yoursitename/images/raffles/yourimagename.jpg). Try changing the image location to images/raffles/yourimagename.jpg.

ProFifaLeagues 07-11-2012 06:44 PM

Quote:

Originally Posted by nhawk (Post 2343537)
The instructions are included in the raffle zip file.

However if you are using vB 4.2.0, that product has not been updated to work with the new vB version.


nhawk is there any ways to show the Raffle on the CMS if not using the Forum Sidebars??
Many thanks in advance

ProFifaLeagues 07-11-2012 06:47 PM

Quote:

Originally Posted by nhawk (Post 2226544)
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.



Nice one answers my post :up:

hakkuo23 07-15-2012 03:38 AM

Code:

Warning: mysql_query() [function.mysql-query]: Access denied for user 'xeno'@'localhost' (using password: NO) in [path]/admincp/raffleadmin.php on line 20

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in [path]/admincp/raffleadmin.php on line 20

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in [path]/admincp/raffleadmin.php on line 20


nhawk 07-15-2012 09:10 AM

Quote:

Originally Posted by hakkuo23 (Post 2348206)
Code:

Warning: mysql_query() [function.mysql-query]: Access denied for user 'xeno'@'localhost' (using password: NO) in [path]/admincp/raffleadmin.php on line 20

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in [path]/admincp/raffleadmin.php on line 20

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in [path]/admincp/raffleadmin.php on line 20


For now go to ACP->Settings->Options->Raffle Settings and set 'Use AWCoding Credit Purchase System' to 'No'.

zapiy 07-29-2012 07:05 PM

I installed this and set it up to work with vbcredits II all seems fine until you purchase the entrance to a raffle ie
Members has 5000cr
5000 cr entry to comp
member enters
member now has 10000cr

Thats a big problem lol.

Any advice please?

nhawk 07-30-2012 11:18 AM

Quote:

Originally Posted by zapiy (Post 2352529)
I installed this and set it up to work with vbcredits II all seems fine until you purchase the entrance to a raffle ie
Members has 5000cr
5000 cr entry to comp
member enters
member now has 10000cr

Thats a big problem lol.

Any advice please?

I can't duplicate this. Can you post all of the settings for your raffle and the raffle system itself?

What shows in the the vBcredits log for the transaction?

The deduction is a vBCredits function. In raffle.php, locate this code near the end php file and be sure it's identical to what is shown..

Code:

case 2:
        VBCREDITS::action('adjust', intval($vbulletin->userinfo['userid']), null, false, array('message' => $vbphrase['raffle_vbcredit_log'], 'currencyid' => $vbulletin->options['raffle_vbcredit_currency'], 'multiplier' => -(intval($cost * $usetickets))));
        break;



All times are GMT. The time now is 04:56 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.01650 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
  • (6)bbcode_code_printable
  • (6)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