• 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
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.

screen-shot-2010-10-08-at-12-37-07-am-png.3921
 

Attachments

Calorie, I may be missing it, but how'd you add Likes Given to the sidebar of the user control panel?
 
Two template edits are contained in the readme file inside the zip archive that is attached to the first post in this thread.
 
Two template edits are contained in the readme file inside the zip archive that is attached to the first post in this thread.
I noticed that after I posted. That's something that should be changed, because template edits are horrible.
 
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');
 
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. :)
 
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?
 
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>
 
Great add-on, will consider adding this to the next beta or rc on xenfans
 
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? ;)
 
Top Bottom