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)

Wizardjv 07-30-2011 01:54 PM

Couple Questions.

Is there an addon to use paypal to buy tickets? Also if not are you able to manually add members to a raffle?

nhawk 07-30-2011 04:13 PM

Quote:

Originally Posted by Wizardjv (Post 2226853)
Couple Questions.

Is there an addon to use paypal to buy tickets? Also if not are you able to manually add members to a raffle?

There is Support for AW Coding's Credit Purchase System so member can purchase "raffle tickets".

That allows the use of PayPal as well as other payment methods.

Wizardjv 07-31-2011 02:35 AM

Quote:

Originally Posted by nhawk (Post 2226903)
There is Support for AW Coding's Credit Purchase System so member can purchase "raffle tickets".

That allows the use of PayPal as well as other payment methods.

So then that is No? And yeah I noticed that already then you have to have another points system. What about manually adding members? You did not answer that one. That would be a simple fix for not allowing paypal. One could have a member pay them somehow and then the admin could just manually add them in

nhawk 07-31-2011 10:10 AM

Quote:

Originally Posted by Wizardjv (Post 2227096)
So then that is No? And yeah I noticed that already then you have to have another points system. What about manually adding members? You did not answer that one. That would be a simple fix for not allowing paypal. One could have a member pay them somehow and then the admin could just manually add them in

The answer is a definite yes, when you use AW Coding's credit purchase system. The credit purchase system has nothing to do with "points systems" when used with the raffle system. Members purchase tickets to enter the raffle. See the bottom of this screenshot..

https://vborg.vbsupport.ru/attachmen...hmentid=128658

I even give the Credit Purchase System settings to purchase raffle tickets.

However, there is not a way to manually add entries.

1hko 07-31-2011 04:38 PM

I have AW Coding credit system and this Modification. Everytime my members purchases a ticket for a raffle, I get the money but then it doesnt allow them to enter the raffle. :x
they keep getting
"You do not have any raffle tickets to enter this raffle.
Click HERE to purchase raffle tickets."

fishmaster 07-31-2011 09:46 PM

Installed and running on 4.1.5

One of the best mods out there for streamlining work on staff. A+++

fishmaster 07-31-2011 11:29 PM

Just sent you a donation, awesome work on this..

brandonE 07-31-2011 11:44 PM

Prize images aren't being shown. I get, Warning: Division by zero in [path]/raffles.php on line 6, error message displaying at top of browser. Just installed it on my 4.1.5 vbulletin. Your default 777 winner image works just not when I try to add my own. Anything I can try?

1hko 08-01-2011 02:13 AM

willing to give someone $5 if they fix this for me

nhawk 08-01-2011 10:00 AM

Quote:

Originally Posted by brandonE (Post 2227440)
Prize images aren't being shown. I get, Warning: Division by zero in [path]/raffles.php on line 6, error message displaying at top of browser. Just installed it on my 4.1.5 vbulletin. Your default 777 winner image works just not when I try to add my own. Anything I can try?

Some servers don't allow URL access to files. Try changing the path to your image from http://www.yoursite.com/images/raffles/yourimage.xxx to ./images/raffles/yourimage.xxx

You won't be able to see the image in the ACP, but it should show in your raffles.

That is a generic example. You haven't told me what the path to your image is.

brandonE 08-01-2011 10:30 AM

Quote:

Originally Posted by nhawk (Post 2227580)
Some servers don't allow URL access to files. Try changing the path to your image from http://www.yoursite.com/images/raffles/yourimage.xxx to ./images/raffles/yourimage.xxx

You won't be able to see the image in the ACP, but it should show in your raffles.

That is a generic example. You haven't told me what the path to your image is.

I changed it to, ./images/raffles/raffleimage.jpg and the image shows now. Thanks for the help!

nhawk 08-01-2011 10:41 AM

Quote:

Originally Posted by 1hko (Post 2227292)
I have AW Coding credit system and this Modification. Everytime my members purchases a ticket for a raffle, I get the money but then it doesnt allow them to enter the raffle. :x
they keep getting
"You do not have any raffle tickets to enter this raffle.
Click HERE to purchase raffle tickets."

There is a confirmed bug in AW Coding's Credit Purchase System Lite.

I have been including a patch for this bug in the raffle install system for quite a while, but neglected to include it in version 1.2.6.

You can manually patch the Credit Purchase System files with this information..

Go to AdminCP->Plugins & Products->Plugin Manager

Locate AWCL- Units Updates and click Edit

In the plugin code, locate this code..
Code:

