Support Forums

Adding google search box to template

This is a discussion on Adding google search box to template within the Technical Support forums, part of the Technical Support Forums category; Hi Please be kind, I installed 68C (designer) just yesterday as I am not too familiar with PHP etc. I ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 01-13-2009, 09:33 AM   #1
Member
 
Join Date: Jan 2009
Posts: 42
Rep Power: 11
sunshinemike is on a distinguished road
Default Adding google search box to template

Hi

Please be kind, I installed 68C (designer) just yesterday as I am not too familiar with PHP etc.

I have signed up for Google Adsense and want to replace the seach box at the top of the default 3column template with the code below


<form action="http://www.google.co.uk/cse" id="cse-search-box" target="_blank">
<div>
<input type="hidden" name="cx" value="partner-pub-3747475939455347:m6tsit-da0l" />
<input type="hidden" name="ie" value="ISO-8859-1" />
<input type="text" name="q" size="35" />
<input type="submit" name="sa" value="Search" />
</div>
</form>

I have tried simply replacing the code below which is found in layout.tpl

<form method="get" action="searchresults.php">
<p><input type="text" name="searchtext" class="search" value="{$smarty.get.searchtext|stripslashes}" /> <input type="submit" value="{$smarty.const.LANG_SEARCH}" class="button" /></p>
</form>

..... but it doesnt work. My site still appears to be using the old search method.

Is there an easy way to insert the google code into the template without ruining the look fo the site?

Many thanks

Mike
sunshinemike is offline  
Old 01-13-2009, 09:36 AM   #2
curmudgeon
 
Join Date: Mar 2006
Posts: 5,410
Rep Power: 137
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Did you edit the corect template?

Did you delete the contents of the /templates_c folder?
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 01-13-2009, 10:27 AM   #3
Developer & Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 2,297
Rep Power: 68
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

Try adding the classes as in the default. The class is a CSS style call which is what sets the look.

This:
<input type="text" name="q" size="35" />

To This:
<input type="text" name="q" class="search" />

AND this:
<input type="submit" name="sa" value="Search" />

To This:
<input type="submit" name="sa" value="Search" class="button" />

In addition, please ensure that your new code is still within the existing <div id="search"></div>

-Mike
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10,4.2,5.0)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Google Analytics gabs Technical Support 10 01-27-2009 04:02 PM
problem with adding google search suresh Technical Support 2 08-25-2008 09:59 AM


All times are GMT -4. The time now is 01:54 AM.


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