Closed (fixed)
Project:
FriendList
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Sep 2008 at 10:08 UTC
Updated:
22 May 2009 at 18:19 UTC
Users are not aware of the possibility to add a content's author to their friendlist. Now the only way to add a user to your friendlist, is by navigating to the users' profile.
It would be great if the module would create a block (like User Relationships does) with some actions like "add this user to my friendlist", and of course "remove this user from my friendlist.
Comments
Comment #1
Babalu commentedsubscribing
Comment #2
gausarts commentedOr by appending a link add or remove at the end of the username like buddylist. Perhaps in template layer? Subscribing. Thanks
Comment #3
mercmobily commentedHi,
* Adding a link to the user name can be done by theming the user name. However, I don't think it's a good idea
* Having a block with the possible links about that user seems like a _good_ idea. I will probably code it tomorrow.
But... before I do that, Marius, it is possible to create such a block using Views? I would prefer it as a solution...
Bye,
Merc.
Comment #4
Flying Drupalist commentedWhat's the code for a custom link? So I can place it anywhere, not just in a block, which afterall is a big space.
Comment #5
mercmobily commentedHi,
I just realised... (It was 5Am when I wrote my previous message)
This needs to be a custom block. It's very easy to write, but Views is not gonna do it. Sorry to bother you Marius :-D
If you look into friendlist_ui.module, you will find:
##################################################################
# UTILITY FUNCTIONS USEFUL TO SNIPSETS AND CODERS
##################################################################
Amongst those functions:
That's how you do it :-D
Merc.
Comment #6
mercmobily commentedHi,
OK, documentation fixed and block added.
Please let me know if there are any problems with ut.
Merc.
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #8
Babalu commentedcan someone please make a patch to integrate this code ?
i'm not really good in code integrating :)
Comment #9
mercmobily commentedHi,
Why did you reopen this?
The request was about having a block that listed the available links for the content author.
This has been implemented -- all you have to do is add the block.
If the block doesn't work as intended, please reopen this.
If you have any other questions or doubts, please open a new ticket.
Bye!
Merc.
Comment #10
Babalu commentedoh sorry sorry
i haven't recognize it
Comment #11
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #12
chicagotech commentedAfter installing the Friendlist module, all you need to do is add a line like
print (friendlist_ui_get_link('add', $node->uid, 'friend'));
to your node.tpl.php template, or other functional area that you want the "Add to friends" link to show up. Integrating the functionality seems easy at the beginning (which is where I am at). The readme file lays out the use of this and other functions.
Comment #13
mercmobily commentedHi,
(thanks chicagotech)
Merc.
Comment #14
andrenoronha commentedhow can i do this with user relationship? it creates a block for this, but i'd like to get the add or remove link to a custom block