Support Forums

Old 01-13-2009, 09:33 AM   #1
Member
 
Join Date: Jan 2009
Posts: 42
Rep Power: 2
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   Reply With Quote
Old 01-13-2009, 09:36 AM   #2
Moderator
 
 
Join Date: Mar 2006
Posts: 4,126
Rep Power: 101
Lhotch is just really niceLhotch is just really nice
Default

Did you edit the corect template?

Did you delete the contents of the /templates_c folder?
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
Lhotch is offline   Reply With Quote
Old 01-13-2009, 10:27 AM   #3
Moderator
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,337
Rep Power: 40
Mike-N-Tosh is just really niceMike-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
v3.1.10 Developer IndianaPC.org - A community website
Sandbox v4.0.9, 4.1
Templates, Mods & Docs for sale | My blog with much content for 68 Classifieds.
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   Reply With Quote

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
Adding Google Analytics gabs v4 Questions & Support 10 01-27-2009 04:02 PM
problem with adding google search suresh v4 Questions & Support 2 08-25-2008 09:59 AM
Adding search option to main site search page? scott17b v3.1 Modules & Modifications 4 07-28-2008 07:39 PM
Adding date search to search.php abkeller v3.1 Modules & Modifications 5 07-03-2007 10:28 AM
adding a google adsense and paypay image garysmith v3.0 Questions & Support 5 04-11-2006 10:10 PM


All times are GMT -4. The time now is 03:59 PM.


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