vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   Mini Mods - Add Google AdSense Sitesearch to the standard forum search page. (https://vborg.vbsupport.ru/showthread.php?t=175311)

04-05-2008 10:00 PM

Add Google AdSense Sitesearch to the standard forum search page.
 
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:

Code:

$header
$navbar

Add below:

Code:

<!-- 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:

Code:

<!-- 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:

Code:

<!-- 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

Guest210212002 04-06-2008 01:46 PM

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:

Code:

</table>
And add the following above it:

Code:

<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://vborg.vbsupport.ru/

onnenkolikko 04-06-2008 08:33 PM

nice mod. Installed :)

PoetJA-1975 04-07-2008 12:14 AM

Yes - very nice = Thanx for sharing!

Jacquii.

PoetJA-1975 04-07-2008 02:15 AM

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 04-08-2008 12:58 AM

Thanks for the mod. "Installed"

Playa82 04-08-2008 04:31 AM

Quote:

Originally Posted by Chris-777 (Post 1484378)
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:

Code:

</table>
And add the following above it:

Code:

<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:

Code:

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

and after add:

Code:

<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 04-09-2008 11:57 AM

how can I add it to the bottom?

Playa82 04-09-2008 06:01 PM

Quote:

Originally Posted by iogames (Post 1486642)
how can I add it to the bottom?

in search_forums template find:

Code:

$footer

</body>
</html>

add above:

Code:

<!-- 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 04-10-2008 04:12 PM

installed thx


All times are GMT. The time now is 10:59 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01121 seconds
  • Memory Usage 1,748KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (12)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete