• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Add-on: Display Likes Given (similar to Likes Received)

calorie

Active member
#1
This add-on shows you the 'likes' you have given to other members. Its display is similar to what you see when you look at your 'likes' received. The code is from the XF 'likes' received code with some modifications to get it to show 'likes' given by you to other members. This add-on has been tested and no bugs were found, but no guarantees it is bug free (with me being new with working with XF and all). If you have problems, just post them and I'll see if I can work them out, but please be patient when waiting for a response. Thanks and enjoy. :)

This add-on was requested here. Thanks to Dismal Shadow for the following screenshot.

 

Attachments

calorie

Active member
#9
Two template edits are contained in the readme file inside the zip archive that is attached to the first post in this thread.
 
#11
Nice add-on release, however there is one small bug.


upload/library/LikesGiven/ViewPublic/Account/Likes.php

Line 17, 3rd parameter.

$item['likee_avdate'] = $this->getLikeeAvatarFilePath($item['content']['user_id'], $item['likee_avdate'], $size = 's');
Should be..

$item['likee_avdate'] = $this->getLikeeAvatarFilePath($item['content']['user_id'], $item['likee_avdate'], 's');
 

calorie

Active member
#12
Nice add-on release, however there is one small bug.


upload/library/LikesGiven/ViewPublic/Account/Likes.php

Line 17, 3rd parameter.



Should be..
Thanks but the $size = 's' assigns 's' to $size which then gets passed to getLikeeAvatarFilePath so it's okay, but if you want to change it to just 's' instead, you can but you don't need to make that change. :)
 

CFodder

Well-known member
#13
Two template edits are contained in the readme file inside the zip archive that is attached to the first post in this thread.
Sorry my bad, I slightly misread what King did, was trying to have it so could the the number of likes given. Is that possible btw?
 
#15
To add a navigation menu:

Open Templates -> navigation

Find:
Code:
<!-- help -->
       <xen:if is="{$tabs.help}">
Add above:
Code:
<!-- likesgiven -->

        <li class="navTab likes PopupClosed"><a href="{xen:link account/likes-given}" class="navLink">Likes Given</a></li>
 

high1976

Active member
#19
issue: its trying to grab an avatar for those who don't have one which result in empty icons instead default userpic and filling the errorlog with requests to not existing avatars. Any chance to fix this? ;)