Thread: Show Thread Enhancements - [AJAX] Post Thank You Hack
View Single Post
  #1357  
Old 03-06-2011, 07:41 AM
Leo777 Leo777 is offline
 
Join Date: Jan 2011
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Over the past years, many people have reported a problem when using this mod - after clicking Thanks the following error appears :

Quote:
Could not find phrase 'post_thanks'.
It's been reported since 2006 (see here) and apparently still hasn't been fixed. Some people have even stopped using the mod due to this error, even though the error is only a message and doesn't affect functionality of the mod.

I think the main reason it hasn't been fixed is because the error is rarely seen - that's because the 'Redirecting' page is not seen by most people due to the use of AJAX. However, while testing this mod with various browsers and various settings, I have seen this error a few times. One way to see the error is to right-click the Thanks button and open it in a new tab, then it doesn't use AJAX so the error will appear temporarily before the page is reloaded. But I've also seen the error in other (rare) situations.

I couldn't find any solutions online so I tried to find a solution myself. First I tried to manually create the missing phrase, but I couldn't get it to work. Then I searched the post_thanks templates to manually fix it, but I couldn't find anywhere to fix it there, so then I searched the actual files included in the zip but I'm not an expert coder so I still couldn't figure out how to fix it.

Fortunately I then came up with a quick-fix solution and figured I should post it here in case anyone else wants to use it. It's very simple - you just use the Replacement Variable Manager to get rid of the message! So in your admin control panel just go to the Replacement Variable Manager, click 'Add New Replacement Variable' then in the top box enter the following :

Quote:
could not find phrase 'post_thanks'.
And just leave the bottom box blank, then Save. No more error message

Hope this helps someone!
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01161 seconds
  • Memory Usage 1,767KB
  • 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
  • (2)bbcode_quote
  • (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