Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)

  • Scribit
    Participant

    @scribit

    Unfortunately I have to insert the no-ajax class directly in one of the plugin files (not in the template).

    If I remember correctly the file is: bp-groups/bp-groups-template.php
    in the function: bp_groups_members_template_part


    Scribit
    Participant

    @scribit

    What should this modification do?
    I put no-ajax class but I continue to have:
    – text search not using ajax
    – order combobox using ajax


    Scribit
    Participant

    @scribit

    Thank you Boone for your patience ๐Ÿ™‚

    I’ve removed completely the main “item-list-tabs” div (the first one in this topic). Now the search works but, as I said yesterday, it is not an ajax search and report the search terms as GET parameter in the url bar (refreshing page during search).
    It could also be fine but, in this situation, the order combobox no longer filter the results (maybe it ignore search term in GET parameters). Changing the order it loads every members again.


    Scribit
    Participant

    @scribit

    Yes, the other one is this:

    <div class="item-list-tabs" id="subnav" aria-label="Navigazione gruppo secondaria" role="navigation">
    	<ul>
    		<li class="groups-members-search" role="search">
    			<form action="" method="get" id="search-members-form">
    				<label for="members_search"><input type="text" name="members_search" id="members_search" placeholder="Cerca membri..."></label>
    				<input type="submit" id="members_search_submit" name="members_search_submit" value="Cerca">
    			</form>	
    		</li>
    
    		<li id="group_members-order-select" class="last filter">
    			<label for="group_members-order-by">Ordinato per:</label>
    			<select id="group_members-order-by">
    				<option value="last_joined">Nuovi</option>
    				<option value="first_joined">Il piรน vecchio</option>
    				<option value="alphabetical">Alfabetico</option>
    			</select>
    		</li>		
    	</ul>
    </div>

    and includes the search form.


    Scribit
    Participant

    @scribit

    My tinypic image has been removed from last post. I paste the DOM relative code:

    <div class="item-list-tabs no-ajax" id="object-nav" aria-label="Navigazione gruppo primaria" role="navigation">
    	<ul>
    		<li id="home-groups-li" class="current selected">
    			<a id="home" href="http://xxxxxxxxx.xxx/gruppi/apulo-lucana/">Home</a>
    		</li>
    		<li id="admin-groups-li">
    			<a id="admin" href="http://xxxxxxxxx.xxx/gruppi/apulo-lucana/admin/">Gestisci</a>
    		</li>	
    	</ul>
    </div>

    The site is in italian (“Gestisci” stands for “Manage” and “Navigazione gruppo primaria” for “Main group navigation”)


    Scribit
    Participant

    @scribit

    Here the piece of page on which there is the element with “selected” class (HOME button).
    Home button
    Home button is a standard Buddypress element. I don’t add it for myself.

    Removing the selected class from Developer tools, and submitting the search form, it works but don’t use the “ajax mode”: It reloads the page adding search term as GET parameter (?members_search=test&members_search_submit=Cerca) and retrieving the correct results.


    Scribit
    Participant

    @scribit

    Thank boonebgorges.
    First of all buddypress.min.js is correctly loaded in the page and it is not part of the theme but the plugin is installed indipendently.

    I’m using version 2.8.2. I load not minified js to debug it. Look at this part of code:

    if ( target.attr('type') === 'submit' ) {
    	css_id = jq('.item-list-tabs li.selected').attr('id').split( '-' );
    	object = css_id[0];
    	template = null;
    	search_terms = target.parent().find( '#' + object + '_search' ).val();
    
    	// The Group Members page specifies its own template
    	if ( event.currentTarget.className === 'groups-members-search' ) {
    		object = 'group_members';
    		template = 'groups/single/members';
    	}
    
    	bp_filter_request( object, jq.cookie('bp-' + object + '-filter'), jq.cookie('bp-' + object + '-scope') , 'div.' + object, search_terms, 1, jq.cookie('bp-' + object + '-extras'), null, template );
    
    	return false;
    }

    when it create “item-list-tabs li.selected” class to populate css_id array it takes the first one div in DOM with that class, and the corresponding array is [home, groups, li]. So it searches for #home_search to set value of search_terms…but home_search element doesn’t exists on the page!

    To correctly search terms it should search for #members_search. What can I do? I don’t want to hardcode some javascript ๐Ÿ™‚


    Scribit
    Participant

    @scribit

    I have a multisite installation.
    Plugin does not work with both Magnum and Optimizer PRO installed.

Viewing 8 replies - 1 through 8 (of 8 total)
Skip to toolbar