Support Forums

Will pay for mods...

This is a discussion on Will pay for mods... within the v3.1 Modules & Modifications forums, part of the Legacy Help & Support category; OK... I've gone through the default search page and tried modifying it (making it more specific) by creating/defining extra fields. ...


Go Back   68 Classifieds Forums > Archives > Legacy Help & Support > v3.1 Modules & Modifications

 
 
Thread Tools Display Modes
Old 06-05-2007, 03:30 AM   #1
Member
 
Join Date: May 2007
Posts: 37
Rep Power: 11
abkeller is on a distinguished road
Default Will pay for mods...

OK... I've gone through the default search page and tried modifying it (making it more specific) by creating/defining extra fields. It's still not meeting our criteria. I need to modify the default search functions to be the following (all on the same interface);

1) Eliminate top-level category search field (when I did that the extra fields would not display because the logic depends on the selection of top level category first - don't want this here, will use top-level categories on Browse page)

2) Need to display the admin-created extra field (Manufacturer) ON PAGE LOAD, not as it is now (when the corresponding top-level category is selected first)

3) Search by phone number

4) Search by dateadded via a drop-down menu;

Search listings added since:
Anytime
Since Yesterday
Last 3 Days
Last Week
Last Month


Any takers? Please contact me with suggestions or quote and samples of previous work.

Thanks.
__________________
private signature
68Classifieds - Developer Edition, v.3.1.7
abkeller is offline  
Old 06-18-2007, 06:19 PM   #2
Member
 
Join Date: May 2007
Posts: 37
Rep Power: 11
abkeller is on a distinguished road
Default How to add date search to advanced search page...

I've figured out how to do this myself. I've fixed the advanced search page by completely redoing the search.tpl.php file.

1) To completely customize all search fields on this page I removed this code from the page;

"<script type="text/javascript" src="includes/cpaint/cpaint2.inc.compressed.js"></script>
<script language="JavaScript" type="text/JavaScript">
<!--
{literal}
var cp = new cpaint();
cp.set_transfer_mode('get');
cp.set_response_type('text');
cp.set_persistent_connection(false);
cp.set_async(true);
cp.set_proxy_url('');
cp.set_debug(false);

function displaySec(type){
var QSTRING = type.options[type.selectedIndex].value;
cp.call('{/literal}{$smarty.const.URL}{literal}/ajax.php', 'ajax_extra_search_fields', response, QSTRING);
return false;
}

function response(result) {
document.getElementById('response').innerHTML = result;
document.getElementById('optResponse').innerHTML = '';
}

function displayNewSec(opt){
var QSTRING = opt.options[opt.selectedIndex].value;
cp.call('{/literal}{$smarty.const.URL}{literal}/ajax.php', 'extra_search_fields2', optResponse, QSTRING);
return false;
}


function optResponse(result) {
document.getElementById('optResponse').innerHTML ="";
document.getElementById('optResponse').innerHTML += result;
}

/*
function optResponse(result) {
var newDiv = document.getElementById('optResponse').appendChild (document.createElement('div'));
newDiv.innerHTML = result;
}
*/

{/literal}
//-->
</script>"

2) Then I hardcoded search fields for all the search parameters I wanted to include;

Search by phone; <input type="text" name="phone">
Search by listing ID; <input name="adid" type="text" id="adid" size="6">
Search by extra field (Manufacturer - Field ID 12); "><select name="opt12" size="10" multiple onChange="displayNewSec(this);"> (list is automatically populated from the dB)


3) For the "search by date" parameter, these links are already available in the admin control panel under "browselistings.php". I simply created a new pull-down menu in the "search.tpl.php" and coded each this way;

<select name="select">
<option selected>Antyime</option>
<option value="fromdate={$today}&enddate={$today}">Tod ay</option>
<option value="fromdate={$day}&enddate={$today}">Last 24 hours</option>
<option value="fromdate={$week}&enddate={$today}">Last Week</option>
<option value="fromdate={$month}&enddate={$today}">Las t Month</option>
</select>

Works great!
__________________
private signature
68Classifieds - Developer Edition, v.3.1.7

Last edited by abkeller; 06-18-2007 at 06:30 PM. Reason: Forgot to mention other fixes...
abkeller is offline  
 

Thread Tools
Display Modes



All times are GMT -4. The time now is 02:24 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0