What Variable Can I Use For ThankYouLike To Show The Amount Of Likes On The First Post Of A thread In the forumdisplay_thread template?
What Variable Can I Use For ThankYouLike
06-07-2021, 09:50 AM
{$thread['tyls']}
or simply toggle on the plugin's "Enable thanks/likes count for first posts on forum pages?" setting and rely on the preexisting formatted {$tyl_forumdisplay_thread_var}
variable in that template.
06-07-2021, 02:07 PM
Can I get a list of all available variables and what they do?
It wont let me edit, but that worked thanks
I would also like to add the number of likes next to the like button, how would I do that?
It wont let me edit, but that worked thanks
I would also like to add the number of likes next to the like button, how would I do that?
06-07-2021, 03:47 PM
(06-07-2021, 02:07 PM)1Legend Wrote: I would also like to add the number of likes next to the like button, how would I do that?
Unintuitive as it is, you could add the
{$count}
variable to the thankyoulike_button_add
template.
06-07-2021, 03:50 PM
Oh wow that was simple. Thank you so much! Saved me so much time
06-07-2021, 03:58 PM
No worries. Re getting a comprehensive list of variables: that would be quite a task given the complexity of the code, so it's unlikely that anybody is going to provide that to you. It's probably best that you just ask for what you need specifically as and when you know that you need it.
07-07-2021, 03:21 AM
(06-07-2021, 03:58 PM)Laird Wrote: No worries. Re getting a comprehensive list of variables: that would be quite a task given the complexity of the code, so it's unlikely that anybody is going to provide that to you. It's probably best that you just ask for what you need specifically as and when you know that you need it.
The code {$thread['tyls']} was working for the forumdisplay_thread template, but now it is not. Any clue why?
07-07-2021, 03:56 AM
(07-07-2021, 03:21 AM)1Legend Wrote: The code {$thread['tyls']} was working for the forumdisplay_thread template, but now it is not. Any clue why?
No. I can't see any reason why it wouldn't work. Please re-check your template and its output. If it truly isn't working, then provide details as to what changed.
07-07-2021, 04:29 AM
(07-07-2021, 03:56 AM)Laird Wrote:(07-07-2021, 03:21 AM)1Legend Wrote: The code {$thread['tyls']} was working for the forumdisplay_thread template, but now it is not. Any clue why?
No. I can't see any reason why it wouldn't work. Please re-check your template and its output. If it truly isn't working, then provide details as to what changed.
nothing has changed, still doesn't work.
here is my forumdisplay_thread template:
<tr class="inline_row">
<td class="{$bgcolor}{$thread_type_class} responsiveN">
<div class="avatar_front"><div class="avatarep_fd"><a href="https://mywebsite.com/member.php?action=profile&uid={$thread['uid']}"><img src="uploads/avatars/avatar_{$thread['uid']}.png" alt="" onerror="uploads/avatars/avatar_{$thread['uid']}.jpg" style="width:30px; height: 30px;" /></div>
<div class="lh-1x5">
<span>{$prefix} {$gotounread}{$thread['threadprefix']}<a href="{$thread['threadlink']}"> {$thread['styled']}</a></span></span>
<div class="author smalltext">Started by {$thread['profilelink']} {$thread['multipage']}</div>
</div>
</td>
<td align="right" class="{$bgcolor}{$thread_type_class}" width="2%" style="border-right: 1px solid #1f2429;"><span class="thread_status {$folder}" title="{$folder_label}"> </span></td>
<td align="center" class="{$bgcolor}{$thread_type_class}" id="hide-responsive" style="border-left: 1px solid #464b54;border-right: 1px solid #464b54;">
<span style="float: left;">Replies:</span>
<span style="float: right;"><a href="{$mybb->settings['bburl']}/misc.php?action=whoposted&tid={$thread['tid']}" onclick="MyBB.whoPosted({$thread['tid']}); return false;">{$thread['replies']}</a></span>{$unapproved_posts}
<br>
<span style="float: left;">Views:</span>
<span style="float: right;">{$thread['views']}</span>
</td>
<td class="{$bgcolor}{$thread_type_class}" style="white-space: nowrap;">
<span class="lastpost smalltext">{$lastpostdate}<br />
<a href="{$thread['lastpostlink']}">by</a>: {$lastposterlink}</span>
</td>
<td align="center" class="{$bgcolor}{$thread_type_class}" id="hide-responsive" style="border-left: 1px solid #464b54;border-right: 1px solid #464b54;">
<span style="float: left;">Likes:</span>
<span style="float: right;">{$thread['tyls']}</span>
</td>
{$modbit}
</tr>
i replaced my websites domain with mywebsite.com for privacy.