We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to Link to Specific User Search Results Page? | Forum

Zenon Ziebiewicz
Zenon Ziebiewicz Sep 30 '13
serach results query string doesn't appear in url,


if you want to link to list of users for example to:

-specific users account types (company not person)

-users by question in profile (from specific region itp...)


its a problem,

any idea how to cerate a button that sends that query?



Zenon Ziebiewicz
Zenon Ziebiewicz Oct 2 '13
hey correct me if i am wrong,


i should:

-sniff the javasript in eg. Firefox firebug DOM

-identify the query

-write a javascipt button sending that parameters 

?

Daisy Team
Daisy Oct 3 '13
Our search form uses POST method to send data to the server. So, it's impossible to save the search results URL. The only way is developing your own search form using GET method which will allow you to see search parameters and save the URLs.
Zenon Ziebiewicz
Zenon Ziebiewicz Oct 3 '13
the url is not obligatory,
only the result listing,

the actual form is: ow_system_plugins/base/controllers/user_search.php ?

would it be possible to modify and link to new form php file?




Daisy Team
Daisy Oct 11 '13

Quote from Zenon Ziebiewicz the actual form is: ow_system_plugins/base/controllers/user_search.php ?

Yes, you can find all necessary functions in this file.


Quote from Zenon Ziebiewicz would it be possible to modify and link to new form php file?

Yes, it's possible, but we strongly recommend that you create your own plugin and do not make changes in the core files, because when you update your site - all the changes you've made will be lost.
Micah
Micah Aug 3 '15
Did you ever find a solution to this?  I'm needing this same requirement.  I want to list all of one account type with a menu button.  The search function appears to be the best solution, but how do I make one of those menu buttons to be a form post?
Zenon Ziebiewicz
Zenon Ziebiewicz Aug 16 '15

hi,

i'll check and let you know.

The Forum post is edited by Zenon Ziebiewicz Aug 16 '15
Zenon Ziebiewicz
Zenon Ziebiewicz Aug 16 '15

you have to send POST data to search form - it submits to itsself (action="")


if you want to search users by account type:

-go to search page (users/search) and check in output html code the vale of that account type, it should look like this:

<option value="xxxxxxxxxxxxxxxxxxxxxxxxxx">Your account type</option>


than create php file, containing:


<?php echo "Searching...";?>
<form name="MainSearchForm" method="post" action="/users/search" >
<input type="hidden" name="MainSearchFormSubmit" ><input type="hidden" name="accountType" value="xxxxxxxxxxxxxxxxxxxxxxxxxxx"><input type="hidden" name="form_name" value="MainSearchForm" >
<script language="JavaScript">document.MainSearchForm.submit();</script></form>


(dont forget to replace xxxxxxx with proper value)

 

place that file in some directory eg. your-directory-name in oxwall root direcotry

(to make it executabe you have to add 

additional condition in .htaccess in root oxwall directory:


RewriteCond %{REQUEST_URI} !/your-directory-name/


)


to link to your custom search result page just link to that newly created php file,


that's it, if you want to add some other custom parameters,

use firebug to sniff the POST request and modify the redirection file.


if something is not celar plese dont hesitate to ask,