[buddypress-trac] [BuddyPress Trac] #6234: Multiple scopes in activity-loop.php doesn't work correctly when activity auto-refresh is checked

buddypress-trac noreply at wordpress.org
Fri Feb 20 20:03:51 UTC 2015


#6234: Multiple scopes in activity-loop.php doesn't work correctly when activity
auto-refresh is checked
----------------------------------+------------------------------
 Reporter:  bphelp                |       Owner:
     Type:  defect (bug)          |      Status:  new
 Priority:  normal                |   Milestone:  Awaiting Review
Component:  Component - Activity  |     Version:  2.2.1
 Severity:  normal                |  Resolution:
 Keywords:                        |
----------------------------------+------------------------------

Comment (by imath):

 You're welcome @bphelp

 I've took the time to explore the reason why hardcoding the activity
 arguments into the `activity-loop.php` template was not working with
 "HeartBeat" activities despite the fact it's working with the "Load more"
 activities.

 When clicking on the load more link, Ajax action is interpreted by
 `bp_legacy_theme_activity_template_loader()` in which the `activity-
 loop.php` template is used and as a result it gets the hardcoded
 arguments.

 On the other hand "HeartBeat" activities in
 `bp_activity_heartbeat_last_recorded()` are using a specific loop to
 easily intercept the time of the last activity recorded to include it in
 its response to `buddypress.js`. If not being able to hard cod arguments
 into the template is really annoying for this feature, we'd have to change
 this in favor of using the `activity-loop.php` template and find a new way
 to get the time of the last activity recorded. Imho, using hardcoded
 arguments is not a good idea, but i don't mind working on this.

 About the codex page, it might be interesting to upgrade it, i agree, i'll
 see what i can do about it. In the meantime, i've quickly built this
 "documented" gist : https://gist.github.com/imath/6017aec29dfcbde5e2ee

 I hope it will help you :)

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6234#comment:6>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list