01-14-2016, 04:13 AM
(This post was last modified: 09-01-2022, 01:04 AM by Fearless Community.
Edit Reason: Fixed Encoding
)
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
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
This will make it so if you like a post accidentally you can unlike it without having to refresh.
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&pid={$post['pid']}&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">
<i class="fa fa-thumbs-up"></i>
</font>
<span class="ocultaresponsive">
Like
</span>
</a>
</span>
</div>
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">
<!-- <a> tag goes here-->
</div>
This will make it so if you like a post accidentally you can unlike it without having to refresh.