Closed (fixed)
Project:
User Relationships
Version:
5.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
20 Dec 2007 at 23:18 UTC
Updated:
10 Oct 2008 at 10:36 UTC
How long before this module gets the attention of buddylist and we get snippets for custom profiles?
Comments
Comment #1
sprsquish commentedDefine "snippets for custom profiles"
Comment #2
netentropy commentedlike a snippet to show your top 10 buddies on your user.tpl.php
Comment #3
sprsquish commentedSorry, I may just be dense, but I'm still not sure what you mean by snippets. Are you talking about blocks that could be used, or code examples that developers could use? I'm still not exactly sure.
Comment #4
lias commentedI think he's talking about the php code in the drupal handbook php snippets section http://drupal.org/handbook/customization/snippets. THese are used to place in your custom profile pages, etc.
Comment #5
netentropy commentedyes.
when making a custom user profile....how could we show the avatars of our buddies
Comment #6
VVN commentedmy php skill sucks at this time, like my english skill, but this may works:
not tested, i'm using another code and now i can't test this. tell me if you has problems
Comment #7
sprsquish commentedThis would be the more "user relationships" way to do it:
The loader will accept any valid column as a condition, so we let the database find 10 approved relationships sorted at random.
Pushing each avatar into an array lets us easily change the output in the future. This can quickly become a list or table without needing to muck with the loading code.
Comment #8
netentropy commentedis there a way to show a top 10 or the first ten
Comment #9
Joe Malik commentedHi, first of all thx a lot for the code snippet.
The last snippet is causing an error, because the array $printamici isn't initialized correctly:
$printamici = array;should be
$printamici = array();When using
$amico_id = $ramico->requester_id == $user->uid ? $ramico->requestee_id : $ramico->requester_id;, only the current user (me) is printed as a friend - ie. 10 times. I changed it to$amico_id = $ramico->requestee_id;, because the requestee is the one who should be printed out. Now: am I on the right way? Or what's goin' wrong there?Comment #10
netentropy commentedi was not able to get the snippet to work at all...
Comment #11
Joe Malik commentedHere's the Code i'm using in my user_profile.tpl.php - maybe this helps?
Comment #12
sprsquish commentedComment #13
socialnicheguru commentedsubscribing
Comment #14
rodrix commentedIs this code for buddylist1, buddylist2 or user relationships?!
Code says Userrelationships but title says buddy list.
Thanks!
Comment #15
rodrix commentedI am sorry, we're on User Relatinships Issues. I actually thought this issue was on Advanced Profiles project page (I accindetaly switched windows)
Thanks! Still subscribing
Comment #16
ajayg commentedUpdated the title to correctly reflect content of the issue.
I suggest to close this as some snippets are already provided above. Please make it active if you are not satisfied. Just trying to help clear issue queue.
Comment #17
ncameron commentedNice one Joe, worked a charm. Two tweaks which may help others:
1) If you use this on a Node profile or bio page (or any page which is not the user page)
replace:
with:
2) Personally, I like to see the usernames along with the avatars. You can get this by modifying:
with:
viva drupal, viva user relationships!
Cheers,
Neil