Status
Not open for further replies.

geza

New member
I have install vBCredits II Deluxe v2.0.0 and set Download action will decrease 5 credits each time.


but user doesn't have their credits decreased when download attachments, and I can't see download event logs, but I can see View/Acitvity event logs.

I am also like to introduce Pro version into my forum, but I have to make all the settings working first.

please help to solve this problem.

Thanks
 
Upload / Download of Attachments doesn't change credits

Screen shot 2012-06-24 at 6.02.39 PM.png

There is a screenshot of the settings.

Tested on a clean vBulletin, on vBulletin 4.x and on 3.x.

I am sorry I cannot provide a URL since its of adult nature... if needed I will reinstall a clean VB and provide you an off-site URL.
 
Could you please edit the issue above and provide a valid url to your site, this information is only viewable by staff, and is needed to debug issues. Thanks.
 
Hi Ozzy47,

Thanks for the quick reply. I have done what you asked and I have sent you a PM with user/admin details.
 
That's good, as soon as the dev of the mod has time, he will answer the post. :)
 
Only Images Charge Points

When a user click on an attachment, it deducts the points if they have enough and allows them to download. It also allows them to download it even if they don't have enough points. Only screenshots/images seem to work by displaying a message stating that you need X amount of points to download/view.

.zip and .rar files are downloading regardless of the amount of points a user has. How can I fix this?
 
Could you edit the issue above and provide a valid url to the site that the product is running on, only staff can see that info and it is not made public. Thanks.
 
I dunno why it got overlooked, but as soon as @Darlwaltz4 can he will answer you.
 
Thank you. Just a little update:

I've tested this bug on localhost, tested it with vBulletin4; I just can't get it to work. I thought it might be my server settings at one point, or the vBulletin version I am using. Tested on clean installations and on ones that previously had modules installed. I've also thought that it might be some of the settings on the 'actions' but I've tried almost every possible combination and could not get it to work.

The bug only occurs during: upload, download actions.
 
I think I fixed this:

1) edit (forums)/dbtech/credits/credits_vbulletin.php find

PHP:
    function download()
    {
        global $vbulletin, $attachmentinfo, $attach, $browsinginfo;

        if (array_pop(explode('_', strtolower(get_class($attach)))) == 'post')
        {    //only do this for forum attachments
            VBCREDITS::action('download', $vbulletin->userinfo['userid'], $attachmentinfo['attachmentid'], false, array('forumid' => $browsinginfo['foruminfo']['forumid'], 'multiplier' => $attachmentinfo['filesize'], 'ownerid' => $attachmentinfo['userid']));
        }
    }

replace with

PHP:
    function download()
    {
        global $vbulletin, $db, $attach;

        if (!$vbulletin->GPC['thumb'])
        {    //not thumbnail view
            if (empty($attach))
            {    //vb3.x
                $attachmentinfo = $db->query_first_slave("
                    SELECT attachmentid, attachment.userid, filesize, thread.forumid
                    FROM " . TABLE_PREFIX . "attachment AS attachment
                    LEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = attachment.postid)
                    LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (post.threadid = thread.threadid)
                    WHERE " . ($vbulletin->GPC['postid'] ? "attachment.postid = " . $vbulletin->GPC['postid'] : "attachmentid = " . $vbulletin->GPC['attachmentid'])
                );
            }
            else if (array_pop(explode('_', strtolower(get_class($attach)))) == 'post')
            {    //vb4.x
                $attachmentinfo = $db->query_first_slave("
                    SELECT a.attachmentid, fd.userid, fd.filesize, thread.forumid
                    FROM " . TABLE_PREFIX . "attachment AS a
                    INNER JOIN " . TABLE_PREFIX . "filedata AS fd ON (a.filedataid = fd.filedataid)
                    LEFT JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = a.contentid)
                    LEFT JOIN " . TABLE_PREFIX . "thread AS thread ON (post.threadid = thread.threadid)
                    WHERE a.attachmentid = " . intval($attach->attachmentid)
                );
            }
            if ($attachmentinfo)
            {    //only forum attachments
                VBCREDITS::action('download', $vbulletin->userinfo['userid'], $attachmentinfo['attachmentid'], false, array('forumid' => $$attachmentinfo['forumid'], 'multiplier' => $attachmentinfo['filesize'], 'ownerid' => $attachmentinfo['userid']));
            }
        }
    }

2) go to admincp > plugins and products > plugin manager > edit the vBCredits II - Download plugin, and change the Hook Location to attachment_start

Should fix this for everyone! (already applied for @trajche)
 
Thank you man! :) Can you have a look into the upload functionality as well if it's not too much to ask?
 
Status
Not open for further replies.

Legacy vBCredits II Deluxe

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
845
Customer rating
0.00 star(s) 0 ratings
Back
Top