Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Google Custom Search Engine Integration [AdSense capable] Details »»
Google Custom Search Engine Integration [AdSense capable]
Version: 1.00, by reteep reteep is offline
Developer Last Online: Dec 2013 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.6.7 Rating:
Released: 05-16-2007 Last Update: 05-16-2007 Installs: 16
Uses Plugins Template Edits
 
No support by the author.

NOTE: This works only on vBulletin 3.6.7+ as it's using one of the new navbar hooks introduced in 3.6.7.

Google Custom Search Engine Integration v1.0.0
http://www.andreas-kraus.net/blog -|- http://www.seo-vault.de

If you don't have a Google Custom Search Engine yet, get one here: http://www.google.com/coop/cse/overview (Free Google Account required)
With the GCS you have the ability to let Google just search the sites you specify, no other sites.

Quote:
Place a search box and search results on your website.
Specify or prioritize the sites you want to include in searches.
Customize the look and feel to match your website.
Invite your community to contribute to the search engine.
AdSense Integration with the Custom Search Engine possible!


Instructions:

1) Download the plugin and install the plugin by importing the XML file
2) Edit the new template: navbar_GoogleCustom_Search
3) Go to the Google Coop Site , navigate to your custom search engine control panel, click on "Code", choose the last Layout with the note "Watermark requires Javascript", now you see something like this:

Code:
<!-- Google CSE Search Box Begins  -->
  <form id="searchbox_123412344xxxx672729:-gj4xxodxro" action="http://google.com/cse">
    <input type="hidden" name="cx" value="00309xxxxxxxxx12672729:-gjxxxodxxo" />
    <input type="hidden" name="cof" value="FORID:1" />
    <input name="q" type="text" size="40" />
    <input type="submit" name="sa" value="Search" />
  </form>
  <script type="text/javascript" src="http://google.com/coop/cse/brand?form=searchbox_00309026xxxxxx2729%3A-gj4q4od4ro"></script>
<!-- Google CSE Search Box Ends -->
Copy this code into notepad or some other text editor as you need to make a couple of changes to this code, basically you have to wrap a table around it with the standard vbulletin style classes. The changes are pretty straight forward, that's how it should look like:

Code:
<!-- Google CSE Search Box Begins -->
<form id="searchbox_123412344xxxx672729:-gj4xxodxro" action="http://google.com/cse">
<table cellpadding="4" cellspacing="1" border="0">
        <tr>
            <td class="thead">Google Custom Search</td>
        </tr>
        <tr>
            <td class="vbmenu_option" title="nohilite">
    <input type="hidden" name="cx" value="00309xxxxxxxxx12672729:-gjxxxodxxo" />
  <input type="hidden" name="cof" value="FORID:1" />
  <div><input class="bginput" name="q" type="text" size="25" /><input type="submit" name="sa" class="button" value="Go" /></div>
  </td>
        </tr>
           </table>
  	</form>
  <script type="text/javascript" src="http://google.com/coop/cse/brand?form=searchbox_00309026xxxxxx2729%3A-gj4q4od4ro"></script>
<!-- Google CSE Search Box Ends -->
I marked some attributes red so you don't forget them . Copy it back into the vBulletin template, save it and that's it! If you want to have your google custom search engine associated to your AdSense Account hit "Make Money" in the GCS Panel and fill in your AdSense ID.

Enjoy!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 05-17-2007, 12:30 PM
Legende Legende is offline
 
Join Date: Jan 2006
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

seems not to work with vb 3.6.5? it doesn't appear?
Reply With Quote
  #3  
Old 05-17-2007, 12:36 PM
Legende Legende is offline
 
Join Date: Jan 2006
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok made the changes in navbar by myself *clicks install*
Reply With Quote
  #4  
Old 05-17-2007, 12:49 PM
reteep reteep is offline
 
Join Date: Mar 2004
Location: Germany
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

as stated above :
Quote:
NOTE: This works only on vBulletin 3.6.7+ as it's using one of the new navbar hooks introduced in 3.6.7.
As soon as you update to 3.6.7 it will appear and it's integrated cleanly.
Reply With Quote
  #5  
