The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
CFM: Google AdSense for Search Integration Details »» | |||||||||||||||||||||||||
Title: "CFM: Google Search Results"
------------------------------------------------- Author: Sal Bezos (webmaster@carforummisfits.com) Date of Creation: September 3, 2006 Version: 1.0 (9/30/2006) Home: http://www.carforummisfits.com/ ------------------------------------------------- Purpose: -------- This product for vBulletin creates a target page for providing Google Search Results within your vBulletin forums. The Google Search Results (AdSense for Search) will appear in a vBulletin page. Unlike the previous revision of this product, you will now be able to enter code for a Google Search Box for placement in the Search drop-down menu (or anywhere else you would like to place it). Please make sure that your search box code includes a <form> tag that states something along the lines of action="http://<yourhostname>/forums/cfmgoogle.php". Tested: ------- This product has been tested on a vBulletin 3.6.1 installation. There is no reason why it should not work in the same manner on any 3.6.x or 3.5.x installation, but it has not and will not be tested by the author. Included Files: --------------- - README.txt - cfm-live-demo.png (screenshot) - cfmgoogle.php - product-cfm_google_search_results.xml Installation: ------------- 1. Upload the cfmgoogle.php file to your forum root, usually located at http://<yourhostname>/forums. 2. Register for a Google AdSense for Search account. ----a. Register for a Google AdSense account if you don't have one. ----b. Visit "http://www.google.com/adsense/". ----c. Login with your e-mail and password. ----d. Click on the "AdSense Setup" tab. ----e. Select "AdSense for Search". ----f. Configure your search box. --------f1. Select either "Google WebSearch" or "Google WebSearch + SiteSearch" depending on whether you want users to be able to Google search your site or not. If you select "Google WebSearch + SiteSearch", enter the URL of sites you wish to be able to search. --------f2. For Logo Type, I recomment selecting "Google Logo" and checking the "Logo above text box" option. --------f3. For "Opening of search results page" select "Open results within my own site." Enter the URL of your cfmgoogle.php file (e.g. http://<yourhostname>/forums/cfmgoogle.php) --------f4. Click "Continue >>". ----g. Configure the appearance of the results page, then click "Continue >>" ----h. You should now receive two sets of code from Google labeled "Your search box code" and "Your search results code". 3. In your forum's admin panel, go to Plugins & Products/Manage Products 4. Click on Add/Import Product 5. Click "Browse..." and select the "product-cfm_google_search_results.xml" product file. If this is your first installation of this product, select the "No" radio button in the "Allow Overwrite" option. If you are upgrading or reinstalling, select the "Yes" radio button. Click the "Import" button. 6. Go to vBulletin Options/vBulletin Options. Scroll through the list and select "CFM: Google Search Results". 7. In the "Google Search Box Code" option, paste the code provided by Google titled "Your search box code". 7. In the "Google Search Results Code" option, paste the code provided by Google titled "Your search results code". 8. In Styles & Templates/Style Manager go into Edit Templates for your style. Open the "Navigation / Breadcrumb Templates" template group and open the "navbar" template. 9. Find the following: Code:
<form action="search.php?do=process" method="post"> <table cellpadding="4" cellspacing="1" border="0"> Code:
<table cellpadding="4" cellspacing="1" border="0"> <form action="search.php?do=process" method="post"> Code:
</table> </form> </div> <!-- / header quick search form --> Code:
</form> <tr> <td class="thead">Search Google</td> </tr> <tr> <td class="vbmenu_option" title="nohilite">$vboptions[cfmgsr_googlesearch]</td> </tr> </table> </div> <!-- / header quick search form --> 11. Enjoy! FAQ: ---- Q. My search results window is too tall. What's wrong with it? A. This appears to be a bug in the Google Search Results code. If my assumption is incorrect, please let me know. Q. Why are the colors all wonky on my search results? A. The colors of the search results are provided by the search box. Make sure the colors in the search box code are correct. Q. The background color of the Google search box doesn't match my page -- what can I do about it? A. If Google's TOS allows it, play around with the settings in the code you pasted in the "Your search box code" option. Revisions: ---------- 1.0 - 09/30/2006 - Adding instructions and support for the Google search box in the search drop-down menu 0.1 - 09/03/2006 - Initial release Support: -------- Any questions and problems should be reported to the modification's thread on http://www.vbulletin.org. No warranty, express or implied, is granted with this software. Use is at your own risk. License: -------- GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Show Your Support
|
Comments |
#42
|
||||
|
||||
Quote:
https://vborg.vbsupport.ru/showthread.php?p=1067954 Hope that helps! |
#43
|
|||
|
|||
please write what can i do, i don't speak english very well..... :cross-eyed:
|
#44
|
|||
|
|||
Make sure, that you do not paste the google code within an form!
In other words, post it after a </form> tag! Tobi |
#45
|
|||
|
|||
Quote:
please help me again... this is the code: where i paste the code? Code:
<!-- set below for skin width--> <table width="780" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="100%" align="left" valign="top"> <!-- begin enlighten header / logo is controlled via #logo in main CSS file --> <div id="hdr"><div id="hdr_rs"></div><div id="logo"></div></div> <div id="brd_outer"> <div id="brd_in"> <!-- nav buttons bar --> <div align="center"> <div id="nav_back"> <table cellpadding="0" cellspacing="0" border="0" width="50%" align="center"> <tr> <td><img src="$stylevar[imgdir_misc]/nav_div.gif" alt="" /></td> <td class="h_nav"><a href="$vboptions[forumhome].php?$session[sessionurl]">Home</a></td> <if condition="$show['member']"> <td><img src="$stylevar[imgdir_misc]/nav_div.gif" alt="" /></td> <td align="center" class="h_nav"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td> <td><img src="$stylevar[imgdir_misc]/nav_div.gif" alt="" /></td> </if> <if condition="$show['registerbutton']"> <td><img src="$stylevar[imgdir_misc]/nav_div.gif" alt="" /></td> <td class="h_nav"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td> <td><img src="$stylevar[imgdir_misc]/nav_div.gif" alt="" /></td> </if> <td class="h_nav"><a href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></td> <td><img src="$stylevar[imgdir_misc]/nav_div.gif" alt="" /></td> <td class="h_nav"><a href="memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a></td> <td><img src="$stylevar[imgdir_misc]/nav_div.gif" alt="" /></td> <td class="h_nav"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td> <td><img src="$stylevar[imgdir_misc]/nav_div.gif" alt="" /></td> <if condition="$show['popups']"> <if condition="$show['searchbuttons']"> <if condition="$show['member']"> <td class="h_nav"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td> <td><img src="$stylevar[imgdir_misc]/nav_div.gif" alt="" /></td> <else /> <td class="h_nav"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td> <td><img src="$stylevar[imgdir_misc]/nav_div.gif" alt="" /></td> </if> <td id="navbar_search" class="h_nav"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a> <script type="text/javascript"> vbmenu_register("navbar_search"); </script></td> <td><img src="$stylevar[imgdir_misc]/nav_div.gif" alt="" /></td> </if> <if condition="$show['member']"> <td id="usercptools" class="h_nav"><a href="$show[nojs_link]#usercptools">$vbphrase[quick_links]</a> <script type="text/javascript"> vbmenu_register("usercptools"); </script></td> <td><img src="$stylevar[imgdir_misc]/nav_div.gif" alt="" /></td> </if> <else /> <if condition="$show['searchbuttons']"> <td class="h_nav"><a href="search.php$session[sessionurl_q]" accesskey="4">$vbphrase[search]</a></td> <if condition="$show['member']"> <td class="h_nav"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td> <else /> <td class="h_nav"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td> </if> </if> <td class="h_nav"><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a></td> <if condition="$show['member']"> <td class="h_nav"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&focus=1','buddylist','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td> </if> </if> <if condition="$show['member']"> <td class="h_nav"><a href="login.php?$session[sessionurl]do=logout&logouthash=$bbuserinfo[logouthash]" onclick="return log_out()">$vbphrase[log_out]</a></td> <td><img src="$stylevar[imgdir_misc]/nav_div.gif" alt="" /></td> </if> </tr> </table> </div> <!-- / nav buttons bar --> <if condition="$show['popups']"> <!-- NAVBAR POPUP MENUS --> <if condition="$show['searchbuttons']"> <!-- header quick search form --> <div class="vbmenu_popup" id="navbar_search_menu" style="display:none"> <form action="search.php?do=process" method="post"> <table cellpadding="4" cellspacing="1" border="0"> <tr> <td class="thead">$vbphrase[search_forums]</td> </tr> <tr> <td class="vbmenu_option" title="nohilite"> <input type="hidden" name="do" value="process" /> <input type="hidden" name="quicksearch" value="1" /> <input type="hidden" name="s" value="$session[sessionhash]" /> <div><input type="text" class="bginput" name="query" size="25" tabindex="1001" /><input type="submit" class="button" value="$vbphrase[go]" tabindex="1004" /></div> </td> </tr> <tr> <td class="vbmenu_option" title="nohilite"> <label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label> <label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label> </td> </tr> <tr> <td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]:</a></td> </tr> <tr> <td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]:</a></td> </tr> <tr> <td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td> </tr> </table> </form> </div> <!-- / header quick search form --> </if> <if condition="$show['member']"> <!-- user cp tools menu --> <div class="vbmenu_popup" id="usercptools_menu" style="display:none"> <table cellpadding="4" cellspacing="1" border="0"> <tr><td class="thead">$vbphrase[quick_links]</td></tr> <if condition="$vboptions['enablesearches']"><tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily">$vbphrase[todays_posts]</a></td></tr></if> <tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a></td></tr> <tr><td class="vbmenu_option"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&focus=1','buddylist','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td></tr> <tr><td class="thead"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_control_panel]</a></td></tr> <if condition="$show['siglink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editsignature">$vbphrase[edit_signature]</a></td></tr></if> <!--<if condition="$show['avatarlink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editavatar">$vbphrase[edit_avatar]</a></td></tr></if>--> <tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editprofile">$vbphrase[edit_profile]</a></td></tr> <tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td></tr> <tr><td class="thead">$vbphrase[miscellaneous]</td></tr> <if condition="$show['pmstats']"><tr><td class="vbmenu_option"><a href="private.php$session[sessionurl_q]" rel="nofollow">$vbphrase[private_messages]</a></td></tr></if> <tr><td class="vbmenu_option"><a href="subscription.php$session[sessionurl_q]" rel="nofollow">$vbphrase[subscribed_threads]</a></td></tr> <tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[my_profile]</a></td></tr> <if condition="$show['wollink']"><tr><td class="vbmenu_option"><a href="online.php$session[sessionurl_q]">$vbphrase[whos_online]</a></td></tr></if> </table> </div> <!-- / user cp tools menu --> </if> <!-- / NAVBAR POPUP MENUS --> <!-- PAGENAV POPUP --> <div class="vbmenu_popup" id="pagenav_menu" style="display:none"> <table cellpadding="4" cellspacing="1" border="0"> <tr> <td class="thead" nowrap="nowrap">$vbphrase[go_to_page]</td> </tr> <tr> <td class="vbmenu_option" title="nohilite"> <form action="$vboptions[forumhome].php" method="get" onsubmit="return this.gotopage()" id="pagenav_form"> <input type="text" class="bginput" id="pagenav_itxt" style="font-size:11px" size="4" /> <input type="button" class="button" id="pagenav_ibtn" value="$vbphrase[go]" /> </form> </td> </tr> </table> </div> <!-- / PAGENAV POPUP --> </if> </div> <div id="nav_btm"></div> <!-- content table --> <table bgcolor="#ebebe2" width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td> $spacer_open $_phpinclude_output |
#46
|
|||
|
|||
Very nice, thank you.
Two questions. Is it possible to have the search terms highlighted? That is an important feature. Next, I updated my site by building it from new, and importing my 3.5 to my 3.6. Google has all of my links to the old link ID. How can I get this cleared out of Google? Wait? |
#47
|
|||
|
|||
I thought I might put this as a stand alone search in the left column I have on my site. My fear is that users will use it exclusively. The problem with that is vB updates the search info immediately, I need to wait for Google to crawl the site.
Any thoughts? |
#48
|
|||
|
|||
Quote:
i don't uderstand where i paste the cose.....:surprised: |
#49
|
||||
|
||||
Quote:
|
#50
|
|||
|
|||
Works great in 3.6.2, thanks.
|
#51
|
|||
|
|||
Installed. Does anyone have any idea why vBulletin adds all of the whitespace below the search results? I have noticed a similiar problem when adding things like youtube videos to threads etc.
Thanks! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|