[AJAX] Post Thank You Hack

vBulletin [AJAX] Post Thank You Hack 1.0.0

Register & Get access to index
vBulletin Versions
4.2 . 4.1
Description:
The system of gratitude for the message, in short - the "Thank you" hack. The latest version of the [AJAX] Post Thank You Hack was updated on 03 Jan 2010 and according to reviews on vb.org - many do not work on version 4.1. This is the same hack from Abe1, only updated to work on version 4.1 + added integration with Post Groans hack, since the author no longer maintains his mod.

There is a bug in the hack, which clearly manifests itself on the forums of versions 4.1.3 and 4.1.4 (I didn’t check the earlier ones, because I don’t have them at hand).
Namely, when the hack is enabled, the "Moderation" menu (top) does not work correctly when viewing a topic (items "Select all", "Deselect all", "Invert selection", etc.). Only the first message is selected (unselected), then a JavaScript error occurs.

The reason is that the block with thanks is assigned incl. the postbitim class (apparently, this block should be highlighted in color along with the message related to it), and blocks with this class are collected in a collection of JavaScript objects, where a certain structure is implied (including the presence of a checkbox, and apparently not only).

I didn’t dig very deep, I’ll wait for a fix from the developer. And in order to restore the functionality of the "Moderation" menu, I propose to make the following correction to the product code (xml file) for the time being:

Looking for the line:
PHP:
<template name="post_thanks_box" templatetype="template" date="1262489133" username="Phaedrus" version="7.83">
<![CDATA[<li class="postbit<vb:if condition="$vboptions['legacypostbit']">legacy</vb:if> postbitim" id="post_thanks_box_{vb:raw post.postid}"<vb:if condition="!$post_thanks_box == 1"> style="display:none"</vb:if>>
And we remove the postbitim class from the li element from it, i.e. should get:
PHP:
<template name="post_thanks_box" templatetype="template" date="1262489133" username="Phaedrus" version="7.83">
<![CDATA[<li class="postbit<vb:if condition="$vboptions['legacypostbit']">legacy</vb:if>" id="post_thanks_box_{vb:raw post.postid}"<vb:if condition="!$post_thanks_box == 1"> style="display:none"</vb:if>>
This way the thank you blocks will not be highlighted along with their messages, but the menu functionality will be restored and no JavaScript error will occur.
Author
Haim
Views
First release
Last update
Rating
0.00 star(s) 0 ratings
Back
Top Bottom