Adding Member Directory sub-directories using $bp->current_action?
Using BP 1.1.2 and latest WPMU… and really stuck!
I’m working on a site and I need the Members directory to be sortable not by A-Z, but by newest members, recently active, etc.
I’ve been playing around for days with the AJAX calls but can’t make this one work.
I tried using $_GET and $_POST to send the listing type, then picking that up and inserting it into the function like this: bp_has_site_members( ‘type=’ . $type )
and it worked – for the first page of results. But as soon as you click an AJAX page nav button, to view more members, it loses the GET variable and reverts to the default listing.
So I’m going to hardcore it into custom Members loops, with ‘type=XYZ’ in the bp_has_site_members() function on each.
I guess that means having /directories/members/newest/ and /directories/members/active/, which is fine with me if it’s the best way.
Here’s where I get lost…
I know that with the URL mysite.com/members/newest/, or /members/active/, I could set the $bp->current_action to ‘newest’ or ‘active’, but I can’t work out how to write a function that, when those URLs are accessed, sends users to the relevant template!
I’ve searched all through the core but this one has me stumped.
You must be logged in to reply to this topic.