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;


socialteenz 08-08-2012 09:57 PM

Hello, i am getting this error When i try to enter/view a raffle.

Quote:

Warning: mysql_num_rows() expects parameter 1 to be resource, object given in [path]/raffles.php on line 337
Running 4.2

nhawk 08-09-2012 09:49 AM

Quote:

Originally Posted by socialteenz (Post 2355669)
Hello, i am getting this error When i try to enter/view a raffle.



Running 4.2

What do you have 'Maximum Entries Permitted', 'Time Between Entries' and 'Entries in Time Period' set to for that raffle?

socialteenz 08-09-2012 04:28 PM

Quote:

Originally Posted by nhawk (Post 2355761)
What do you have 'Maximum Entries Permitted', 'Time Between Entries' and 'Entries in Time Period' set to for that raffle?


Thank you, i changed the values & it worked great.

morrow 08-10-2012 11:20 AM

Nice mod... Installed with no issue for me. The only things... Why have the option to require a Paypal account if when you purchase a raffle ticket, it doesn't do anything?

Maybe have it send the user to paypal so they can submit a payment immediately after purchasing a ticket. Don't give the user the option to "get around to it". People do things spontaneously. Once the paypal payment has been made, email the ticket number.

Also, why not give the option when purchasing a raffle ticket to purchase 3 or 10 at a time rather than 1 per entry?

Finally, How about a navbar option? I know I can add this myself but it's always nice when the developer inserts an option into the CP to be able to include it.

Just my thoughts. Otherwise, nice mod.

nhawk 08-10-2012 12:27 PM

Quote:

Originally Posted by morrow (Post 2355967)
Nice mod... Installed with no issue for me. The only things... Why have the option to require a Paypal account if when you purchase a raffle ticket, it doesn't do anything?

Maybe have it send the user to paypal so they can submit a payment immediately after purchasing a ticket. Don't give the user the option to "get around to it". People do things spontaneously. Once the paypal payment has been made, email the ticket number.

Also, why not give the option when purchasing a raffle ticket to purchase 3 or 10 at a time rather than 1 per entry?

Finally, How about a navbar option? I know I can add this myself but it's always nice when the developer inserts an option into the CP to be able to include it.

Just my thoughts. Otherwise, nice mod.

The PayPal account is so the admin knows where to send cash prizes. It's not for purchasing tickets.

Purchasing tickets for cash is not handled by this add-on. It is handled by other add-ons available on vb.org. So, you can give them the options to purchase as many as you like.

A member CAN enter multiple times with one click. See the 'Maximum User Entries Permitted', 'Time Between Entries' and 'Entries in Time Period' settings for the raffle.

There are options to put the raffles in the community menu, the forum sidebar and in what's going on.

zapiy 08-28-2012 04:39 PM

Quote:

Originally Posted by nhawk (Post 2352706)
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;


Fixed it cheers.. i had a small setting wrong.

Is there a vbadvanced block for this?

Cheers

nhawk 08-28-2012 04:59 PM

Quote:

Originally Posted by zapiy (Post 2360737)
Fixed it cheers.. i had a small setting wrong.

Is there a vbadvanced block for this?

Cheers

No there isn't. I don't have vbadvanced to be able to create and test one.

zapiy 09-05-2012 12:05 PM

That's a shame, bloody fantastic mod.

hakkuo23 10-12-2012 03:02 AM

Can you make a way so we can allow moderators to create raffles via the ModCP?

nhawk 10-12-2012 10:50 AM

Quote:

Originally Posted by hakkuo23 (Post 2372445)
Can you make a way so we can allow moderators to create raffles via the ModCP?

Not at this time.

But if you trust your moderators enough to create raffles to give away items on your site, you could give them limited admin access to the ACP and allow them to create raffles there.

zapiy 11-09-2012 06:42 PM

Thats a shame, giving access to the admin panel gives way to many options that you can not simply switch off for that user.

nhawk 11-09-2012 07:55 PM

Quote:

Originally Posted by zapiy (Post 2379762)
Thats a shame, giving access to the admin panel gives way to many options that you can not simply switch off for that user.

There is a reason it's not allowed and I'll tell the reason in a short story..

Long before I released this mod on vB.org, there was a large site that raffled off some very expensive items ($300+ each) on a regular basis. The owner of the site requested the same thing, and I did code it in the raffle system. Everything was fine until the mod he appointed to create raffles had an argument with the owner. The owner thought things would cool down and just let things run as normal. Then one day he got flooded with emails asking when items won in raffles would be delivered. He did not authorize any raffles in that time period and didn't know what these people were talking about. To make the story even shorter, the owner had to make good on what was raffled off or close the site. He chose to close the site because the expense would have been too great to continue on. At that point I removed the ability for a mod to create a raffle and I will never put it back in.

That is why I won't add the ability for anyone but an admin to create a raffle.

Mellow 12-03-2012 06:25 PM

I have a small issue where if I place any html in the description box in the admincp setup for a raffle, it looks fine on the site but when I list my raffles, the html messes up that list in the admincp area.

nhawk 12-03-2012 06:59 PM

Quote:

Originally Posted by Mellow (Post 2388133)
I have a small issue where if I place any html in the description box in the admincp setup for a raffle, it looks fine on the site but when I list my raffles, the html messes up that list in the admincp area.

Use BB Code.

Mellow 12-03-2012 07:36 PM

Quote:

Originally Posted by nhawk (Post 2388144)
Use BB Code.

Thank you, I should have known to try that.

nhawk 12-03-2012 07:53 PM

Actually it's something I've had on my list to fix for a long time. BB Code is a quick fix, but it shouldn't be needed.

I'll try to get it into the next release.

Davey-UK 02-13-2013 07:37 PM

