I added a block to user_relationships activity which shows 'my friends activity' which is any activity by users with whom you have a 'user relationship'.
I also changed the user_loads to simple queries in this module because user_load is overkill and was slowing me to a crawl (because the site has 15000 organic groups and user load looks up everyone's ogs). But I think this should be a performance improvement for anyone.
| Comment | File | Size | Author |
|---|---|---|---|
| urblock.patch | 4.44 KB | jody lynn |
Comments
Comment #1
robertdouglass commentedI like this block and I started adding it to the latest iteration of my code. It made me realize though that I made a mistake of dropping the uid from activity table, and I'm going to have to add it back in. The target_uid in activity_targets is great, but not enough information to get your buddies' public messages. So I'll have an update for this tomorrow, I'm guessing.
Comment #2
icecreamyou commented+1 for this, although it's so far off in the latest dev I can't even figure out how to apply it manually.
Comment #3
robertdouglass commentedThe patch is not especially relevant. To really solve the problem you need to start with a patch that reintroduces the activity initiator's uid into the activity table.
Comment #4
d0t101101 commentedI could really use this functionality for my site, and hope to see this feature added to the official module.
.
Comment #5
jaydub commentedComment #6
icecreamyou commentedComment #7
icecreamyou commentedWouldn't this do it? There's no reason to introduce a new column in the tables. (Note: I haven't really tested this, but the meat is basically just copied from activity.module and the rest is an SQL query I built to identify the user's "friends" (rtid = 2).)
Of course, if you want to test this outside of the module, just replace the
return arraypart at the end withprint theme('activity_block', $activities, $more_link);EDIT: just tested, and it produces two SQL errors and one implode() error in activity.module. I probably won't have time to look into it until this weekend.
Comment #8
icecreamyou commentedI figured out what the problem was. I wrote the code for a site on which I hadn't yet installed Activity; on that site, the "Friend" relationship has
rtid=2as is reflected in the code. But I was testing this on a different site at which the "Friend" relationship hasrtid=1. So, this code is ready and working, although I hate to RTBC my own patch.Of course, if this were to be added into the user_relationshipsactivity module, there would also have to be a way to set the relationship type. The form element can be built using this code:
It may be simpler just to take out the rtid line altogether and make the block show status updates for all relationships. The problem is that the whole point of this block is for increased privacy, and if one-way relationships exist, then anyone can see anyone's status and there's no point in having a separate block.
Comment #9
icecreamyou commentedOops - changing back to CNR.
Comment #10
icecreamyou commentedAlright, I take it back again. More than half of the statuses that should appear don't, and we get the bullet points for them anyway. Plus the roles are often wrong.
...but I have no idea how to fix this. Ideas welcome!
Comment #11
jaydub commentedThe new 5.4 branch and the new 6.x branch have a menu tab
on the activity page '/activity' for any User Relationship relationship
types you have setup. An activity block for each UR type is also
available as you've requested. Note that you should not test this
out on a production site as many token patterns have changed
and no upgrade functions have been written at this point.
#314433: Activity 6.1 & 5.4
Comment #12
jaydub commentedComment #13
jaydub commentedthe -dev snapshots (Jan 2009) have improved support for User Relationships.
Comment #14
rickh commentedI know this topic has not been touched on in a while, but is there any way to take the current relationship tab containing the user's reltionships activity and placing it into a panel or view? I am trying to create a "news feed" for users using the activity module and I'm not getting anywhere. I apologise if i sound like a moron but I'm pretty new to drupal.
Thanks for any help in advance.
Comment #15
icecreamyou commentedPlease keep issues to their original topics.
Comment #16
sirkitree commented5.x unsupported please see 6.x-2