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]
#2
Yeah lol, im gonna like this thread to see if i have that bug too



Spoiler :
edit: i did

#3
LOL I didn't post this to farm likes
[Image: nypdcruiser.gif]
#4
Free likes Wink
[Image: XLnyw5R.jpg]
Edward John Smith is my idol!
Some say that the Titanic would be a sinking ship, but it just left the criticizers at dock and hit an iceberg.

Original signature idea made by Grub edited to fit my account (Added this to abide by forum rule 3e.)
#5
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.



Regards,
Edned

[Image: get.php?s=STEAM_0:0:51199704&b=16]
+Rep
The following 1 user Likes Edned's post:
  • Grunt
#6
Just refresh the page and it Changes to "Unlike" Wink

Sorry OP xD
#7
(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.
[Image: nypdcruiser.gif]
#8
(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
[Image: nypdcruiser.gif]
The following 1 user Likes goigle!'s post:
  • Astari
#9
Fixed


Forum Jump:


Users browsing this thread: 1 Guest(s)