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

XF 1.5 Profile Post Comment Conditional

Amaury

Well-known member
#1
For posts and profile posts, I have a View Likes link that instantly takes you to the likes overlay.

Now that we've updated to 1.5, I'd like to do the same thing for profile post comments. I'm not seeing anything I can use for reference in the new profile_post_comment, but this is what I have in the profile_post template:

Code:
                    <xen:if is="{$profilePost.likes}">
                        <a href="{xen:link 'profile-posts/likes', $profilePost}" class="item control OverlayTrigger">{xen:phrase khflare_view_likes, 'count={xen:number $profilePost.likes}'}</a>
                    </xen:if>
Would adjusting it like so for comments be correct?

Code:
                    <xen:if is="{$profilePostComment.likes}">
                        <a href="{xen:link 'profile-posts/likes', $profilePostComment}" class="item control OverlayTrigger">{xen:phrase khflare_view_likes, 'count={xen:number $profilePostComment.likes}'}</a>
                    </xen:if>
 

Chris D

XenForo developer
Staff member
#2
Should be mostly the same but $comment and profile-posts/comments/likes instead of $profilePostComment and profile-posts/likes