The following warnings occurred:
Warning [2] Undefined array key "sourceeditor" - Line: 718 - File: inc/plugins/rineditor.php PHP 8.2.22 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/rineditor.php 718 errorHandler->error_callback
/inc/plugins/rineditor.php 776 rineditor_inserter_quick
/inc/class_plugins.php 142 rineditor
/showthread.php 471 pluginSystem->run_hooks
Warning [2] Undefined array key 1 - Line: 3624 - File: inc/functions.php PHP 8.2.22 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/functions.php 3624 errorHandler->error_callback
/inc/plugins/avatarep.php 532 format_avatar
/inc/plugins/avatarep.php 1251 avatarep_format_avatar
/inc/class_plugins.php 142 avatarep_threads
/showthread.php 1648 pluginSystem->run_hooks



1Legend   06-07-2021, 05:09 AM
#1
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?
Laird   06-07-2021, 09:50 AM
#2
{$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.
1Legend   06-07-2021, 02:07 PM
#3
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?
This post was last modified: 06-07-2021, 02:29 PM by 1Legend.
Laird   06-07-2021, 03:47 PM
#4
(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.
1Legend   06-07-2021, 03:50 PM
#5
Oh wow that was simple. Thank you so much! Saved me so much time
Laird   06-07-2021, 03:58 PM
#6
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.
1Legend   07-07-2021, 03:21 AM
#7
(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?
Laird   07-07-2021, 03:56 AM
#8
(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.
1Legend   07-07-2021, 04:29 AM
#9
(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.
  
Users browsing this thread: 1 Guest(s)
Powered By MyBB, © 2002-2024 MyBB Group.
Made with by MattyWjeisz of Curves UI.