cclaerhout
Customer
Hello, first of all thank for your this hack. It's great. But, because there is a "but", the documentation is... not ^^. Fortunately there is this forum, but the information are everywhere so it takes time to collect them. The purpose of this post is to put them together. And only for vBulletin 3.8 Professional version.
I- On vB 4 the "Post Thanks / Like" under every message is pretty, but on vB 3, it's ugly.
NOTE:If you do that, you will have to use the "(Pro) Integrate Action Buttons" option of your Admincp->DBTech - Post Thanks->Settings->General Options
The solution is in this thread.
UPDATE LINK
First you will have to edit the JavaScript file "dbtech/thanks/clientscript/thanks.js" (see here)
UPDATE LINK
Then you will have to edit the Template "dbtech_thanks_postbit_entries" (see here, you will have two options. I personally prefere the second one)
UPDATE LINK
II- I love the "Post Thanks / Like" stats in the Postbit BUT they are always collapsed.
The solution is given is this thread.
You will have to edit the Template "dbtech_thanks_postbit" (see here).
Edit: this solution is working, but if you press F5, it you invert the collapse option. So here is a more radical solution:
In "dbtech_thanks_postbit" search:
And replace with:
III- I used the "(Pro) Integrate Action Buttons" option, but I don't want any text, just buttons
I guess there are several ways to do it, but I've chosen the one that use two buttons for each "buttons category". What does it mean ? When you GIVE a "thank", the button is in color. When you want to TAKE BACK your thank, the button is in grey.
So the first thing you need is that grey buttons. I did for you:


The next step is to edit your template (dbtech_thanks_postbit_entries_actionbit) and replace its content with the following simple line of code :
Go to Action Text and insert this code (you will of course to edit it):
Go to Undo Text and insert this code (you will of course to edit it):
Do this for every of your buttons.
Please note that:
V- I have imported the Thanks data from "Post Thank You Hack" but its stats are not displayed in postbit
Just go to your Admincp->DBTech - Post Thanks->Maintenance and Recalculate & Rebuild statistics.
VI- In the public section how can I search inside the Stats ?
First of all there is a little problem inside the dbtech/thanks_pro/actions/list.php file. You have to edit it, search for the five :
and replace to :
There's no particular function yet, but you can perform this search adding information to the url of thanks.php. Here are some examples.
Two parameters search:
I want to see all the "thanks" given by Administrator (userid 1) :
I want to see all the "likes" given by Bobby (userid 33) :
I want to see all the "thanks" given TO this Great Administator (userid 1):
I want to see all the "thanks" given inside the thread dedicated to surfing (threadid 12345):
Three parameters search:
I want to see all the "Likes" Bobby (userid 33) has given to the Administrator (userid 1):
Four parameters search:
I want to see all the "Likes" Bobby (userid 33) has given to the Administrator (userid 1) in the thread dedicated to surfing (theadid 12345):
So why all of this ? Because I now can make the hack I wanted to do (see here) very easily !
La vie est belle !
Thanks again. Hope this tutorial will help 3.8 users.
I- On vB 4 the "Post Thanks / Like" under every message is pretty, but on vB 3, it's ugly.
NOTE:If you do that, you will have to use the "(Pro) Integrate Action Buttons" option of your Admincp->DBTech - Post Thanks->Settings->General Options
The solution is in this thread.
UPDATE LINK
First you will have to edit the JavaScript file "dbtech/thanks/clientscript/thanks.js" (see here)
UPDATE LINK
Then you will have to edit the Template "dbtech_thanks_postbit_entries" (see here, you will have two options. I personally prefere the second one)
UPDATE LINK
II- I love the "Post Thanks / Like" stats in the Postbit BUT they are always collapsed.
The solution is given is this thread.
You will have to edit the Template "dbtech_thanks_postbit" (see here).
Edit: this solution is working, but if you press F5, it you invert the collapse option. So here is a more radical solution:
In "dbtech_thanks_postbit" search:
Code:
<div id="collapseobj_$post[thankspostid]" style="$post[thankscollapseobj]">
Code:
<div id="collapseobj_$post[thankspostid]" style="display:none;">
III- I used the "(Pro) Integrate Action Buttons" option, but I don't want any text, just buttons
I guess there are several ways to do it, but I've chosen the one that use two buttons for each "buttons category". What does it mean ? When you GIVE a "thank", the button is in color. When you want to TAKE BACK your thank, the button is in grey.
So the first thing you need is that grey buttons. I did for you:



