BP 1.2 : help with the ajax queries (bp_filter_request)
Hi, this is a question for a BP core developper…
I’m trying to understand how the ajax functions are working in BP 1.2.
There is the JS function
bp_filter_request( type, filter, id, target, page, search_terms, extras )
(I think the “extra” parameter was added recently by Andy when I told him that I should be able to add extra variables to that function)
First, could someone explain me what exactly the TYPE and FILTER params must be used for ?
FILTER is to order the results(?), what is TYPE ?
Well; I’m building a classifieds component.
I have 3 more important parameters that I should be able to pass to the function : “status”,”action” and “categories”.
I suppose that I should pass them as the “extra” parameter.
My idea was to have an array
var extras = new Array(status,action,categories);
but when I pass that array to bp_filter_request; it keeps only the last key of my array.
Is that forbidden to pass arrays as a parameter in JS ?
So; my question is : Is that the right way to do that;
-if yes, why does it only pass the last key of the array
-if not, what would be the right way to pass those additionnal parameters to the ajax function ? Or have I to build a custom function ?
thanks A LOT, i’m stuck on this since hours.
+ there is a JS error with bp_filter_request, I made a ticket some days ago but it does not seems to be resolved
- The topic ‘BP 1.2 : help with the ajax queries (bp_filter_request)’ is closed to new replies.