Replace SMF Default Search Bar with Google Adsense Search

Started by Biology Forums, April 19, 2011, 05:33:09 PM

Previous topic - Next topic

Biology Forums

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

Here is what I'm referring to.


Hj Ahmad Rasyid Hj Ismail

You need to make those changes to your index.template.php file. Replace the SMF search code in it with your google search code.



Hj Ahmad Rasyid Hj Ismail

Attach your index.template.php and we'll try to help you.


Hj Ahmad Rasyid Hj Ismail

Find:
echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input type="text" name="search" value="" style="width: 190px;" />&nbsp;
<input type="submit" name="submit" value="', $txt[182], '" style="width: 11ex;" />
<input type="hidden" name="advanced" value="0" />';

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';

echo '
</form>
</td>

Replace with:
echo '
<td class="titlebg2" align="right" nowrap="nowrap" valign="top">

Insert Google Adsense Search Here!

</td>


I didn't test this since you have other mods installed. If it is not working please show us how do you make the suggested modification by attaching the modified lines of code here.


Hj Ahmad Rasyid Hj Ismail



margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Advertisement: