Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: jaisi on April 27, 2012, 06:24:30 PM

Title: Replace SMF Default Search Bar with Google Adsense Search
Post by: jaisi on April 27, 2012, 06:24:30 PM

How do I replace the SMF search bar for the google adsense search code?


forum v 2.2 and default theme
Title: Re: Replace SMF Default Search Bar with Google Adsense Search
Post by: Colin on April 27, 2012, 11:39:53 PM
You will need to modify the template files to do this.
Title: Re: Replace SMF Default Search Bar with Google Adsense Search
Post by: jaisi on May 01, 2012, 03:17:43 PM
how to modify that tamplate file ?? can you help me please
Title: Re: Replace SMF Default Search Bar with Google Adsense Search
Post by: Colin on May 01, 2012, 11:39:54 PM
The search form is found in index.template.php which is in the following directory /smfdirectory/Themes/Default/

Here is the code starting on line 251
<form id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<input type="text" name="search" value="" class="input_text" />&nbsp;
<input type="submit" name="submit" value="', $txt['search'], '" class="button_submit" />
<input type="hidden" name="advanced" value="0" />';


Title: Re: Replace SMF Default Search Bar with Google Adsense Search
Post by: jaisi on May 02, 2012, 02:09:20 PM
now what should i do ?? i need to Replace this code with my google search code or just i need to put that code ??

Sorry for my bad english. and i have attached that index php please remove that code and >>>>>>>>mention where i need to paste code like this <<<<<<<<<<

THanks and hope you undertand .

Title: Re: Replace SMF Default Search Bar with Google Adsense Search
Post by: Colin on May 02, 2012, 07:48:13 PM
I just showed you the code above. That is the search for so you can modify, replace, or manipulate that code to make it into what you are looking for.