Closed (fixed)
Project:
Flag
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
6 Nov 2008 at 01:34 UTC
Updated:
1 Mar 2009 at 03:10 UTC
Jump to comment: Most recent file
I've created an addon module that implements a friend list functionality utilizing the flag module's API. I submit it here for your review.
Please note that this is dependent upon the other addon I created, #328387: Flag forms: dependent module or feature request?.
I'd love to get some feedback from anyone interested in this concept and will potentially make my own release.
It is not recommended you install on a production system until further notice.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | flag_friend.zip | 14.75 KB | sirkitree |
| flag_friend.zip | 14.49 KB | sirkitree |
Comments
Comment #1
mooffie commented(Don't give my feedback much weight.)
The flag_form/flag_text/flag_history is certainly a useful thing to have.
But, on the theoretical level, I feel sorry that 'flag_friends' exists. It must exist for D5, but for D6, I think, it eventually won't be needed because for D6 we'll be able to flag flaggings. So we could define two such flags, "approved" and "rejected". (We'll be able to do all this in D5 too, but D5's Views 1.x isn't powerful enough.)
OTOH, setting up all these flags ('friends'+'rejected'+'approved') and setting up the required views is something the average admin may not know to do, so it seems that a flag_friends module, that only glues things together, has a place.
Comment #2
sirkitree commentedThanks for the feedback mooffie. It'll be nice not to have to have this for D6. I think there still may need to be a little glue though in order to send a message to the user along with the flag/friend-request.
I'll make a release of this for D5 if enough people find they want this. Meanwhile here's an update, couple fixes and added a hook_user_links().
Comment #3
sirkitree commentedI forgot to mention that this is also dependent upon the patch here: #328745: Primary key on flag_content table
Comment #4
quicksketchI'm a bigger fan of flag_friends than trying to instruct anyone in how to setup flagging of flags. I do agree that this would be wildly (even ridiculously) powerful, but at the same time it's hard even for me to grasp it, let alone try to explain this to someone as a typical solution to flagging friends. So while I'd probably be in support of flaggings on flags, I'd really prefer a more straight-forward solution like flag_friends.
Comment #5
Flying Drupalist commentedIs it possible to work multisite support into this too?
Comment #6
quicksketchMiroplay, please open a new request if you haven't already for multisite support (a verbose description would be helpful too, as it's not clear what you mean by this). This issue only has to do with using flag as a friending solution.
Comment #7
Flying Drupalist commentedHi, sorry for being unclear, I was talking about flag as a friending solution. To have multisite, the friend flag tables need to be separate from the content flag tables, unless I'm misunderstanding something. Or is it already is? I guess really, I was just curious and wondering. Thanks.
Comment #8
sirkitree commentedSo I think I am going to make a project for this. It's bound to have it's own issues, and the fact that its dependency upon the flag_form.module somewhat necessitate it. Also it'll be easier to update if I can use CVS rather then uploading zip files here.
I'd like to request a link on Flag's Project Release page to the two new module's I'm releasing, please.
Flag Form (http://drupal.org/project/flag_form)
Flag Friend (http://drupal.org/project/flag_friend)
Comment #9
sirkitree commented@Miraploy
If your tables are shared it's pretty easy to do, if not then I'm not sure.
The friend relationship itself is recorded within it's own table {flag_friend}. However, to get the status of friendship (such as Pending) the {flag_content} table is queried.
Comment #10
quicksketchSirkitree, please see #160519: Allow admin to select Ajax or non-ajax behaviour per Bookmark type, which I hope will make the Flag Form module completely unnecessary.
Comment #11
sirkitree commentedQuicksketch, I do believe that it would. Each module would have to do it's own manipulation of the link_href in the hook_preprocess_link and provide a menu item for that, but no big deal there really. I'd much rather get rid of a small module dependency with a feature in Flag.
Flag form is only unique in the fact that it provides the hook_flag-name_form(), but this is probably slower then a menu item path. Was fun to figure out though =D
I'll test the patch on #160519 next up, would still appreciate a link to Flag Friend though and then we can close this thread.
Comment #12
Flying Drupalist commentedHi sirkitree, thanks for your answer. Is it possible to store the pending and etc - all related friends tables seperately, so that multisites can share friends but not content. Thanks.
Comment #13
sirkitree commentedMiraploy, please open up a ticket in the Flag Friend issue queue as a feature request and we can discuss it there :)
Comment #14
sirkitree commentedflag_friend now doesn't require flag_form since flag now has link types. Instead it does a form_alter() on the confirmation form. I'll make a beta release for this once we get default flags working :)
Comment #15
quicksketchI'm moving to fixed as this is now a separate module and has the support it needs from flag.module. I'm working on getting a 1.0 out the door so we can have a good version to work against.