Status
Not open for further replies.

yoyoman

Customer
Hi guys!
I really like your software. It's way better and simpler than what I've seen. I am seriously considering buying it, but I have encountered one bug that is spoils everything: sometimes the POST NEGATION does NOT work. Meaning that when somebody deletes his thread, the credits are NOT subtracted from his account.
Through over 2 hours of trial-and-error testing I was able to figure out that this happens when specific forums are selected for the POST event.

You can test this error on my forum in this thread: http://www.speculant.org/forum/showthread.php?t=1086
Username: test
Password: 123123

Please fix this error or explain what I am doing wrong.

Really hope to hear from you soon, so I don't have to look for other software.

Regards,
yoyoman.

negation_error.gif
 
Last edited:
Do you have an event that selects all forums? (a "general" one) If so, it will override the specific one currently, so ensure that also has a negation value.

Should probably continue support for this issue in this thread vs vborg :)
 
Do you have an event that selects all forums? (a "general" one) If so, it will override the specific one currently, so ensure that also has a negation value.

Hi Darkwaltz4,
Thanks for the quick reply.
No, I do not have any other events at all.
What can be the problem??
negation_error2.gif

Should probably continue support for this issue in this thread vs vborg :)

I'm sorry - I didn't understand. Is it better to post here or on VBSupport?
Thanks,
yoyoman.
 
I reported this issue a while back on vb.org and never heard back about a fix, so this sounds like the same one I had. A real show stopper when it is dealing with credits and users can rack them up and then not lose them.
 
Sorry on the delay, I was sick over the weekend. I will look at your site later today and let you know what I find.
 
Guys - in what ways are you deleting the posts? Soft/hard/soft-then-hard, via edit/advanced/inline? The whole thread/individually?

The great [read: irritating] part about vbulletin is that most of those combinations is a separate process to chase after :)
 
Okay, deleting posts looks pretty broken, i have no idea how even the "global" event manages to work. ive been able to fix half of it so far, the other half might need a query which id like to avoid :-/
ill report back on what i end up with.

both of you are using the lite version, correct?
 
Yeah, me too. But I'd love to see this fixed in the pro too - I want to have the full version later.
About the method of deleting posts:
- users delete the posts soft via either of: inline, edit or advanced.
- then moderators delete the leftovers hard.
- or the moderators delete them hard right away.

so it can be either of the combinations.
 
Last edited:
Here we go!

Edit (forum)/dbtech/credits/credits_vbulletin.php find

PHP:
    function prepost(&$post)
    {
        $post->vbcredits = array();
        global $vbulletin;

        if ($post->fetch_field('visible') == 1)
        {
            $post->vbcredits[] = VBCREDITS::action(( ($post->condition AND $post->fetch_field('postid') == $post->info['thread']['firstpostid']) ? 'thread' : 'post' ), $post->fetch_field('userid'), true, false, array('forumid' => $post->info['thread']['forumid'], 'multiplier' => $post->fetch_field('pagetext'), 'ownerid' => $post->info['thread']['postuserid']));
        }
    }

    function post($post)
    {
        $postid = $post->fetch_field('postid');
        $threadid = $post->fetch_field('threadid');
        $action = ( ($post->condition AND $postid == $post->info['thread']['firstpostid']) ? 'thread' : 'post' );
        $refid = ( ($action == 'thread') ? $threadid : $postid );
        if ($post->condition AND $post->existing['visible'] == 1) VBCREDITS::action($action, $post->fetch_field('userid'), $refid, true, array('forumid' => $post->info['thread']['forumid'], 'multiplier' => $post->existing['pagetext'], 'ownerid' => $post->info['thread']['postuserid']));

        if ($post->fetch_field('visible') == 1)
        {
            VBCREDITS::apply($post->vbcredits[0], $refid);
            if (sizeof($post->vbcredits) > 1) VBCREDITS::apply($post->vbcredits[1], $threadid);
        }
    }

    function delpost($post)
    {    //delete any reputation?
        if ($post->existing['visible'] == 1)
        {
            VBCREDITS::action('post', $post->fetch_field('userid'), $post->fetch_field('postid'), true, array('forumid' => $post->info['thread']['forumid'], 'multiplier' => $post->existing['pagetext'], 'ownerid' => $post->info['thread']['postuserid']));
        }
    }

