Status
Not open for further replies.

sarahw

Customer
Hey there!

We were previously using the Thanks/Like Lite plugin version 1.0 and the User Tagging plugin.

We bought the pro user tagging plugin, then upgraded the plugin. We also upgraded the thanks/like plugin to the latest lite version.

Our thanks and like totals are still present. All the manage buttons, permissions and every other workaround mentioned in the forums has been tried. Still, I couldn't get the content of the thanks/like bar to show.

I checked my error log and it looks like Firebug is reporting that "Thanks_Obj is not defined" when attempting to call this function below each post:

Code:
<script type="text/javascript">
	<!-- 
	var Thanks2548181 = new Thanks_Obj();
	Thanks2548181.init('2548181');
	// -->
	</script>

It worked before in our custom theme, but not now. It worked before and now using the default theme.

Any thoughts or ideas on what I'm missing?

Thanks,
J
 
You'll need to revert all customised Thanks templates, as the underlying JS code has changed (we switched from YUI to jQuery) :)
 
Template Manager, expand the DragonByte Tech: Post Thanks / Like Templates group, look for any templates in red.

Repeat this for every skin you have :)
 
Thanks again. That definitely brought the buttons back rather than an empty box. However, clicking the buttons doesn't do anything. The href in the link is "javascript://", it's that way in the XML file we used to set it up. Below is the output of the thanks button:

Code:
<a data-button="thanks" data-postid="2548749" name="dbtech_thanks_button" href="javascript://">
<img border="0" style="top:0; vertical-align:middle;" alt="Thanks" src="dbtech/thanks/images/thanks.png" title="Thanks">
Thank for this post
</a>

Any ideas?
 
That's correct. Please re-check the error console to see if there's any further JS errors :)
 
OK, everything is looking good now except for the thanks stats. When I revert the dbtech_thanks_postbit file to the latest version, it only counts the thanks received and likes received since the add-on was upgraded. It still tracks all the old likes and thanks given, though.

When I switch to the custom template for dbtech_thanks_postbit, it shows all the old stats but does not update whenever a new like or thanks is given. Below is the old dbtech_thanks_postbit text:

Code:
<vb:comment>
<dd class="collapse" style="font-weight:bold;">{vb:rawphrase dbtech_thanks_stats} <a class="collapse" id="collapse_c_post{vb:raw post.postid}" href="{vb:raw relpath}#top" style="position:relative; top:0px; right:0px; float:none;" ><img src="{vb:stylevar imgdir_button}/collapse_40b.png" alt="" /></a></dd>
<div id="c_post{vb:raw post.postid}" style="display:none;">
</vb:comment>

<dd style="font-weight:bold; margin-top: 5px;">{vb:rawphrase dbtech_thanks_stats}</dd>
<div>
<vb:if condition="$vboptions['dbtech_thanks_postbit'] & 1 AND !($bbuserinfo['dbtech_thanks_settings'] & 1)">
    <dt>{vb:rawphrase dbtech_thanks_thanks}</dt>
    <dd>{vb:rawphrase dbtech_thanks_x_times, {vb:raw post.dbtech_thanks_thanks}}</dd>
</vb:if>
<vb:if condition="$vboptions['dbtech_thanks_postbit'] & 2 AND !($bbuserinfo['dbtech_thanks_settings'] & 2)">
    <dt>{vb:rawphrase dbtech_thanks_thanked}</dt>
    <dd>{vb:rawphrase dbtech_thanks_x_times, {vb:raw post.dbtech_thanks_thanked}}</dd>
</vb:if>
<vb:if condition="$vboptions['dbtech_thanks_postbit'] & 4 AND !($bbuserinfo['dbtech_thanks_settings'] & 4)">
    <dt>{vb:rawphrase dbtech_thanks_likes}</dt>
    <dd>{vb:rawphrase dbtech_thanks_x_times, {vb:raw post.dbtech_thanks_likes}}</dd>
</vb:if>
<vb:if condition="$vboptions['dbtech_thanks_postbit'] & 8 AND !($bbuserinfo['dbtech_thanks_settings'] & 8)">
    <dt>{vb:rawphrase dbtech_thanks_liked}</dt>
    <dd>{vb:rawphrase dbtech_thanks_x_times, {vb:raw post.dbtech_thanks_liked}}</dd>
</vb:if>
</div>

Any idea why it's not tallying both stats in either version of dbtech_thanks_postbit?
 
Revert the template then try running the Recalculate maintenance options in the AdminCP for the mod :)
 
Hey there. I just sent over a donation for your help. I reverted the template, and recalculated the totals but the same thing. It's only counting the thanks and likes received since we upgraded the add-on. The thanks given and likes given are calculating correctly.
 
Hmm, can you PM me with an AdminCP account and a FTP account? If so, I'll hopefully be able to solve it :)
 
Hey there, sorry for the delay. I did some digging around before chatting you back and the database table currently be used for the add on is vB_dbtech_thanks_statistics. It has the correct number of likes given, and thanks given, but the other columns are only showing new data since the upgrade.

Since reverting to the old template makes the old counts show but not the new ones, I am wondering if the old add on we were using (version 1.0) was using a different database table?
 
Yeah, previously the stats were stored in the user table, however when we moved over to an "infinite buttons" scheme that was no longer viable, so we created our own table :)
 
OK, what I ended up doing was running a few MYSQL queries to grab the data from the vB_user table and update it against the new data in the vB_dbtech_thanks_statistics table that had occurred since the plugin was updated.

Update to THANKED counts:

Code:
UPDATE `vB_dbtech_thanks_statistics`, `vB_user` SET `vB_dbtech_thanks_statistics`.`thanks_received` = `vB_dbtech_thanks_statistics`.`thanks_received` + `vB_user`.`dbtech_thanks_thanked` WHERE `vB_dbtech_thanks_statistics`.`userid` = `vB_user`.`userid`

Update to LIKED counts:

Code:
UPDATE `vB_dbtech_thanks_statistics`, `vB_user` SET `vB_dbtech_thanks_statistics`.`likes_received` = `vB_dbtech_thanks_statistics`.`likes_received` + `vB_user`.`dbtech_thanks_liked` WHERE `vB_dbtech_thanks_statistics`.`userid` = `vB_user`.`userid`

Thanks for your help!

Jason
 
Status
Not open for further replies.

Similar threads

Legacy Advanced Post Thanks / Like

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
4,037
Customer rating
5.00 star(s) 1 ratings
Back
Top