What happened to AW Coding? It seems to have been hacked. When trying to buy credits, i just redirect back to my homepage. Does anyone have these mods working well together. Awcoding credit system and VB Raffles?:mad:

nhawk 02-13-2013 08:24 PM

Quote:

Originally Posted by Davey-UK (Post 2404071)
What happened to AW Coding? It seems to have been hacked. When trying to buy credits, i just redirect back to my homepage. Does anyone have these mods working well together. Awcoding credit system and VB Raffles?:mad:

CPS Pro and LITE were fully tested from Raffles version 1.33 forward.

From what I understand, AWCoding released the PRO version of the Credit Purchase system for free. If there's been a change to the credit purchase system, I don't know that it will still work because I have not seen that version.

Davey-UK 02-14-2013 05:39 AM

Yes, i downloaded the free (Pro) version from his site.
It integrates ok, its just that it doesnt make the final call to paypal, it just redirects back to my homepage and doesnt make the call.
Shame really. because it took 2hrs to set it all up! :mad:

Working with VBcredits now to try and acheive this.

Davey-UK 02-17-2013 11:18 AM

Working with Vbcredits, it lets you enter the raffles, but does not deduct any credits from the entrants total. Any ideas?

nhawk 02-17-2013 11:46 AM

Quote:

Originally Posted by Davey-UK (Post 2404742)
Working with Vbcredits, it lets you enter the raffles, but does not deduct any credits from the entrants total. Any ideas?

In Settings->Options->Raffle Settings be sure you turned off 'Use AWCoding Credit Purchase System'.

In Settings->Options->Raffle Settings be sure you turned on 'Use vBCredits' and selected the proper 'vBCredits Currency'.

For each raffle, make sure you set the 'Credit Cost' to something other than zero.

gustavgr16 02-17-2013 12:06 PM

good work man :)

Davey-UK 02-17-2013 02:45 PM

Quote:

Originally Posted by nhawk (Post 2404745)
In Settings->Options->Raffle Settings be sure you turned off 'Use AWCoding Credit Purchase System'.

In Settings->Options->Raffle Settings be sure you turned on 'Use vBCredits' and selected the proper 'vBCredits Currency'.

For each raffle, make sure you set the 'Credit Cost' to something other than zero.

All the settings you mentioned above are set correctly.

I just shot back over to trying to use the credit purchase system and just cannot get it to redirect to Paypal using Vb 4.2.0. It just comes back to the forum instead. Did you ever receive a fix from them for this 4.2 compatibility, before they disappeared?

Give up!
UNINSTALLED

nhawk 02-18-2013 10:39 AM

I just ran a test using the current version of vBCredits II Lite and it is working perfectly. The test was run with 2 different users.

See the attached screenshots.

Davey-UK 02-20-2013 07:11 PM

Got it working finally. Thanks. I hadnt set the adjust correctly. Sorry.

I need to get the raffle ticket number that the user has purchased, possibly beside there name in the purchased tickets list, or elsewhere. Would it be too much trouble to call the table somewhere. I notice from test draws, that is does actually draw a number and not just a name. I would like it so that i could put it on the raffle iself, something like. "your number(s) for this draw are #18, #19" etc. I could then modify the css, to place on a ticket image or something like.

Would be great
Thanks

nhawk 02-20-2013 09:02 PM

Quote:

Originally Posted by Davey-UK (Post 2405478)
Got it working finally. Thanks. I hadnt set the adjust correctly. Sorry.

I need to get the raffle ticket number that the user has purchased, possibly beside there name in the purchased tickets list, or elsewhere. Would it be too much trouble to call the table somewhere. I notice from test draws, that is does actually draw a number and not just a name. I would like it so that i could put it on the raffle iself, something like. "your number(s) for this draw are #18, #19" etc. I could then modify the css, to place on a ticket image or something like.

Would be great
Thanks

The 'Ticket Number' is nothing more than the database record number. That reference, 'Ticket Number', came in May 2011 when someone requested a number system. It never existed before that (years and years without it prior to release on vB.org). The 'Ticket Number' has no bearing on the draw. It's an artificial number that people like for some reason.

I really don't have any intention of adding to the free base raffle system. However, I will put it on the wish list for paid add-ons to the base system.

whoareyou82605 03-08-2013 10:51 PM

Edited - Wrong section..

Lightmaster-AH 03-15-2013 01:38 PM

Hallo nhawk,

thanks for this addon, I have installed this on a german page and I want to translate some words into my language, but I didn't find them. In my snapshot you can see, what words and one other question, that I have.

Thank you for help and sorry, my english isn't good.

Attachment 144149

nhawk 03-15-2013 01:58 PM

Quote:

Originally Posted by Lightmaster-AH (Post 2410149)
Hallo nhawk,

thanks for this addon, I have installed this on a german page and I want to translate some words into my language, but I didn't find them. In my snapshot you can see, what words and one other question, that I have.

Thank you for help and sorry, my english isn't good.

Attachment 144149

The words that can be changed using the phrase manager are..

'at' is the vb phrase 'raffle_at'
The words for the months are standard vb phrases for the months (march, april, may, etc.)

The 'day' word would require editing the raffles.php file.

Locate this code..
Code:

$day_text = " day";
and change the word day to whatever is needed. Note that it is in the code multiple times so you will need to change it in all places.

I will change that to the standard vb phrase 'day' in the next release.

If you want to, you can move things around on the page by editing the raffle_detail and raffle_css templates. Moving things around on the page is up to you. I do not customize the page for people.

vantagegroup 04-18-2013 06:40 PM

How are you supposed to add a new raffle? I can't find it anywhere!


All times are GMT. The time now is 09:06 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.03304 seconds
  • Memory Usage 1,862KB
  • 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
  • (8)bbcode_code_printable
  • (21)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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