Current time: 22-09-2021, 03:05 AM
Hello There, Guest!
Login 
  • Search
  • What Variable Can I Use For ThankYouLike


    Junior Member
    #1
    Template Edit 
    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?
    Like Reply
    MyBB Group Developer
    #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.
    Like Reply
    Junior Member
    #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?
    Like Reply
    MyBB Group Developer
    #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.
    Like Reply
    Junior Member
    #5
    Oh wow that was simple. Thank you so much! Saved me so much time
    Like Reply
    MyBB Group Developer
    #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.
    Like Reply
    Junior Member
    #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?
    Like Reply
    MyBB Group Developer
    #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.
    Like Reply
    Junior Member
    #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.
    Like Reply