PDA

View Full Version : Mini Mods - Add Google AdSense Sitesearch to the standard forum search page.


Chris-777
06 Apr 2008, 15:34
This will put a google search box above your standard search forum. You will need to generate your sitesearch code using AdSense's tools. Once you have your code, do the following:

ACP-> Styles & Templates -> edit the search_forums template.

Find towards the top:

$header
$navbar

Add below:


<!-- Google Search -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">
Google Search
</td></tr>
<tr><td class="alt1" align="center">


GOOGLE SEARCH CODE GOES HERE

</td></tr>
</table>
<br />
<!-- /Google Search -->


Add your AdSense Search code as appropriate. The default AdSense setup only allows for black, white and grey backgrounds. To make it blend in with your site, edit the BGCOLOR attribute of the initial table call in Google's code. For example, I chose the black background:


<!-- SiteSearch Google -->
<form method="get" action="http://www.google.com/custom" target="google_window">
<table border="0" bgcolor="#000000">
[/code]

My alt1 color is #333333, so I edited the very last bit:


<!-- SiteSearch Google -->
<form method="get" action="http://www.google.com/custom" target="google_window">
<table border="0" bgcolor="#333333">

So that it matches the overall look of my site and blends in with the table.

Screenshot:

http://www.sevenstring.org/chris/vbo_ssasgoogle.jpg

Chris-777
06 Apr 2008, 15:46
Note that one of the more useful reasons for having this on your site is to be able to search for two-character strings. If you want to add a blurb about it, look for:

</table>

And add the following above it:


<tr><td class="alt1" align="center">
<span class="smallfont">
Google search is useful for finding terms that are three or less characters long. For example, to search for "9v", enter "9v" in the search pane, and select the 'www.sevenstring.org' button below it.</span></td></tr>

And replace my site's name and the search term with something more relevant to your site.

https://www.vbulletin.org/forum/

onnenkolikko
06 Apr 2008, 22:33
nice mod. Installed :)

PoetJA-1975
07 Apr 2008, 02:14
Yes - very nice = Thanx for sharing!

Jacquii.

PoetJA-1975
07 Apr 2008, 04:15
I edited the html code just slightly to better fit my Forum...
If you want a live example site: http://jpicforum.info/search.php
Thanx again ;)

Jacquii.

snakeair
08 Apr 2008, 02:58
Thanks for the mod. "Installed"

Playa82
08 Apr 2008, 06:31
Note that one of the more useful reasons for having this on your site is to be able to search for two-character strings. If you want to add a blurb about it, look for:

</table>

And add the following above it:


<tr><td class="alt1" align="center">
<span class="smallfont">
Google search is useful for finding terms that are three or less characters long. For example, to search for "9v", enter "9v" in the search pane, and select the 'www.sevenstring.org' button below it.</span></td></tr>

And replace my site's name and the search term with something more relevant to your site.

http://www.sevenstring.org/chris/vbo_ssasgoogle2.jpg


Nice addition but u made a little mistake:

u have to search for this:

</input>
</td></tr></table>

and after add:

<tr><td class="alt1" align="center">
<span class="smallfont">
Google search is useful for finding terms that are three or less characters long. For example, to search for "9v", enter "9v" in the search pane, and select the 'www.crackmuzik-gfx-elite.de' button below it.</span></td></tr>

-----------------------------------------------------------------------
Example here:
http://crackmuzik-gfx-elite.de/search.php
-----------------------------------------------------------------------

iogames
09 Apr 2008, 13:57
how can I add it to the bottom?

Playa82
09 Apr 2008, 20:01
how can I add it to the bottom?

in search_forums template find:

$footer

</body>
</html>

add above:

<!-- Google Search -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">
Google Search
</td></tr>
<tr><td class="alt1" align="center">


GOOGLE SEARCH CODE GOES HERE

</td></tr>
</table>
<br />
<!-- /Google Search -->

kollam003
10 Apr 2008, 18:12
installed thx

thestaton
20 Apr 2008, 21:54
excellent hack. thanks for the write up!

kunc86
05 May 2008, 16:52
installed thax