I just upgraded to 5.x-4.x-dev, thinking it had a solution to this problem:
Display the activity information consistently in a block / panels embed in the user profile
+ I am using Advanced Profile & Panels 2
I have the same problem as 3.x --> the activity information displays for the logged in user
"You updated the user profile [node-title-link]"
but it does not display correctly for other users viewing the profile page
"Admin updated the user profile [node-title-link]"
Additionally, the logged in user's activity will display on the block of other user's profiles, rather than the information related to the profile user ID being viewed.
Feature request / documentation request is - how to configure this correctly for profiles, panels, using the "activity mine" block or custom code.
I reviewed / tested most of the other issues and posts on this but did not find the solution.
Note: I had some installation issues & now problems with token substitution in 4.x-dev, so I may downgrade to 3.x again, unless the solution is contingent on the new version.
Comments
Comment #1
jaydub commentedThere is an (My) activity block which shows the activity of the logged in user.
There is a list of a user's activity that shows on the user's profile page which will reflect the activity of the user profile in question which would be your activity (You) if you are viewing your own profile and the respective user's activity (Username) if you are viewing another user's profile.
There isn't any working integration with APK and activity at this point but if you can get user profile data in a panel via APK and/or panels, then you can get the user's activity via the profile already.
hope that makes sense...
regarding problems with token substitution there are a lot of changes in tokens and other areas of the various contrib modules and until we get to a beta release upgrades of old data are not yet in place.
Comment #2
jaydub commentedAlso see related issue: #210987: Integrate activity with panels for user profiles
Comment #3
alfaguru commentedThere is a simple solution to this issue: add a new token to replace the word "you" in the messages, then return either "you" or the username depnding on what the current user is. Here's some sample code I put in an in-development activity_panels module to save patching the core activity module:
The bulk_update function performs a one-time only migration of the relevant variables. Call it from some convenient place in the code then remove it.
Comment #4
timmillwoodI have just created a small module ("activity_block") which displays the activity for the user who's profile is being viewed. I have then put this block in as a panel pane.
Comment #5
bflora commentedIs it possible to use this code in the last post somehow without creating a whole new module to slow down my Drupal site? can I toss this code in my template.tpl.php file and do something with it there?
I was using the following code with Activity 5.2 to create an activity feed on user profiles:
But it doesn't appear to work anymore now that I've upgraded to 5.4. A lightweight solution like this would be tremendous. Thanks
Comment #6
sirkitree commented5.x unsupported please see 6.x-2