Custom Search Page
From Adult Web Scripts Wiki
Search Form
Add a new url config entry to load the search form file:
- name: searchform
- rule: /search.html
- type: none (as no need to actually load anything)
This will cause seachform.php to be loaded (or searchform.tpl etc, whatever gets found) when the url mydomain.com/search.html is requested.
Display Webcams Results
The following code will extract some data that has been submitting via the search form for webcams (replace $_GET with $_POST if your FORM post POST's the data). Save this as searchform.php if you have used the urlconfig entry above.
<? $query = ''; if (!empty($_GET['hair_color'])) { $hair_color .= '&hair_color=' . $_GET['hair_color']; } if (!empty($_GET['min_age']) && !empty($_GET['max_age'])) { $query .= '&age=' . $_GET['min_age'] . '..' . $_GET['max_age']; } echo zestoi('webcams', "hair_color=$_GET[hair_color]&age=$minage...$maxage"); ?>
Dating Search Form
Copy the templates/dating_search.php file to your theme directory. Add a rule like the one above. The example below will make the url of your dating search page /dating-search/
- name: dating_search
- rule: /dating-search/
- type: none
This will then cause the dating_search.php file to be loaded (since the name of the php file matches the name entered in the urlconfig above).
The FORM will post to itself and display matching dating results in a grid.