switch ( $vbulletin->options['cpsl_purchase_units'] ){

        case 1:
               
                $vbulletin->db->query_write("
                        UPDATE `$custom_table`
                        SET $custom_field = $custom_field + $units
                        WHERE $custom_user_field = ".$AWCL['IN']['userid']
                );
                break;

And replace with this code...
Code:

switch ( $vbulletin->options['cpsl_purchase_units'] ){

        case 1:
               
                $vbulletin->db->query_write("
                        UPDATE `".$vbulletin->options['cpsl_purchase_table']."` 
                        SET ".$vbulletin->options['cpsl_purchase_field']." = ".$vbulletin->options['cpsl_purchase_field']." + $units 
                        WHERE ".$vbulletin->options['cpsl_purchase_userfield']." = ".$AWCL['IN']['userid']
                );
                break;

Clicks SAVE

Locate AWCL- Trans delete and click Edit

In the plugin code, locate this code..
Code:

switch ( $vbulletin->options['cpsl_purchase_units'] ){

        case 1:
                                       
                $vbulletin->db->query_write("
                        UPDATE `$custom_table`
                        SET $custom_field = $custom_field - $units
                        WHERE $custom_user_field = ".$payment_info['userid']
                );
                break;

And replace with this code...
Code:

switch ( $vbulletin->options['cpsl_purchase_units'] ){

        case 1:
                                       
                $vbulletin->db->query_write("
                        UPDATE `".$vbulletin->options['cpsl_purchase_table']."` 
                        SET ".$vbulletin->options['cpsl_purchase_field']." = ".$vbulletin->options['cpsl_purchase_field']." - $units 
                        WHERE ".$vbulletin->options['cpsl_purchase_userfield']." = ".$AWCL['IN']['userid']
                );
                break;

Click SAVE

This patch was supplied by AWJunkies on 6/16/2011.

teach1st 08-01-2011 11:49 PM

Thanks for a great mod. Just had my first drawing, and a lucky former student won a computer (just for the record, it was free to enter).

Anyway, I do have a problem with the raffles sidebar block in Internet Explorer 9 only. When I enable the raffles sideblock, it forces the block underneath it to enlarge it's header (title area) a whole bunch as if the padding were 10px. It looks very misshapen. If I move the raffles sideblock to the bottom of the sideblock, it forces forumhome to have two footer strips (where the style chooser and language chooser resides). The top of these too is linked to the current raffle. I have not modded the raffles stuff except for phrasing.

It's as if there were an unclosed a tag somewhere.

This happens on Forumhome in any style, with or without plugin hooks enabled. It happens only on IE (didn't check Opera, but Safari, Chrome, and FF are fine). It does not happen in IE 9 (compatibility on or off) to guests, only logged-in users.

vb 4.15 using Raffles 1.2.6

fishmaster 08-02-2011 03:06 AM

My side bar block is not appearing either.

Latest build of Vbulletin, running stock skin, latest Raffle loaded.

nhawk 08-02-2011 08:21 AM

Quote:

Originally Posted by teach1st (Post 2227933)
Thanks for a great mod. Just had my first drawing, and a lucky former student won a computer (just for the record, it was free to enter).

Anyway, I do have a problem with the raffles sidebar block in Internet Explorer 9 only. When I enable the raffles sideblock, it forces the block underneath it to enlarge it's header (title area) a whole bunch as if the padding were 10px. It looks very misshapen. If I move the raffles sideblock to the bottom of the sideblock, it forces forumhome to have two footer strips (where the style chooser and language chooser resides). The top of these too is linked to the current raffle. I have not modded the raffles stuff except for phrasing.

It's as if there were an unclosed a tag somewhere.

This happens on Forumhome in any style, with or without plugin hooks enabled. It happens only on IE (didn't check Opera, but Safari, Chrome, and FF are fine). It does not happen in IE 9 (compatibility on or off) to guests, only logged-in users.

vb 4.15 using Raffles 1.2.6

Quote:

Originally Posted by fishmaster (Post 2228007)
My side bar block is not appearing either.

Latest build of Vbulletin, running stock skin, latest Raffle loaded.

The sidebar block was completely missing from version 1.2.6.

Download and install version 1.2.7 to cure the problem.

If installing the updated version doesn't create the block, follow the instructions in this post..
https://vborg.vbsupport.ru/showpost....&postcount=215

NOTE: The version here is almost always 1 version behind what is on my site. You might want to check there for updates first. For most users, there is no major difference between 1.2.7 and the latest version.

teach1st 08-02-2011 08:53 AM

The problem with the sidebar and Internet Explorer still exists for me after upgrading to 1.2.7

I have never had the current raffle pic show for me in the sidebar.

nhawk 08-02-2011 09:44 AM

Quote:

Originally Posted by teach1st (Post 2228083)
The problem with the sidebar and Internet Explorer still exists for me after upgrading to 1.2.7

I have never had the current raffle pic show for me in the sidebar.

The picture won't show unless you set the option to 'Yes' in the raffle options. (AdminCP->Raffles->Edit Raffles-> Select Raffle and set 'Show Image in Sidebar')

Also, Go to AdminCP->Forums & Moderators->Forum Blocks Manager

Check the Active Raffles Block (if it exists) and be sure the code shown in this post is in there..

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

teach1st 08-02-2011 09:47 AM

Quote:

Originally Posted by nhawk (Post 2228097)
The picture won't show unless you set the option to 'Yes' in the raffle options.

Go to AdminCP->Forums & Moderators->Forum Blocks Manager

Check the Active Raffles Block (if it exists) and be sure the code shown in this post is in there..

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

Code is there, the template is intact, and show picture has always been enabled in options.


https://vborg.vbsupport.ru/external/2011/08/118.png


Clicking on the top bar takes the user to the latest raffle.

nhawk 08-02-2011 09:56 AM

Quote:

Originally Posted by teach1st (Post 2228100)
Code is there, the template is intact, and show picture has always been enabled in options.

Send me a link to your site.

I use IE-8 and have no problems seeing the image on live sites and my test bed.

teach1st 08-02-2011 10:02 AM

I posted a picture of the problem in my previous post. The picture is unavailable in any browser.

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.

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

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 09:59 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.01636 seconds
  • Memory Usage 1,893KB
  • 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
  • (7)bbcode_code_printable
  • (22)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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