After an encouraging email outlining a good idea (@see http://drupal.org/project/drupal_universal_relation_api) here's my first pass at this integration/theory. ;)
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | ff-relation_api.patch | 3.87 KB | andypost |
| flag_friend-relationships_api.patch | 3.66 KB | sirkitree |
Comments
Comment #1
sirkitree commentedI have either hook_all_pending_from() or _to() incorrect. Will take another stab at them soon.
Comment #2
mercmobily commentedHi,
First of all,
** THANK YOU **
Now, humble notes :D
Remember that the API is based on UIDs, rather than user objects. So, this function should return an array() of UIDs rather than User Objects.
About this one:
Well, they could, but we should wait for then next version of the API :D
Hummm the name of this API function is misleading -- sorry. The "relation names" should actually be the short_names used by your module to identify different relation types. You only have one. So, all you need to do is this:
About hook_all_pending_from() and hook_all_pending_to(), can't really help because I am not using FlagFriend, but keep in mind that you need to return UIDs :D
Bye!
Merc.
Comment #3
andypostFixed
flag_friend_get_relation_names()&flag_friend_relation_type()First function should return array of types
And both should check parameters
Comment #4
mercmobily commentedHi,
And all functions return UIDs, right?
I think we have an integration... don't we?
Merc.
Comment #5
andypostNot all - only:
flag_friend_get_related_users() flag_friend_all_pending_from() flag_friend_all_pending_to()
All others return exactly what they should - arrays bools
Comment #6
sirkitree commentedI'm still not sure that we have flag_friend_all_pending_from() flag_friend_all_pending_to() implemented correctly.
@merc - do you have a module that is currently utilizing these api functions that you can do some testing upon?
Comment #7
mercmobily commentedHi,
Yep, of course not all of them return UIDs -- silly me :D
I have been out of the scene for 6 months... so I am not sure which module actually uses the API. Sorry!
But, if they return a bunch of IDs as they should, we should be good to go.
They are so simple,I would mark them as fixed and wait for bug reports to pop in if things don't work as they should! But, these functions are so simple...
Thanks a million,
Merc.
Comment #8
sirkitree commentedunless someone would like to champion this