[buddypress-trac] [BuddyPress] #1628: bp_filter_request is not defined

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Mon Jan 25 17:28:26 UTC 2010


#1628: bp_filter_request is not defined
------------------------+---------------------------------------------------
Reporter:  grosbouff    |       Owner:  apeatling
    Type:  enhancement  |      Status:  assigned 
Priority:  major        |   Milestone:  1.2      
Keywords:  has-patch    |  
------------------------+---------------------------------------------------
Changes (by MrMaz):

  * keywords:  => has-patch


Comment:

 Here is my solution which would be added near the top of global.js. It
 relies very much on convention, but maybe that can be addressed in the
 future.

 {{{
         /* Plugins
          * To filter your plugins requests, simply add the
          * 'do-filter-request' class to your content div
          * Example:
          *  <div id="foo-dir-list" class="foo dir-list do-filter-request">
          */
         var filter_plugin_id = j('div.do-filter-request').attr('id');
         if ( filter_plugin_id && filter_plugin_id.length ) {
                 var filter_plugin_id_split = filter_plugin_id.split('-');
                 if ( filter_plugin_id_split[0].length ) {
                         var filter_plugin_name =
 filter_plugin_id_split[0];
                         bp_filter_request( filter_plugin_name,
 j.cookie('bp-' + filter_plugin_name + '-filter'), j.cookie('bp-' +
 filter_plugin_name + '-scope'), 'div.' + filter_plugin_name );
                 }
         }
 }}}

-- 
Ticket URL: <http://trac.buddypress.org/ticket/1628#comment:2>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list