Forum Thank You Like System Template Bug, Fix Provided
#1
Currently, when you like a post the button stays "like" when it really should change to "unlike". This is because the template is setup incorrectly, this is an easy fix.

The bug comes from the fact that the <a> tags are not surrounded by the correct div that lets the JavaScript update the rest of it.
This is the almost proper template for
thankyoulike_button_add
PHP Code:
<div id="tyl_btn_{$post['pid']}class="postbit_buttons">
<
span class="pbbutton">
<
a href="thankyoulike.php?action=add&amp;pid={$post['pid']}&amp;my_post_key={$mybb->post_code}onclick="return thankyoulike.add({$post['pid']}{$post['tid']});" title="{$lang->add_tyl}id="tyl_a{$post['pid']}">
<
font color="green">
<
class="fa fa-thumbs-up"></i>
</
font>
<
span class="ocultaresponsive">
Like
</span>
</
a>
</
span>
</
div
I'm sure you can figure it out but you'll need to edit/change the content of the <a> tag I provided as their might be errors. I should™ be correct for the Fearless Light theme.

You'll have to do the same thing for thankyoulike_button_del except the surrounding div will be
PHP Code:
<div id="tyl_btn_{$post['pid']}class="postbit_buttons">
<!-- <
atag goes here-->
</
div

This will make it so if you like a post accidentally you can unlike it without having to refresh.
[Image: nypdcruiser.gif]


Messages In This Thread
Forum Thank You Like System Template Bug, Fix Provided - by goigle! - 01-14-2016, 04:13 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)