Fearless Forums
Forum Thank You Like System Template Bug, Fix Provided - Printable Version

+- Fearless Forums (https://fearlessrp.net)
+-- Forum: CityRP Server (https://fearlessrp.net/forumdisplay.php?fid=6)
+--- Forum: Bugs (https://fearlessrp.net/forumdisplay.php?fid=128)
+---- Forum: Fixed/Closed (https://fearlessrp.net/forumdisplay.php?fid=129)
+---- Thread: Forum Thank You Like System Template Bug, Fix Provided (/showthread.php?tid=67919)



Forum Thank You Like System Template Bug, Fix Provided - goigle! - 01-14-2016

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.


RE: Forum Thank You Like System Template Bug, Fix Provided - rand0m0mg - 01-15-2016

Yeah lol, im gonna like this thread to see if i have that bug too



Spoiler :
edit: i did




RE: Forum Thank You Like System Template Bug, Fix Provided - goigle! - 01-15-2016

LOL I didn't post this to farm likes


RE: Forum Thank You Like System Template Bug, Fix Provided - Ali - 01-15-2016

Free likes Wink


RE: Forum Thank You Like System Template Bug, Fix Provided - Edned - 01-16-2016

Yeah I agree, that does need to be fixed. Soul probably made a few hiccups while coding this theme.


Spoiler :
Yeah, watch out for Ivan.






RE: Forum Thank You Like System Template Bug, Fix Provided - Baskingner - 01-16-2016

Just refresh the page and it Changes to "Unlike" Wink

Sorry OP xD


RE: Forum Thank You Like System Template Bug, Fix Provided - goigle! - 01-17-2016

(01-16-2016, 04:25 PM)Edned Wrote: Yeah I agree, that does need to be fixed. Soul probably made a few hiccups while coding this theme.
It's actually nothing Soul did Tounge
The way the plugin inserts itself into templates was setup incorrectly for some reason.


RE: Forum Thank You Like System Template Bug, Fix Provided - goigle! - 01-17-2016

(01-16-2016, 04:32 PM)Baskingner Wrote: Just refresh the page and it Changes to "Unlike" Wink

Sorry OP xD

The entire point of AJAX and jQuery is so you don't have to refresh the page so this is in fact a bug


RE: Forum Thank You Like System Template Bug, Fix Provided - Rylund - 04-03-2016

Fixed