replace with

PHP:
    function prepost(&$post)
    {
        $post->vbcredits = array();
        global $vbulletin, $threadinfo;

        if ($post->fetch_field('visible') == 1)
        {
            $thread = ( $post->info['thread'] ? $post->info['thread'] : ( $post->existing['forumid'] ? $post->existing : $threadinfo ) );
            $post->vbcredits[] = VBCREDITS::action(( ($post->condition AND ($postid = $post->fetch_field('postid')) == $thread['firstpostid']) ? 'thread' : 'post' ), $post->fetch_field('userid'), true, false, array('forumid' => $thread['forumid'], 'multiplier' => ( ($pagetext = $post->fetch_field('pagetext')) ? $pagetext : ( ($postinfo = fetch_postinfo($postid)) ? $postinfo['pagetext'] : '' ) ), 'ownerid' => $thread['postuserid']));
        }
    }

    function post($post)
    {
        global $vbulletin, $threadinfo;
        $thread = ( $post->info['thread'] ? $post->info['thread'] : ( $post->existing['forumid'] ? $post->existing : $threadinfo ) );

        $postid = $post->fetch_field('postid');
        $action = ( ($post->condition AND $postid == $thread['firstpostid']) ? 'thread' : 'post' );
        $refid = ( ($action == 'thread') ? $thread['threadid'] : $postid );
        if ($post->condition AND $post->existing['visible'] == 1) VBCREDITS::action($action, $post->fetch_field('userid'), $refid, true, array('forumid' => $thread['forumid'], 'multiplier' => $post->existing['pagetext'], 'ownerid' => ( $thread['postuserid'] ? $thread['postuserid'] : $threadinfo['postuserid'] )));

        if ($post->fetch_field('visible') == 1)
        {
            VBCREDITS::apply($post->vbcredits[0], $refid);
            if (sizeof($post->vbcredits) > 1) VBCREDITS::apply($post->vbcredits[1], $thread['threadid']);
        }
    }

    function delpost($post)
    {    //delete any reputation?
        if ($post->existing['visible'] == 1)
        {    //need to find this data
            global $threadinfo;
            $postinfo = ( $post->existing['userid'] ? $post->existing : fetch_postinfo($post->fetch_field('postid')) );
            VBCREDITS::action('post', $postinfo['userid'], $postinfo['postid'], true, array('forumid' => $threadinfo['forumid'], 'multiplier' => $postinfo['pagetext'], 'ownerid' => $threadinfo['postuserid']));
        }
    }

spent over 6 hours testing this, so please let me know how it goes.
 
Ok, here's what I got.
Tested various combination of deleting of posts - works great! :D
Deleting of multiple posts - works great too.
PS: for future users - you have to remember that a member's credits are updated only when he produces an activity or if the relevant cron-task has been set up (by default it is not).

Deleting of threads - DOES NOT WORK. When a moderator deletes a whole thread nothing happens to the credits of the members that had threads in the said post.

Darkwaltz4, plz can you fix the negation linked to threads deleting as well :rolleyes:
 
So does the thread award get negated correctly? You mean only the posts deleted as part of that thread arent negated?

ps, if you enable Immediate Transactions from the main settings (enabled by default) it will run the transactions in realtime. It doesnt update from actions done through ajax (notably, the quick- stuff) as that would require multiple file edits to minified javascript files... not going to happen. so a quick refresh will show you the updated amounts from that.
 
Last edited:
Status
Not open for further replies.

Similar threads

  • Locked
  • thread_type.dbtech_ecommerce_suggestion thread_type.dbtech_ecommerce_suggestion
Replies
1
Views
671

Legacy vBCredits II Deluxe

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