Thread: Show Thread Enhancements - [AJAX] Post Thank You Hack
View Single Post
  #3375  
Old 05-05-2014, 09:12 AM
fxdigi-cash fxdigi-cash is offline
 
Join Date: Jul 2012
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, I will make it a lot easier for you so you don't waste your time....

here is the code for postbit_display_complete replace this with the one you have and save it...

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_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_thanks'] .= $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();
}
Then use this hook in your postbit_legacy,

Code:
{vb:raw template_hook.postbit_thanks}
place it after

Code:
{vb:raw template_hook.postbit_signature_end}

check it and see!!
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02160 seconds
  • Memory Usage 1,766KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete