Attached is a patch against the 4.6.0 version (which I believe is the same as the current CVS version).
This patch adds an implementation of hook_links, so that each posting on a site will have a "Add
to my buddylist" or a "Remove
to my buddylist>" link. I think this is an easier way to get people to use buddy lists, without forcing them to go digging through profiles. Note the number of "I can't find how to add buddies" issues.
Big change: I had to scrap buddylinks_goto_referrer in the add and remove methods. For some reason, it wasn't able to pick up the referrer on the main page. I just sent everyone to their profile page.
TODO: This should have an option to turn this on and off for roles with buddylist permission. I don't know much about how that would work, so I ignored it for now. This patch automatically ignores anonymous users, so they don't get a buddylist link.
Enjoy.
| Comment | File | Size | Author |
|---|---|---|---|
| buddylist.mfredrickson.patch | 1.65 KB | mfredrickson |
Comments
Comment #1
mfredrickson commentedI just thought I'd follow up with some PHPTemplate code that does something similar. Again, the
buddylist_goto_referreris still broken, but this might be a better way to let users add people to buddy lists. I was modifying the lincoln's revenge theme:Comment #2
Bèr Kessels commentedhttp://drupal.org/node/18260 has a pending patch that allows the same. please review
Comment #3
Bèr Kessels commentedComment #4
mfredrickson commentedI'm going to close this bug as I think it is deprecated by changes to format_name() in 4.7.
Since my last post to this issue, I had written a core patch against format_name to do this functionality, but with the changes out lined at:
http://drupal.org/node/22218#theme_username
I don't think that patching is necessary, and the functionality I want can be added through theme_username.