|
|
#1 |
|
Moderator
|
Here is a quick search mod:
It consists of 1 plugin and the code for the search form. quicksearch.zip |
|
|
|
|
#2 |
|
Senior Member
Join Date: Mar 2006
Posts: 110
Rep Power: 15 ![]() |
John,
Im wanting to try this in 3.1b3 but the folder structure has changed. Any idea whereabouts I place function.search_category.php in 3.1b3? Cheers, sleepy |
|
|
|
|
#3 |
|
Moderator
|
includes/classes/smarty/plugins
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Mar 2006
Posts: 110
Rep Power: 15 ![]() |
Thanks John,
Just tried this in home.tpl and got the following error .... Fatal error: Smarty error: [in home.tpl.php line 6]: syntax error: unrecognized tag 'search_category' (Smarty_Compiler.class.php, line 580) in /home/visionso/public_html/includes/classes/smarty/Smarty.class.php on line 1095 sleepy |
|
|
|
|
#5 |
|
Moderator
|
Be sure you've uploaded the plugin.
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Mar 2006
Posts: 110
Rep Power: 15 ![]() |
John,
Could you elaborate on what you mean by uploadd the plugin. Im obviously missing one or more steps. cheers, sleepy |
|
|
|
|
#7 |
|
Moderator
|
Sorry about that.
You must save the file in the directory mentioned earlier, it seems that you have not uploaded that plugin file (function.search_category.php) to the server as smarty doesn't know what to do with the tag. Be sure you have uploaded that file to your server in this path: includes/classes/smarty/plugins/function.search_category.php |
|
|
|
|
#8 |
|
Senior Member
Join Date: Mar 2006
Posts: 110
Rep Power: 15 ![]() |
Oops ... Id uploaded to plugin folders on hard drive but forgot upload to site ... Thanks!
If I wish to add/change the search options in your quick search box on my home.tpl page .... e.g., country ... <select name="country" id="country"> <option value=''>{$smarty.const.LANG_SEARCH_ALLCAT}</option> {section name=i loop=$countries} <option value="{$countries[i].country}">{$countries[i].country}</option> {/section} </select> Do I also have to make changes to code in function.search_category.php for search to work properly? sleepy |
|
|
|
|
#9 |
|
Moderator
|
It depends, the sole purpose of this plugin is to populate the category field, doing it in the plugin solves the problem of having to include to every file you wish it to search from. For states, countries, or other stuff that is stored in the database you will need to add it to the plugin file. Otherwise you just add the search boxes at the template level.
|
|
|
|
|
#10 |
|
Moderator
|
one note. You can completely code the search box from the plugin and just call it from the template. I originally included everything into plugin file including the submit button. That way the search box and all would disappear/appear depending if the smarty function call was present.
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Quick SEO optimization for showlistings | civ | v3.1 Modules & Modifications | 2 | 01-03-2007 09:26 AM |
| Search in Navigation bar | marketingsolutions | v3.1 Questions & Support | 0 | 11-02-2006 12:10 PM |
| Aligning the "zip code," etc. search fields | spaceboy | v3.1 Modules & Modifications | 5 | 09-09-2006 02:27 PM |
| Adding Search to | sleepy | HTML, CSS, and Design Help | 8 | 04-09-2006 12:12 PM |
| Advanced Search Template | sporthorsebreeder | HTML, CSS, and Design Help | 6 | 04-05-2006 04:25 PM |