Postponed
Project:
User Relationships
Version:
6.x-1.x-dev
Component:
Views
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Apr 2009 at 23:32 UTC
Updated:
21 Jan 2012 at 00:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Scott Reynolds commentedFirst working pass. We are probably going to need to add another hook
This then allows the Views filters to ask which realm in particular they care about or all realms that the module provides. Or maybe we just create the filters based on the realms returned from this. Remove the notion of module completely. I like the later approach best.
Comment #2
Scott Reynolds commentedforgot patch
Comment #3
sirkitree commentedYou may want to roll this from the module's root directory before submitting to them. Otherwise the new file appears in the wrong directory.
One thing I'm concerned about is basically requiring the other module to implement hook_init() and check for the Activity module in order to conditionally include the module.activity.inc file. Is there a better way to handle this? Maybe as a 'path' parameter in hook_activity_info() such as views does, and then we include the file through activity.module?
Also, once I go to add the user_relationships_api Activity Access filter, shouldn't I see a list of defined relationships in order to choose which relationship I'm filtering by? I'm just seeing:

Comment #4
Scott Reynolds commentedThats not implemented yet but thats the plan. And then you can actually expose this as well, which is kindof cool.
The idea of removing the hook_init() i like as well. its a good extension.
Comment #5
Scott Reynolds commentedWith this commit we achieve this
http://drupal.org/cvs?commit=205766
Comment #6
Scott Reynolds commentedAnd heres the patch to UR
Comment #7
Scott Reynolds commentedComment #8
sirkitree commentedI guess the only other thing to add is the file scanning to activity to look for activity.inc files and then we can submit this to UR
#446482: Inclusion of $module.activity.inc files
Comment #9
sirkitree commentedtagging so we can point ppl to issues and patch on how to integrate.
Comment #10
Scott Reynolds commentedwe still need to fix the trigger implementation and the hook_activity_info().
Comment #11
likewhoa commentedsubscribing.
Comment #12
andypostSo what is a status of issue?
All patches are landed. Is this still an issue?
Comment #13
Scott Reynolds commentedThis patch works. It doesn't allow though "User A became friends with User B". Just need to wrap the trigger stuff.
Flag_friend module is fully integrated.
Comment #14
ajayg commentedjUSt checking if there is any progress on this? IS there anything needed from UR side?
Comment #15
jthomasbailey commentedsubscribing
Comment #16
ajayg commented@Scott Reynolds
is there any help you need to get this finished? Could you please describe what is still remaining to get this moving?
Comment #17
Scott Reynolds commentedSee comment 13.
Again the patch works. Just missing trigger implementation for UR.
You can very easily create a View of all your Friend's activity
Comment #18
mariano.barcia commented@Scott could you point us to the trigger code and/or what needs to be done/updated there?
I'm needing the "User A became friends with User B" feature, as per your comment in #13. Thanks!
Comment #19
Scott Reynolds commentedThe first step would be implementing Triggers in UR
http://drupal.org/node/375833
Comment #20
mariano.barcia commentedI got it running for the "approve" operation of user_relationships_api. I can't get it to work properly with the tokens. Shall I post a patch or copy the source code here? It's not that much code.
Comment #21
ajayg commentedPlease post it anyway so if someone has time they can build on it.
Comment #22
mariano.barcia commentedOk, I got it running for the "approve" operation of user_relationships_api. However, I can't get it to work properly with the tokens.
Copy
ur.module.patchur.actions.patchuser_relationships_api.activity.inc_.txtto
user_relationships/user_relationships_apifolder under your modules base folder. This file has the earlier patch in #6 already applied.Apply the patches by running
patch -p0 < ur.module.patchpatch -p0 < ur.actions.patchRename
user_relationships_api.activity.inc_.txttouser_relationships_api.activity.incThen create an activity at
admin/settings/activity/create, choose "User relationships api" as the type. I have it configured as in the sshot attached.Then request and approve a relationship, and see the activity is recorded (as in the last sshot attached).
Know issues:
- As you can see, the requester ("admin") is repeated, instead of displaying the requestee in the last place. Also, I cannot see the activity record when logged in as the requester.
- Haven't tested with more than one relationship type
I will be looking forward to your comments, thanks.
Comment #23
Scott Reynolds commenteddebug code in patch
+ dd($type, 'type in token values');
+ dd($r, 'data in token values');
Moving to User Relationships module.
Comment #24
mariano.barcia commentedOk, today I got it running for the "approve" and "request" operations of user_relationships_api and fixed the token issues. Also removed the debug messages.
Copy
ur.module.2.patchto
user_relationships/user_relationships_apifolder under your modules base folder.reverse the ur.module.patch patch applied above, then,
apply the new patch by running
patch -p0 < ur.module.2.patchYou are now ready to create 2 activities at
admin/settings/activity/create, choose "User relationships api" as the type, one for "approve" another for "request".Then request and approve a relationship, and see both activity records being displayed (sshots attached). If you don't have a view, take a look at the activity* tables in the DB, as shown below.
Know issues:
- Haven't tested with more than one relationship type
- cannot display the approve activity in the requester stream, as the activity has an owner but not a "related" user or something that could act as argument as well.
- Done for two-way relationships, with request/approve workflow.
I will be looking forward to your comments, thanks.
Comment #25
andypostCode format is wrong
dd still here
Comment #26
mariano.barcia commentedok thanks, those are details, I'd like to receive more "interesting" feedback about the feature.
I am using it now in a project, and I'll keep the thread updated. Thanks in advance.
Comment #27
dafederComing late to this conversation, but very interested.
Mariano, I'm applying all your patches and will report on my results.
Comment #28
dafederI have applied your two patches and am not seeing "User relationships api" in my list of type I can add. Any idea what I'm doing wrong?
Comment #29
mariano.barcia commentedDaniel,
Thanks.
If you applied the ur.module.2.patch, you should be seeing this code inside user_relationships_api.module:
AFAIK, Activity scans all modules in search for that hook (activity_info) and finds it in the user_relationships_api.module and displays the new option in the activity template form. I remember having issues when discovering how Activity knew about the plugins, but all it needed was that hook in the .module file.
Not sure if this helps you, at least it confirms the hook implementation is everything. If, for some reason, Activity can't find the .module then it will not display anything different... Let me know if you can solve this or if you are still blocked. Thanks.
--m
Comment #30
marc.groth commentedHi Mariano Barcia,
The patch didn't quite work for me (kept getting an error when trying to apply the patch using TortoiseSVN)... However, when I manually applied the changes it worked very well!! Congrats on the work so far :)
Any ideas on how we can get this information to display in the activity stream (i.e. at /activity/all)?I checked the view and I'm assuming a Relationship is needed for User Relationships under "Relationships" (/admin/build/views/edit/all_activity)? I'm not entirely sure, but seems correct since the ones that are currently displaying (Node, User) have relationships setup. Any ideas on this? Are you currently working on this at all?Any help is greatly appreciated.Turns out creating a brand new view with the field "Activity: Message" (and no Filters - I think this is the key?) seems to bring back all the Activity... Now I just need to figure out why the Tokens in your patch don't seem to be available when creating the activity... Any ideas?
Many thanks once again,
Marc
Comment #31
dafederOK, I hadn't applied the patch correctly, and hadn't noticed. I'm a little confused about what version the patch is for, as my files look a little different from the lines in the patch. Anyway, applied module.2 "manually" and the options do show up in Activity. Do I still need to apply the actions patch as well? Confused because user_relationships_api_action_info() is commented out in my version (latest release).
Comment #32
vermario commentedehm... subscribing
Comment #33
mariano.barcia commented@Daniel,
You have to apply both patches (do #22 and then #24). the actions patch is needed.
BTW, to reverse a patch invoke the same as if you were to apply it. Then, the patch command is smart enough to detect that the patch had been applied before and asks for the confirmation of the rollback.
@Marc,
Thanks!
I have the activity configured like this
"[requestee] and [requester] are now connected" and it's working well so far. What's exactly the problem?
Comment #34
dafederAll right, the actions patch did not work, but I added it manually, probably an issue of new dev releases since the patch was posted?
Anyway, I now have the ability to add a UR but the only tokens I am shown for to use in my messages are global tokens, which aren't too useful. I did some very quick debugging and it seems like user_relationships_api_token_list() isn't being called at all.
Comment #35
vermario commentedHi!
same problem here, after applying patches manually, the token area shows just global ones.
Might this be related to the fact i am using the 5th october dev version of activity? It has some major changes in translation handling...
EDIT: no, the patch did not work correctly and I applied it manually but not completely.
Comment #36
marc.groth commentedHi Mariano,
I tried putting in "[requestee] and [requester] are now connected" in the "configure" page for "User relationships api"... Which, when the activity is recorded, seems to do what it should (i.e. brings back the correct data). My only issue is that I don't seem to actually see those particular tokens available under "Available tokens"... Does it show up for you? I've supplied a screenshot of what I see when I click "Available tokens" >> "Global"
I've checked and the code is there, or so it seems...
Any ideas?
Thanks again, it works perfectly otherwise!! :)
Comment #37
marc.groth commentedHmm anyone else having issues with the template not being saved when you hit "Save"? The field "Requestee message:" always comes up blank, even though the others get saved as they should. Any ideas on this?Where abouts in the code does this field get saved/retrieved?EDIT: Never mind, I didn't patch the module quite correctly... In case anyone else gets this issue... Turns out it was because of a space after "requestee" in
$info->objects = array('Requester' => 'requester', 'Requestee' => 'requestee', 'Relationship' => 'relationship');Which was copied over as:
$info->objects = array('Requester' => 'requester', 'Requestee' => 'requestee ', 'Relationship' => 'relationship');Comment #38
ajayg commentedSince we have so many comments and moving parts, could someone please submit patch against latest dev UR and Activity 2 branch? So we can start with a common baseline and go from there to improve further.
Comment #39
dafederI think token list problem has something to do with the conditional ($type == 'user_relationships_api')
Debugging shows the $type being recieved is "requester".
And yes, I think this would be an appropriate time for a commit to the dev version. Won't break anything else and will make this all much easier :) .
Comment #40
drupallogic commentedmay I kindly ask UR RC3 will have support for activity module?
Comment #41
wkmit commentedMarc,
Figured out that removing "Relationships Activity: Node" from the view makes the user relationship activities show up.
This makes sense as activity table rows, involving user relationship activities, have a nid of 'null'.
If you want to filter the view further, say you want to display only approved user relationship activities, just add 'Activity: Operation = approve used in: user_relationships_api' in the view.
Comment #42
Scott Reynolds commentedYou could have set this to not required and it would have worked as well. It will LEFT JOIN, allowing NULL values.
Comment #43
tayzlor commentedFor the tokens to appear in the token list the hook_token_list() implementation needs to be -
Attaching patch for only the hook_token_list() but it may be easier to just copy / paste the above into your patch.
Comment #44
tayzlor commentedcode in #43 takes care of token_list().
I discovered hook_token_values() was not working in all cases.
The below code should work across the board -
Comment #45
tayzlor commentedalso, when i install the patches in #22 and #24 , i dont see any User Relationships Access filters in the View Filters area to choose from??
Comment #46
Scott Reynolds commentedYou need to turn on the Access filters via admin/settings/activity
This is because we don't record it unless we need to, saves DB space.
Comment #47
tayzlor commentedre-rolled patch to fix token bugs + bug with the filter not showing up in views.
Comment #48
tayzlor commentedComment #49
tayzlor commentedforgot to remove line of debug in #47, re-uploading new patch.
Comment #50
alex.k commentedWould you like to see this patch in a RC? Should be rolling it in the next couple of days.
Also, it would be nice to see this as a conditional include file, so that it stays outside if activity is not enabled.
Comment #51
Scott Reynolds commentedActivity provides the mechism for conditional includes
And to create a patch with a new file:
http://drupal.org/patch/create where there is some good info on how to add a new file in a cvs patch with a link to a fakeadd.sh script that works wonderfully.
Comment #52
dafederCommitted in an RC would be great, even if still buggy...
Comment #53
tayzlor commentedis this RTBC or what do we need? do we need a roll-up of all the patches into one single patch file?
Comment #54
alex.k commentedCommitted the various patches in http://drupal.org/cvs?commit=285542. I used user_relationships_api.module patch from #49, user_relationships_api.actions.inc and user_relationships_api.activity.inc from #22. After that there were two implementations of user_relationships_api_activity_grants() and user_relationships_api_activity_access_grants() - in .module and in .activity.inc. I removed the ones in .module. Please check that things fell into the right places as I may have missed something. Thanks!
Comment #55
mariano.barcia commented@alex.k
Just did a quick double-check of the process you followed, and it looks fine ==> the files should be ready to be checked out and tested/reviewed. Thanks. I'll give it a try this week.
Comment #56
adam_c commentedI appologise for my noobness but this patch is exactly what I need but tortoise SVN is really not happy about applying it for some reason and so I need to manually create this patch with what is available on this page.
I gather that a directory needs to be created /activity/user_relationships/user_relationships_api
and within that 2 files are needed: user_relationships_api.module and user_relationships_api.actions.inc
I thought that the patch in #49 would have all the functionality required for this integration, although it seems to be missing some functions from earlier patches and seems to put them all into user_relationships_api.module whereas I believe some belong in user_relationships_api.actions.inc, am i correct so far?
So my current position is that I have the direcories as above and I have user_relationships_api.module with all the functions in patch #49 in it. Perhaps not surprisingly when i go to admin/settings/activity I do not see any reference to user relationships.
Can someone please advise as to where I am going wrong?
Thanks
Comment #57
adam_c commentedIv just realised i've been an idiot trying to update activity when I should have been updating UR.
Comment #58
zuzu83 commentedHi,
I have a probleme with integration "Views". I want my friends activity in my profil "Panels".
Error with views
"warning: Invalid argument supplied for foreach() in mysite/public_html/sites/all/modules/activity/views/activity_views_handler_filter_access.inc on line 64"I would like to see the activities of my friends and myself in the same view. Is it possible?
Thx for your help !
Version activity2 6.x-2.x-dev (2009-nov.-06)
Version User Relationships 6.x-1.x-dev (2009-nov.-09)
Comment #59
zuzu83 commentedsorry, my Panel version 6.x-3.2
Comment #60
Scott Reynolds commentedplease create an issue in Activity. not here. and don't post a screen shot, post the exported view.
Comment #61
Scott Reynolds commentedooh i take that back. that error means that it failed to include UR's .activity.inc
Comment #62
nitram079 commentedScott,
I have the same problem: Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/lbproduction/sites/all/modules/activity/views/activity_views_handler_filter_access.inc on line 64.
is there any hope to get that fixed?
Many thanks for the awesomenes!
Comment #63
alex.k commentedPlease leave as a feature request. The feature is not yet "ready".
Comment #64
ajayg commentedI have opened following issue against activity2 #636974: Default view does not show UR activity records since the UR activities are recorded in DB but somehow default all activity view is skipping it.
Comment #65
ajayg commentedI tried to poke around and found that atleast in activity_get_module_info (activity.module) it is getting the value
of $info->path as correct path to "user_relationships_api" module. But don't know how to debug further.
IS this correct module, it should be trying to include conditionally?
Comment #66
zuzu83 commentedI dont understand ... UserRelationships and Activity2 does not show the activities of my friends. FlagFriends - 2.0 Flag and Activity2 does not show the activities of my friends ...
I may be zero! But all these modules are very big and important to create a community.
It's been a week that reported the bug to the support of all the modules.
Can you explain the solution please? Propose a view model to integrate with Panels!
I dont know, I want a solution ...
I know you have a lot of work and request, but this function is very important for the community.
Thank you for your help.
Comment #67
ajayg commentedI wanted to help debug this but don't know where I can go next. Already confirmed the path was correct atleast untill in activity_get_module_info (activity.module).
Any thoughts/hints/ideas?
Comment #68
ajayg commented@tayzlor
Till your patch in #47, user_relationships_api_activity_access_grants had only one parameter, $account, but you have introduced three parameters $account, $object, $type; Why?
In activity_views_handler_filter_access_inc , activity_access_grants is being called without any parameter when it is expecting 3 $account, $object, $type and I think that is an issue.
Comment #69
tayzlor commentedi have this patch working on a version of my code here, allowing users to only see their 'friends' activities.
not sure whats gone wrong in between, will checkout the latest UR + activty and try and re-apply the patches.
Comment #70
ajayg commentedHi tayzlor,
any updates on this? If you don't have time to figure out the difference, do you mind atleast posting your working code here so we can review that and try to see what is the difference.
Comment #71
tayzlor commented@ajayg,
yep no problem, sorry i thought i was going to have time to come back to this but havent as yet.
uploaded patched UR + activity modules (these *should* work with views hopefully).
Comment #72
youkho commentedSubscribing
Comment #73
Bilmar commentedsubcribing
Comment #74
Bilmar commentedsubcribing
Comment #75
Scott Reynolds commentedLooks like this is causing the problem: #652906: Activity fails to include the file when path isn't set.
Comment #76
ajayg commented@Scott Reynolds
Some progress.
tried #652906: Activity fails to include the file when path isn't set with latest activity 2. We no longer see " Invalid argument supplied for foreach() in /Applications/MAMP/htdocs/lbproduction/sites/all/modules/activity/views/activity_views_handler_filter_access.inc on line 64."
However
1. the view mentioned in #631772: friends Activities with UR and views still does not work. Meaning showing activity of all users and not necessarily activity of only those having relationship with you. Basically it showing activity of everything to everybody.
2. User relationship content view that comes with UR RC3 still does not show your friends activity
Comment #77
rburgundy commented+1 subscribing - this will be a great feature!
I'm currently able to create the below activities at http://example.com/admin/build/activity
Record an activity message when: user_relationships_api approve types All
Record an activity message when: user_relationships_api request types All
But would also appreciate if we could have 'disapproved' 'canceled' and 'expired' activities to be picked up as well.
Thanks for the great work
Comment #78
sagar ramgade commentedHi,
I downloaded your file in comment #71 and found it that there is a extra module called ur_blocks, which gives blocks like mutual friends, people you might know, however when go to site configurations, i click on ur block settings, it kicks me to the main site configuration page.
Could please check whats wrong
Regards
Sagar
Comment #79
robby.smith commentedsubscribing
Comment #80
ajayg commentedI tried to tackle this but could not. I must admit I couldn't spend enough time on this. So if someone wants to tackle this please go ahead.
Comment #81
BenK commentedSubscribing...
Comment #82
oxford-dev commentedSo as it stands is there still no method of creating a view which displays the activity of a users friends (UR)?
I have the very latest, Activity 2 dev, UR and views and still cant manage it.
Comment #83
seehawk commentedSubscribing
Comment #84
oxford-dev commentedI have managed to create a view which appears to give all activity of a users friends.
The key is to have the 2 'user relationship' relationships (requestee user and requester user) related to user.
And then a single argument 'User relationship: requester user' and set 'requestee' as the relationship type.
Hope this helps
Comment #85
ajayg commentedDO you mind exporting your view and publishing it here for the benefit of others. Quite a few of us have tried and have been unsucessful so far (before your post arrived)
Comment #86
oxford-dev commentedsure,
$view = new view;
$view->name = 'activity_cutdown';
$view->description = 'All activity on a site.';
$view->tag = 'activity';
$view->view_php = '';
$view->base_table = 'activity';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('relationships', array(
'uid' => array(
'label' => 'User',
'required' => 0,
'id' => 'uid',
'table' => 'activity',
'field' => 'uid',
'relationship' => 'none',
),
'nid' => array(
'label' => 'Node',
'required' => 0,
'id' => 'nid',
'table' => 'activity',
'field' => 'nid',
'relationship' => 'none',
),
'requestee_id' => array(
'label' => 'requestee',
'required' => 0,
'id' => 'requestee_id',
'table' => 'user_relationships',
'field' => 'requestee_id',
'relationship' => 'uid',
),
'requester_id' => array(
'label' => 'requester',
'required' => 0,
'id' => 'requester_id',
'table' => 'user_relationships',
'field' => 'requester_id',
'relationship' => 'uid',
),
));
$handler->override_option('fields', array(
'message' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
),
'exclude' => 0,
'id' => 'message',
'table' => 'activity_messages',
'field' => 'message',
'relationship' => 'none',
),
));
$handler->override_option('sorts', array(
'aid' => array(
'order' => 'DESC',
'id' => 'aid',
'table' => 'activity',
'field' => 'aid',
'relationship' => 'none',
),
));
$handler->override_option('arguments', array(
'requester_id' => array(
'default_action' => 'default',
'style_plugin' => 'default_summary',
'style_options' => array(),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '',
'breadcrumb' => '',
'default_argument_type' => 'current_user',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'not found',
'break_phrase' => 0,
'not' => 0,
'id' => 'requester_id',
'table' => 'user_relationships',
'field' => 'requester_id',
'relationship' => 'requestee_id',
'validate_user_argument_type' => 'uid',
'validate_user_roles' => array(
'2' => 0,
'3' => 0,
'5' => 0,
'6' => 0,
'7' => 0,
),
'default_options_div_prefix' => '',
'default_argument_fixed' => '',
'default_argument_user' => 0,
'default_argument_image_size' => '_original',
'default_argument_php' => '',
'validate_argument_node_type' => array(
'webform' => 0,
'faq' => 0,
'image' => 0,
'product' => 0,
'goldmembership' => 0,
'platinummembership' => 0,
'panel' => 0,
'naughty_event' => 0,
'naughty_room' => 0,
'nice_event' => 0,
'nice_room' => 0,
'nodegift' => 0,
'owned_image' => 0,
'owned_vid' => 0,
'page' => 0,
'photo_album' => 0,
'post' => 0,
'profile' => 0,
'video' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'6' => 0,
'8' => 0,
'9' => 0,
'10' => 0,
'7' => 0,
'4' => 0,
'3' => 0,
'1' => 0,
'5' => 0,
'2' => 0,
),
'validate_argument_type' => 'tid',
'validate_argument_transform' => 0,
'validate_user_restrict_roles' => 0,
'validate_argument_node_flag_name' => '*relationship*',
'validate_argument_node_flag_test' => 'flaggable',
'validate_argument_node_flag_id_type' => 'id',
'validate_argument_user_flag_name' => '*relationship*',
'validate_argument_user_flag_test' => 'flaggable',
'validate_argument_user_flag_id_type' => 'id',
'image_size' => array(
'_original' => '_original',
'thumbnail' => 'thumbnail',
'preview' => 'preview',
),
'validate_argument_is_member' => 0,
'validate_argument_signup_status' => 'any',
'validate_argument_signup_node_access' => 0,
'validate_argument_php' => '',
),
));
$handler->override_option('access', array(
'type' => 'role',
'role' => array(
'2' => 2,
),
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('title', 'Activity Wall');
$handler->override_option('css_class', 'activity');
$handler->override_option('header', '
');
$handler->override_option('header_format', '3');
$handler->override_option('header_empty', 1);
$handler->override_option('footer', 'keep up-to-date.');
$handler->override_option('footer_format', '1');
$handler->override_option('footer_empty', 0);
$handler->override_option('empty', 'There are no feeds to view or you do not have access to view them.
Only friends can see a users activity.');
$handler->override_option('empty_format', '1');
$handler->override_option('use_ajax', TRUE);
$handler->override_option('items_per_page', 25);
$handler->override_option('use_pager', '1');
$handler->override_option('distinct', 1);
$handler->override_option('style_options', array(
'grouping' => '',
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'activitywall/%/User');
$handler->override_option('menu', array(
'type' => 'none',
'title' => 'User',
'description' => '',
'weight' => '1',
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'tab',
'title' => 'All stuff',
'description' => '',
'weight' => '0',
'name' => 'navigation',
));
Comment #87
mcpuddin commentedThanks @Oxford,
Worked for me! However I didn't find the need to have the "requester user" in the relationship.
James
Comment #88
vibram fivefingersq commentedReal nice! Very useful. I will bookmark! http://www.five-fingers-vibram.org
Comment #89
onlinetips commentedSuch a great blog post. Thank you very much for sharing this blog post...
First Aid Kits
Comment #90
ajayg commentedThe views above in #86 seems to be working accept that it is public. So you are user 1, you can goto page that belong to user 2 (Activitywall/2/User) and see all his and his friends activity. IMHO the activity should be private to each user.
Comment #91
Scott Reynolds commentedPrivacy can be handled in the View by using the proper access argument. And should be tackled in a separate issue.
Nodes are though are properly protected. If you do not have access to the node, the node activities will not be shown.
Comment #92
ajayg commentedI don't recall correctly, but didn't integration with activity 1 took care of access correctly? Meaning only user 1 can see his activities of his/her friends. Others didn't have access.
Now with Activity 2, the river of activity is taken care of by views. But How would you make sure so that page shows only to the user whose profile has this tab? Any suggestions? The views 2 doesn't allow that by default.
Comment #93
Scott Reynolds commentedA Views Access plugin is how to solve this.
So you setup the access plugin with an option to specify the user id position in the url (a url like /user/%/activity would take an option of 1 which maps to arg(1)) and then that is used in the access_plugin::get_access_callback() which is called by views.module to setup the hook_menu.
It might have but that would have been a bad decision. Activity does not make assumptions on how it will be used anymore. For instance, I have used it for an internal analytics.
Comment #94
ajayg commentedScott
Do you mind giving more details for the plugin? From your comments it looks it should be fairly simple. But however See this comment from MerlinofChaos
http://www.angrydonuts.com/views-3-x-roadmap
I have seen several authors mentioning it should be easy but yet to see actual code which does this. So do you mind enlightling us?
Comment #95
ajayg commentedAlso the activity template per UR type is missing. It used to be working 1.x. So in Activity 2.x there is a no way currently to have a different template per UR type. If you have just one UR type then you won't be affected.If you have more than one UR type your customization choice for activity messages is no longer available.
See #870850: Differentiate activity based on relationship type no longer works in 6.x-2.x
Comment #96
ajayg commentedHere is interesting finding about access to the above view
You can view your friends activity and not everyone's. So there is some access control.
However if you are friend with A and A is friend with B and if there is activity between A and B (and even if you are NOt related to B) you can still see that.
Comment #97
ajayg commentedI took oxford-dev 's view and made following changes
1. Made the view a tab shown on user profile.
2. Added validation for views argument so only the current logged in user can see his/her activity. You can't see other person's activity. So now privacy is covered.
3. Because the view was pasted here directly there is some code jumbling in header and footer. So I didn't get that working so I removed completely header and footer.
Please review, test and if it is working mark as RTBC.
Comment #98
ajayg commentedcan anyone please review and test this? If you think it is working please mark as RTBC.
Comment #99
light9 commented#97 works for me! Thank you so much!
Comment #100
ajayg commentedComment #101
mrf commentedClosed #631772: friends Activities with UR and views as a duplicate of this issue.
Comment #103
mrf commentedI am postponing any 6.x feature requests that don't have a current applicable patch to help sort the large list of open features.
Please feel free to set to 'needs review' once a patch is included.