[buddypress-trac] [BuddyPress Trac] #5687: Activity Load more button doesn't work for custom non-components scopes
buddypress-trac
noreply at wordpress.org
Sat Jun 7 14:21:09 UTC 2014
#5687: Activity Load more button doesn't work for custom non-components scopes
--------------------------+------------------------------
Reporter: slaFFik | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Activity | Version:
Severity: major | Resolution:
Keywords: |
--------------------------+------------------------------
Changes (by slaFFik):
* cc: slava.abakumov@… (added)
* keywords: reporter-feedback =>
Comment:
That patch if included in the core would be an awesome edition.
And now regarding the situation I have.
Using `bp_activity_type_tabs` action I add tabs (`<li><a></a></li>`).
Javascript in BuddyPress works in that way, that if that `<li>` has and
`<id>` attribute - its second part (after `-`) will be converted to scope,
and the first one is treated as object. So in my case I add `<li id
="activity-whatever">...` there. And js sends a POST on clicking the tab
with the scope=whatever. After that I'm adding a filter to
`bp_ajax_querystring` with a relatively low priority (in my case 99) and
modify the `bp_has_activities()` arguments like I need. That's the whole
magic :)
But as I found out, load more and heartbeat ignores that js (rather handy)
behaviour.
BTW, I was able to fix load more issue in my plugin using this code:
{{{
$scope = isset($_POST['scope']) ? $_POST['scope'] : isset($_COOKIE['bp-
activity-scope']) ? $_COOKIE['bp-activity-scope'] : '';
}}}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5687#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list