Support Forums

Old 04-09-2006, 12:05 PM   #1
Moderator
 
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 2,163
Rep Power: 59
juven14 is a jewel in the rough
Default quick search mod

Here is a quick search mod:

It consists of 1 plugin and the code for the search form.

quicksearch.zip
__________________
TemplateCodes.com
juven14 is offline  
Old 04-14-2006, 06:35 PM   #2
Senior Member
 
 
Join Date: Mar 2006
Posts: 110
Rep Power: 15
sleepy will become famous soon enough
Default

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
sleepy is offline  
Old 04-14-2006, 06:37 PM   #3
Moderator
 
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 2,163
Rep Power: 59
juven14 is a jewel in the rough
Default

includes/classes/smarty/plugins
__________________
TemplateCodes.com
juven14 is offline  
Old 04-14-2006, 07:00 PM   #4
Senior Member
 
 
Join Date: Mar 2006
Posts: 110
Rep Power: 15
sleepy will become famous soon enough
Default

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
sleepy is offline  
Old 04-14-2006, 08:33 PM   #5
Moderator
 
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 2,163
Rep Power: 59
juven14 is a jewel in the rough
Default

Be sure you've uploaded the plugin.
__________________
TemplateCodes.com
juven14 is offline  
Old 04-14-2006, 08:44 PM   #6
Senior Member
 
 
Join Date: Mar 2006
Posts: 110
Rep Power: 15
sleepy will become famous soon enough
Default

John,

Could you elaborate on what you mean by uploadd the plugin.
Im obviously missing one or more steps.

cheers,
sleepy
sleepy is offline  
Old 04-14-2006, 08:48 PM   #7
Moderator
 
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 2,163
Rep Power: 59
juven14 is a jewel in the rough
Default

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
__________________
TemplateCodes.com
juven14 is offline  
Old 04-14-2006, 09:22 PM   #8
Senior Member
 
 
Join Date: Mar 2006
Posts: 110
Rep Power: 15
sleepy will become famous soon enough
Default

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
sleepy is offline  
Old 04-14-2006, 09:44 PM   #9
Moderator
 
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 2,163
Rep Power: 59
juven14 is a jewel in the rough
Default

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.
__________________
TemplateCodes.com
juven14 is offline  
Old 04-14-2006, 09:48 PM   #10
Moderator
 
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 2,163
Rep Power: 59
juven14 is a jewel in the rough
Default

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.
__________________
TemplateCodes.com
juven14 is offline  
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 07:27 AM.


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