• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Like thread's first post from within the thread list

RichardKYA

Well-known member
#1
Would it be possible to like a thread's first post from within the thread list?

I've added the likes count to the thread_list_item so that it is viewable in the thread list...

Screen Shot 2016-02-14 at 01.04.53.jpg

...if possible I would like to turn it into a button so that users can like the first post from here.


I'm not sure if it will work or mess things up, so I haven't tried anything yet, but as an example, would something like this work...

Code:
                <xen:if is="{$canLike}">
                    <a href="{xen:link posts/like, $thread.first_post_id}" class="LikeLink item">Like</a>
                </xen:if>
I know that will not be correct, but it's just an example to help explain what I mean

Thank you for any input :)