The next step is to edit your template (dbtech_thanks_postbit_entries_actionbit) and replace its content with the following simple line of code :
Code:
<a href="javascript://" onclick="Thanks{$post[postid]}.ajax_call('{$button[varname]}');">{$phrase}</a>
Explanation:This edit will in fact suppress the default button system ^^
So, the next step is to edit each button one by one. I'm giving you on example. Let's edit the "Thanks" button.
So, the next step is to edit each button one by one. I'm giving you on example. Let's edit the "Thanks" button.
Go to Action Text and insert this code (you will of course to edit it):
Code:
<img width="18" height="18" border="0" alt="[B]Put your message here for adding a thank[/B]" src="http://[B]www.your-forum-link.com[/B]/forum/dbtech/thanks/images/[B]thanks.png[/B]" />
Code:
<img width="18" height="18" border="0" alt="[B]Put your message here for taking back a thank[/B]" src="http://[B]www.your-forum-link.com[/B]/forum/dbtech/thanks/images/[B]thanks[COLOR="#FF8C00"]_off[/COLOR].png[/B]" />
Do this for every of your buttons.
Please note that:
- The alt attribute of the <img> tag can't be filled with the {$button[title]} variable. It won't be parsed.
- When you just press the "give a thank" button, the image description (text alt of attribute) will be displayed, but once the "take back my thank" button which appear using AJAX, it's description won't be displayed. The page need to be reloaded for that. But it's really a minor "problem".
V- I have imported the Thanks data from "Post Thank You Hack" but its stats are not displayed in postbit
Just go to your Admincp->DBTech - Post Thanks->Maintenance and Recalculate & Rebuild statistics.
VI- In the public section how can I search inside the Stats ?
First of all there is a little problem inside the dbtech/thanks_pro/actions/list.php file. You have to edit it, search for the five :
Code:
$hook_query_where .= 'AND entry.
Code:
$hook_query_where .= ' AND entry.
Explanation: A space is missing. When you want to use more than two parameters in your search, it will cause a SQL error.
There's no particular function yet, but you can perform this search adding information to the url of thanks.php. Here are some examples.
Two parameters search:
I want to see all the "thanks" given by Administrator (userid 1) :
Code:
http://[B]www.your-forum-link.com[/B]/forum/thanks.php?do=list&varname=[B]thanks[/B]&userid=[B]1[/B]
I want to see all the "likes" given by Bobby (userid 33) :
Code:
http://[B]www.your-forum-link.com[/B]/forum/thanks.php?do=list&varname=[B]likes[/B]&userid=[B]33[/B]
I want to see all the "thanks" given TO this Great Administator (userid 1):
Code:
http://[B]www.your-forum-link.com[/B]/forum/thanks.php?do=list&varname=[B]thanks[/B]&receiveduserid=[B]1[/B]
I want to see all the "thanks" given inside the thread dedicated to surfing (threadid 12345):
Code:
http://[B]www.your-forum-link.com[/B]/forum/thanks.php?do=list&varname=[B]thanks[/B]&contentid=[B]12345[/B]
Three parameters search:
I want to see all the "Likes" Bobby (userid 33) has given to the Administrator (userid 1):
Code:
http://[B]www.your-forum-link.com[/B]/forum/thanks.php?do=list&varname=[B]likes[/B]userid=[B]33[/B]&receiveduserid=[B]1[/B]
Four parameters search:
I want to see all the "Likes" Bobby (userid 33) has given to the Administrator (userid 1) in the thread dedicated to surfing (theadid 12345):
Code:
http://[B]www.your-forum-link.com[/B]/forum/thanks.php?do=list&[U]varname[/U]=[B]likes[/B][U]userid[/U]=[B]33[/B]&[U]receiveduserid[/U]=[B]1[/B]&[U]contentid[/U]=[B]12345[/B]
So why all of this ? Because I now can make the hack I wanted to do (see here) very easily !

La vie est belle !
Thanks again. Hope this tutorial will help 3.8 users.
Last edited: