vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Add Google adsense search to your navbar dropdown (https://vborg.vbsupport.ru/showthread.php?t=103222)

ericgtr 12-17-2005 10:00 PM

Add Google adsense search to your navbar dropdown
 
For any of you running adsense, using the adsense search on your site will generate more revenue. If you don't already have it setup, log into your adsense account and click on the "AdSense for Search" link then customize it to your liking. More so to make it fit better in the dropdown box. You may also add your site to the search, it will generate more clicks.

Now add it do your Search dropdown, in the navbar template find:
Code:

<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
                </tr>

Add this underneath:
Code:

                <tr>
                        <td class="thead">Search Google</td>
                </tr>
<!-- SiteSearch Google -->
replace this text with your adsense search code
<!-- SiteSearch Google -->


noppid 12-18-2005 07:53 PM

What an awsome idea! Thanks for sharing this!

ericgtr 12-18-2005 08:06 PM

Sure :) It's a boring Sunday and it's snowing out so I decided to share some of my template mods with the group.

Rich 12-18-2005 10:27 PM

Hello,

Since I added this in the other modification (same thing as this) I figure I will add it here too.

This attachment explains how to give the google search its own dropmenu which gives it more attention and more revenue for you.

This is the other thread that does the same thing as this one:

https://vborg.vbsupport.ru/showthrea...ghlight=google

ericgtr 12-18-2005 10:34 PM

Thanks for this. The reason I decided to add this to the existing search is because that's the one I think most people will use, that's just me though :) Additionally, I was thinking about adding this to the search dropdown in the forum and thread views as well.

The Chief 12-18-2005 11:22 PM

installed and works great, thank you :)

[high]* The Chief clicks install[/high]

prawn 12-20-2005 08:50 AM

hey there!
thanks for that great idea.

i wanted to add that to my boards but i came across some more requirements i also worked out. i added the function to minimize the google form and stuff like that. you can take a look at what i mean by taking a quick visit on my forums here.

here's the code if you like it:
Code:

<tr>
<td class="thead"><a style="float:right" href="#top" onclick="return toggle_collapse('navbar_google')"><img id="collapseimg_navbar_google" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_navbar_google].gif" alt="" border="0" /></a>Google Suche</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite" id="collapseobj_navbar_google" style="$vbcollapse[collapseobj_navbar_google]">
<div align="center">
<!-- SiteSearch Google -->
<!-- GOOGLE ADSENSE CODE HERE -->
<!-- SiteSearch Google -->
</div>
</td>
</tr>


ericgtr 12-20-2005 12:04 PM

Quote:

Originally Posted by prawn
hey there!
thanks for that great idea.

i wanted to add that to my boards but i came across some more requirements i also worked out. i added the function to minimize the google form and stuff like that. you can take a look at what i mean by taking a quick visit on my forums here.

here's the code if you like it:
Code:

<tr>
<td class="thead"><a style="float:right" href="#top" onclick="return toggle_collapse('navbar_google')"><img id="collapseimg_navbar_google" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_navbar_google].gif" alt="" border="0" /></a>Google Suche</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite" id="collapseobj_navbar_google" style="$vbcollapse[collapseobj_navbar_google]">
<div align="center">
<!-- SiteSearch Google -->
<!-- GOOGLE ADSENSE CODE HERE -->
<!-- SiteSearch Google -->
</div>
</td>
</tr>


Nice addition, thanks! :)

ericgtr 12-21-2005 07:46 PM

Quote:

Originally Posted by mini2
Is it possible (using CSS) to get the google search button to look like the other buttons on your website (mine are "flat" using CSS)?

Could be but it may be against their TOS to edit anything that isn't provided from their builder page. They are very touchy about how their ads are displayed and every day I keep reading new horror stories about people's accounts getting yanked so I try not to touch anything like that lol.

ericgtr 12-21-2005 07:54 PM

Ahh Gotcha, not sure how that would be done myself.

prawn 12-21-2005 09:26 PM

Yeah I was ++++ed up once for asking people to click on my banner. They kicked my account and I tried to argue with them. They copied & pasted their f*ckin TOS everytime. I thought I was mailing with a computer. You really have to be careful there.
Don't think that this is possible. Even if it was possible they might say anything is forbidden that changes the appearance of their banners.

They get like M$! ;)

ericgtr 12-21-2005 09:33 PM

Yeah, even though it technically wouldn't be changing their source code, it's still an alteration to the end result.

Moncal 12-26-2005 01:11 PM

Great idea. Thanks.

NineToez 12-28-2005 08:05 AM

Thanks! Great mod! My only wish would be to make the text box and button the exact same size as the vB to match (so I'm a little anal), but none the less a worthwhile mod.

Freezerator 12-30-2005 08:13 PM

Code:

                <tr>
                        <td class="thead">Search Google</td>
                </tr>
<!-- SiteSearch Google -->
replace this text with your adsense search code
<!-- SiteSearch Google -->

When i add this code, it breaks the table? I can't figure it out where it's happening. Can someone check this?

ericgtr 12-30-2005 08:16 PM

This is designed for 3.5.x are you still using 3.0.7? If so it's probably a matter of messing with it a little bit to get the format right in your template. I would look for you but my server is crashed at the moment.

Freezerator 12-30-2005 08:17 PM

I am sorry, i haven't updated my profile. I am using 3.5.2 since today :)

ericgtr 12-30-2005 08:28 PM

Okay, lets make sure that where it says:
replace this text with your adsense search code
is only replaced with the google code itself, no other. So you will want to start at <script> and end at </script> when pasting your code in.

Freezerator 12-30-2005 08:34 PM

http://forum.scooterforum.net/forum/

I have inserted the code, without the google script. As you can see, it looks like the table doesn't close correctly.

I have this code:

Code:

            <td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
                </tr>

                <tr>
                        <td class="thead">Search Google</td>
                </tr>
<!-- SiteSearch Google -->
replace this text with your adsense search code
<!-- SiteSearch Google -->

                </tr>
                </table>
        </div>
        <!-- / header quick search form -->


ericgtr 12-30-2005 08:42 PM

On your forum it looks like it's above the default search when it should be below.

Freezerator 12-30-2005 08:46 PM

You are right, and that is the problem. The code i have pasted here above shows that i have c/p it on the right spot right? It's underneath
Code:

<td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
so i can't see where it goes wrong.

ericgtr 12-30-2005 08:56 PM

Hmm.. without being able to look at my templates at the moment it's hard to tell but this does look suspect:
Code:

                <tr>
                        <td class="thead">Search Google</td>
                </tr>
<!-- SiteSearch Google -->
replace this text with your adsense search code
<!-- SiteSearch Google -->

                </tr>
                </table>

Looks like there are two closing tags, is that last </tr> in the template by default? You can do a "View Original" to tell.

XtremeOffroad 01-04-2006 05:29 PM

This is Great, Thanks for sharing.
Installed.

LBSources 01-04-2006 11:42 PM

Quote:

Originally Posted by ericgtr
Hmm.. without being able to look at my templates at the moment it's hard to tell but this does look suspect:
Code:

                <tr>
                        <td class="thead">Search Google</td>
                </tr>
<!-- SiteSearch Google -->
replace this text with your adsense search code
<!-- SiteSearch Google -->

                </tr>
                </table>

Looks like there are two closing tags, is that last </tr> in the template by default? You can do a "View Original" to tell.

works great ..

[high]* LBSources clicks install[/high]

venomx 02-13-2006 05:15 PM

I use the Adsense RevShare hack, I dont think I can use this.. I wish I could :(
Nice Mod ericgtr :)

RichieBoy67 02-13-2006 06:00 PM

I am having a strange problem. I add the code to the proper place and my forums become centered. I have no idea what is causing this.

never mind..... Thanks

ericgtr 02-13-2006 09:36 PM

Quote:

Originally Posted by venomx
I use the Adsense RevShare hack, I dont think I can use this.. I wish I could :(
Nice Mod ericgtr :)

I haven't looked at the code for that but it might not be too hard to integrate.

venomx 02-13-2006 10:51 PM

Well the revshare hack only works when its shown right below the first users post.. I cant seem to make it work elsewhere.. :(

bizpro 05-16-2006 04:37 AM

Installed and works great!

shanemcse 05-19-2006 04:18 PM

I had to remove "</table>" from the Google code to allow "New Posts: and
Todays Posts:" to not get cut off from the drop down menu. Is it OK to remove that from the google code?

</td></tr></table>
</form>
<!-- SiteSearch Google -->

oberheimhaven 05-20-2006 01:12 AM

guitars 101 lol:banana:

Langly 05-20-2006 01:45 AM

It works great but how can I remove the vbulletin search and only have the google search there?

Forumdayim.Net 05-20-2006 12:12 PM

Yes good...Thanks. :)

vBulletin THEN DAYLIGHT 05-20-2006 07:42 PM

Quote:

Originally Posted by Langly
It works great but how can I remove the vbulletin search and only have the google search there?

Remove this:

Code:

                <tr>
                        <td class="thead">$vbphrase[search_forums]</td>
                </tr>
                <tr>
                        <td class="vbmenu_option" title="nohilite">
                        <form action="search.php" method="post">
                                <input type="hidden" name="do" value="process" />
                                <input type="hidden" name="showposts" value="0" />
                                <input type="hidden" name="quicksearch" value="1" />
                                <input type="hidden" name="s" value="$session[sessionhash]" />
                                <input type="text" class="bginput" name="query" size="25" />&nbsp;$gobutton<br />
                        </form>
                        </td>
                </tr>
                <tr>
                        <td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
                </tr>


Langly 05-20-2006 10:36 PM

Remove it from where? forumhome, postbit, etc?


Quote:

Originally Posted by vBulletin THEN DAYLIGHT
Remove this:

Code:

                <tr>
                        <td class="thead">$vbphrase[search_forums]</td>
                </tr>
                <tr>
                        <td class="vbmenu_option" title="nohilite">
                        <form action="search.php" method="post">
                                <input type="hidden" name="do" value="process" />
                                <input type="hidden" name="showposts" value="0" />
                                <input type="hidden" name="quicksearch" value="1" />
                                <input type="hidden" name="s" value="$session[sessionhash]" />
                                <input type="text" class="bginput" name="query" size="25" />&nbsp;$gobutton<br />
                        </form>
                        </td>
                </tr>
                <tr>
                        <td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
                </tr>



Kwak 05-23-2006 07:15 PM

Thank you . INstalled.

StephanieM 06-02-2006 03:00 AM

Thanks for the tip. I have it installed!

camuca 06-07-2006 02:58 AM

Nice idea. thanks

egyptsons 06-07-2006 09:42 PM

<font color="DarkGreen">installed </font>

libertylounge 07-25-2006 10:04 PM

I'd like to add it to my "Search this Forum" and "Search this Thread" as well

I thought I found where to edit in FORUMDISPLAY, but unfortunately whenever I attempt to search through it, it gripes at me about searching for an invalid user or some such :(

Any help would be appreciated.

nm, fixed it.


All times are GMT. The time now is 04:08 AM.

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.01347 seconds
  • Memory Usage 1,838KB
  • 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
  • (11)bbcode_code_printable
  • (6)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
  • (40)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