vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Show Thread Enhancements - [AJAX] Post Thank You Hack (https://vborg.vbsupport.ru/showthread.php?t=231666)

Black Snow 05-07-2014 01:16 PM

That MAY only work if a member has a signature. There must have been code changes from 7.82 that has caused the box to not be able to be inserted inside the post.

Black Snow 05-07-2014 01:21 PM

@dreadsuk, if you install version 7.82 product and upload the files, follow these steps and see if it works for you. This worked for me in the past.

In postbit_legacy, find:
Code:

                        <vb:if condition="$show['postedited'] || $post['signature']">
                        <div class="after_content">
                                <vb:if condition="$show['postedited']">

Add this above:
Code:

{vb:raw template_hook.postbit_messagearea_end}
Replace your postbit_display_complete plugin with this:
Code:

require_once(DIR . '/includes/functions_post_thanks.php');

if (!(defined('LOCATION_BYPASS')) && !(post_thanks_off($this->thread['forumid'], $this->post, $this->thread['firstpostid'], THIS_SCRIPT)))
{
        global $ids;

        $thanks = fetch_thanks($this->post['postid'], $ids);

        if (thanked_already($this->post) && $this->registry->options[post_thanks_delete_own])
        {
                $this->post['show_thanks_remove_option'] = true;
        }

        if ($this->post['post_thanks_amount'] > 0 && $this->thread['isdeleted'] == 0)
        {
                $this->post['post_thanks_bit'] = fetch_thanks_bit($this->thread['forumid'], $thanks);
                $this->post['post_thanks_user'] = $post_thanks_user;
                $this->post['post_thanks_amount_formatted'] = vb_number_format($this->post['post_thanks_amount']);

                $post_thanks_box = fetch_post_thanks_template($this->post);
        }

        $templater = vB_Template::create('post_thanks_box');
        $templater->register('post', $post);
        $templater->register('post_thanks_box', $post_thanks_box);
        $template_hook['postbit_messagearea_end'] .= $templater->render();
}

if ($this->registry->userinfo['userid'] != 0 && !(defined('LOCATION_BYPASS')) && !(post_thanks_off($thread['forumid'], $post, $thread['firstpostid'], THIS_SCRIPT)))
{
        $display_thanks_image = 'none';

        if (can_thank_this_post($post, $thread['isdeleted']) && !thanked_already($post))
        {
                $display_thanks_image = '';
        }

        $templater = vB_Template::create('post_thanks_button');
        $templater->register('post', $post);
        $templater->register('display_thanks_image', $display_thanks_image);
        $template_hook['postbit_controls'] .= $templater->render();
}

if ($this->registry->options['post_thanks_show_stats_postbit'])
{
        $post['post_thanks_user_amount_formatted'] = vb_number_format($post['post_thanks_user_amount']);
        $post['post_thanks_thanked_times_formatted'] = vb_number_format($post['post_thanks_thanked_times']);
        $post['post_thanks_thanked_posts_formatted'] = vb_number_format($post['post_thanks_thanked_posts']);

        $templater = vB_Template::create('post_thanks_postbit_info');
        $templater->register('post', $post);
        $template_hook['postbit_userinfo_right_after_posts'] .= $templater->render();
}


DreadsUK 05-07-2014 07:26 PM

Quote:

Originally Posted by Black Snow (Post 2496644)
@dreadsuk, if you install version 7.82 product and upload the files, follow these steps and see if it works for you. This worked for me in the past.

In postbit_legacy, find:
Code:

                        <vb:if condition="$show['postedited'] || $post['signature']">
                        <div class="after_content">
                                <vb:if condition="$show['postedited']">

Add this above:
Code:

{vb:raw template_hook.postbit_messagearea_end}
Replace your postbit_display_complete plugin with this:
Code:

require_once(DIR . '/includes/functions_post_thanks.php');

if (!(defined('LOCATION_BYPASS')) && !(post_thanks_off($this->thread['forumid'], $this->post, $this->thread['firstpostid'], THIS_SCRIPT)))
{
        global $ids;

        $thanks = fetch_thanks($this->post['postid'], $ids);

        if (thanked_already($this->post) && $this->registry->options[post_thanks_delete_own])
        {
                $this->post['show_thanks_remove_option'] = true;
        }

        if ($this->post['post_thanks_amount'] > 0 && $this->thread['isdeleted'] == 0)
        {
                $this->post['post_thanks_bit'] = fetch_thanks_bit($this->thread['forumid'], $thanks);
                $this->post['post_thanks_user'] = $post_thanks_user;
                $this->post['post_thanks_amount_formatted'] = vb_number_format($this->post['post_thanks_amount']);

                $post_thanks_box = fetch_post_thanks_template($this->post);
        }

        $templater = vB_Template::create('post_thanks_box');
        $templater->register('post', $post);
        $templater->register('post_thanks_box', $post_thanks_box);
        $template_hook['postbit_messagearea_end'] .= $templater->render();
}

if ($this->registry->userinfo['userid'] != 0 && !(defined('LOCATION_BYPASS')) && !(post_thanks_off($thread['forumid'], $post, $thread['firstpostid'], THIS_SCRIPT)))
{
        $display_thanks_image = 'none';

        if (can_thank_this_post($post, $thread['isdeleted']) && !thanked_already($post))
        {
                $display_thanks_image = '';
        }

        $templater = vB_Template::create('post_thanks_button');
        $templater->register('post', $post);
        $templater->register('display_thanks_image', $display_thanks_image);
        $template_hook['postbit_controls'] .= $templater->render();
}

if ($this->registry->options['post_thanks_show_stats_postbit'])
{
        $post['post_thanks_user_amount_formatted'] = vb_number_format($post['post_thanks_user_amount']);
        $post['post_thanks_thanked_times_formatted'] = vb_number_format($post['post_thanks_thanked_times']);
        $post['post_thanks_thanked_posts_formatted'] = vb_number_format($post['post_thanks_thanked_posts']);

        $templater = vB_Template::create('post_thanks_postbit_info');
        $templater->register('post', $post);
        $template_hook['postbit_userinfo_right_after_posts'] .= $templater->render();
}


Bummer!
https://vborg.vbsupport.ru/external/2014/05/43.png

ForceHSS 05-07-2014 07:30 PM

Quote:

Originally Posted by DreadsUK (Post 2496708)

https://vborg.vbsupport.ru/showpost....postcount=1846

DreadsUK 05-07-2014 08:02 PM

Quote:

Originally Posted by ForceHSS (Post 2496709)

Thats the one i currenly have installed. The issue i have with this version is i am unable to move the like box into the post itself instead of under it

ForceHSS 05-07-2014 08:46 PM

if you had that one installed then you would not be having the issue you have with it
Quote:

Originally Posted by DreadsUK (Post 2496708)

as mine has this problem removed

DreadsUK 05-07-2014 09:11 PM

Quote:

Originally Posted by ForceHSS (Post 2496723)
if you had that one installed then you would not be having the issue you have with it

as mine has this problem removed

im not sure i follow.

Im running VB4.2.2

i currently have version 'post_thanks_7_84_with search fix' installed. I am unable to move the like post box into the post itself instead of underneath it.

I tried to install version 7.82 and this was the message i recieved

https://vborg.vbsupport.ru/external/2014/05/43.png

ForceHSS 05-07-2014 09:26 PM

Edit this line in the xml
Code:

<dependency dependencytype="vbulletin" minversion="4.0.0 beta 4" maxversion="4.1.0 alpha 1" />
Change it to this
Code:

<dependency dependencytype="vbulletin" minversion="4.0.0" maxversion="" />
do this if you want to try the 7.82 version

redfinite 05-09-2014 06:11 AM

I love this mod and it has run flawlessly on my forum since installed and is very popular.

Im not very good at coding and was wondering if anyone could help me with a line of code which would give you a quality percentage in your postbit.. For example at the moment it might say...

Thanked 1000 times in 500 posts.

I would like to have...

Thanked 1000 times in 500 posts
Thanks percentage: 50%

Can anyone help me with the code and where I need to edit this?

addamroy 05-16-2014 04:11 PM

How do I edit the post_thanks_postbit_info template so that the thanked posts and posts thanked link to the thanked posts and posts thanked pages, like the links on the 'about me' page of their profile? Basically I want the numbers in the postbit to link to the same page as the about me thanks info links.

I have a feeling there's a post here about it somewhere, a link would be great I've searched the thread a couple times.


All times are GMT. The time now is 03:03 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.05699 seconds
  • Memory Usage 1,766KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)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