Old 10-26-2007, 07:05 PM
induslady induslady is offline
 
Join Date: Jul 2006
Posts: 224
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello Reteep,

Great Plugin!

I have installed this in my forum. I am running vB 3.6.8 and I have also implemented blogs. So the search in the forum, includes drop down for searching threads and posts, as well as for searching the blogs.

Implementing your plugin, added Google Custom search in between the forum search and blog search. The style appearance for the blog search got removed on implementing this one.

I am attaching images of how it was before implementing and after implementing the plugin.

Please let me know how I can fix this issue. Thank you for your support.
Reply With Quote
  #6  
Old 10-26-2007, 07:17 PM
reteep reteep is offline
 
Join Date: Mar 2004
Location: Germany
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi IndusLady, did you include the blogsearch also by using a plugin? If this is the case please drop me the link to the plugin so I can test it out.

If you implented that Blog Search Box manually, try moving it above the Hook in the template.
Reply With Quote
  #7  
Old 10-26-2007, 10:39 PM
induslady induslady is offline
 
Join Date: Jul 2006
Posts: 224
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello Reteep,

Thanks for the quick response and support. The blog search box appeared when I implemented the vbulletin blog add-on. I didn't implement a separate hack or implement it manually.
Reply With Quote
  #8  
Old 10-29-2007, 05:20 PM
reteep reteep is offline
 
Join Date: Mar 2004
Location: Germany
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by induslady View Post
Hello Reteep,

Thanks for the quick response and support. The blog search box appeared when I implemented the vbulletin blog add-on. I didn't implement a separate hack or implement it manually.
Ahhh, ok. Unfortunately I don't use the blog add-on anywhere yet. I would have to see the code to provide you with a fix as the code of my plugin looks just fine.

Could u provide me with the (HTML) source code which is produced by the complete popup or post the URL where you implented it?

Sorry for the delay, this time I didn't receive an e-mail notifaction of the reply..
Reply With Quote
  #9  
Old 10-29-2007, 08:49 PM
induslady induslady is offline
 
Join Date: Jul 2006
Posts: 224
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello Reteep,

I have implemented the blogs in both my test and live forums.
URL of my live forum - http://www.indusladies.com/forums
If you click on the search menu you will see the blog search there.

But I haven't yet implemented your Google CSE plugin in the live forum. It's just there in my test forum. Not sure you will be able to access my test forum (for it is not available to public).

So, I am providing the code in the template...

Quote:
blog_navbar_search
<tr>
<td class="thead">$vbphrase[search_blogs]</td>
</tr>
<tr>
<td class="vbmenu_option" title="nohilite">
<form action="blog_search.php?$session[sessionurl]do=dosearch" method="post">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="dosearch" />
<input type="hidden" name="quicksearch" value="1" />
<div><input type="text" class="bginput" name="title" size="25" tabindex="2003" /><input type="submit" class="button" value="$vbphrase[go]" tabindex="2004" /></div>
</form>
</td>
</tr>
<tr>
<td class="vbmenu_option"><a href="blog_search.php?$session[sessionhash]do=search">$vbphrase[advanced_search]</a></td>
</tr>
Is this what you were looking for? If yes, I can also provide you codes in the template blog_search_results and blog_advanced_search, if required.

Thank you and look forward to your help.
Reply With Quote
  #10  
Old 11-01-2007, 03:53 PM
induslady induslady is offline
 
Join Date: Jul 2006
Posts: 224
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello Reteep,

I see that you are calling the below line in 'navbar_search' , which cause the Google Custom search box to appear below the forums search.

$template_hook[navbar_search_menu]

Blogs have got a template 'blog_navbar_search' that displays the blog search option in the drop down.

Is there by any chance the template for your hook Google custom search is called in the blog search template? So that in the search drop down, the forum search appears 1st, the blog search is 2nd and then we have the Google custom search.

What say you?

Advance thanks for your help.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:46 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.04409 seconds
  • Memory Usage 2,307KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete