vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Mini Mods - Use Google Custom Search In Navbar - Step By Step (https://vborg.vbsupport.ru/showthread.php?t=263440)

zascok 09-08-2012 10:08 PM

nice! thank you.

halilkoca 09-21-2012 07:04 AM

thank you it works on vbulletin 4.2.0.
i haven't got google adsense code but i made it from google webmaster tools. thanks.

sivaganeshk 09-23-2012 05:10 PM

how to manage height in google.php ?
I see large space below.

dougdirac 09-23-2012 06:57 PM

Quote:

Originally Posted by sivaganeshk (Post 2367973)
how to manage height in google.php ?
I see large space below.

This is an excellent question. I have the same problem. The page below is super long with no content. Also, I wish the Google search ads were just down the side. Not or the top and down the side.

sweetpotato 09-29-2012 09:52 PM

Quote:

Originally Posted by dougdirac (Post 2368007)
This is an excellent question. I have the same problem. The page below is super long with no content. Also, I wish the Google search ads were just down the side. Not or the top and down the side.

You must use advanced search features and get the code. But with google search v1 code you cannot create a template, for v2 you cannot config for the search links to open in the same windows.

Spika 02-23-2013 11:36 AM

1 Attachment(s)
Please

Does anyone know why my box goes lower than the others?

My input.box height is 17 px when other I see is 23 px
I don?t find where I can change this (google ads or VB)

Please help.
Attachment 143910

Delfi_r 03-12-2013 09:48 AM

Installed and working fine!

stevectaylor 03-17-2013 05:43 PM

Installed and working great.

One question is the fixed width, can this be changed to liquid?

Lpspider 06-01-2013 06:13 AM

Installed but ever search is showing 404 Google image error on-site...

Edit: didn't see the solution a few posts above, will try that.

Edit: Still getting the error, followed by blank space.

Quote:

400. That’s an error.

Your client has issued a malformed or illegal request. That’s all we know.

fxdigi-cash 06-03-2013 02:45 PM

i believe it is better to go to google custom search service and make your own customized search tool and then grab the html code and place it anywhere you like on your vb...

as easy as that :)

Cheers

dougdirac 06-20-2014 06:01 AM

Recently found that the results page that is generated does not use the additional.css, so certain elements of my theme were broken.

How can I make sure the additional.css is loaded with this?

ramesh_umk3 06-21-2014 11:33 AM

Quote:

<link rel="stylesheet" type="text/css" href="PATH/For/additional.css" />
add to the header and it should load up while page loading

SWSUSA 07-27-2015 06:03 PM

I delete the events, as it negatively affects the speed of loading pages.

Удаляю этот мод, так как он отрицательно влияет на скорость загрузки страниц.

I should add that the site specified by the author mobilephonetalk contains unwanted software and locks the browser Google Chrome.

Добавлю, что сайт указанный автором mobilephonetalk содержит нежелательное ПО и блокируется браузером Google Chrome.

rcull 03-12-2017 03:19 AM

I would have liked to keep the VBForum search box as well as this, but when I have them both, one bumps the other into the lower navigation bar.
4.2.3
Any suggestions?

It probably has to do with editing the "globalsearch" class (width; 180px; ), but I sure can't figure out how to find it:(

Code:

<div id="navbar" class="navbar">
        <ul id="navtabs" class="navtabs floatcontainer<vb:if condition="$show['member'] AND $notifications_total"> notify</vb:if>">
                {vb:raw template_hook.navtab_start}
                {vb:raw navigation}
                {vb:raw template_hook.navtab_end}
        </ul>
        <vb:if condition="$vboptions['enablesearches']">
          <div id="globalsearch" class="globalsearch">
<!-- BEGIN GOOGLE CUSTOM SEARCH -->
<form action="http://www.teambuick.com/forums/google.php" id="cse-search-box">
    <input type="hidden" name="cx" value="partner-pub-5874277334279308:1253965069" />
    <input type="hidden" name="cof" value="FORID:9" />
    <input type="hidden" name="ie" value="ISO-8859-1" />
            <span class="textboxcontainer"><span><input type="text" value="Search Reference" name="q" class="textbox" /></span></span>
            <span class="buttoncontainer"><span><input type="image" class="searchbutton" src="{vb:stylevar imgdir_button}/search.png" name="sa" onclick="document.getElementById('navbar_search').submit;" />  </span></span>
        </form>
<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"></script>
<!-- END GOOGLE CUSTOM SEARCH -->       
        <form action="search.php?{vb:raw session.sessionurl}do=process" method="post" id="navbar_search" class="navbar_search">
                                <vb:comment><input type="hidden" name="s" value="{vb:raw session.sessionurl}" /></vb:comment>
                                <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
                                <input type="hidden" name="do" value="process" />
                                <span class="textboxcontainer"><span><input type="text" value="Search Forums" name="query" class="textbox" tabindex="99"/></span></span>
                                <span class="buttoncontainer"><span><input type="image" class="searchbutton" src="{vb:stylevar imgdir_button}/search<vb:if condition="$stylevar['textdirection'] == 'rtl'">_rtl</vb:if>.<vb:if condition="is_browser('ie') AND !is_browser('ie', 7)">gif<vb:else />png</vb:if>" name="submit" onclick="document.getElementById('navbar_search').submit;" tabindex="100"/></span></span>
                        </form>


MarkFL 03-12-2017 03:58 AM

Look in your "vbulletin-chrome.css" template for that class selector. :)

rcull 03-12-2017 04:07 PM

1 Attachment(s)
Thanks for your help! I found it and played with it, but it must not be what I need:(

In case you or someone else can point me in the right direction, I would like the two searches to line up side by side in the navbar.

I have attached an image how one search box is displacing the second one to the line below it:

Alan_SP 03-12-2017 06:29 PM

What I do is place Google code in navbar (choose your position), leaving vBulletin's search completely intact. In this way I have two search engines with Google one preferred (GCS input form is 100% wide).

rcull 03-13-2017 02:10 AM

Alan,

That sounds like what I am trying to do. I am just having difficulty figuring out how. When I place it in the navbar, it displaces the VB search as shown in the image.

I tried placing it in the navbar_tabs template, but it displaced the last tab to the lower level.

I have seen it done on other sites, but I am not figuring it out. And I have been searching all over. All I find is the same replace default search.

Thanks

final kaoss 03-13-2017 04:55 AM

I tend to use this. It works much better.
https://vborg.vbsupport.ru/showthread.php?t=266520

Alan_SP 03-16-2017 05:04 PM

Quote:

Originally Posted by rcull (Post 2583782)
Alan,

That sounds like what I am trying to do. I am just having difficulty figuring out how. When I place it in the navbar, it displaces the VB search as shown in the image.

Sorry, I wasn't completely clear what I did on my site.

I placed code in navbar template, so it isn't in navbar per se, but it is visible in every page. You can see it here: https://slobodni.net

This way I still have completely working vB search and Google Custom Search available everywhere. I didn't want to change or modify vB search. And also I wanted to "force" users to use GCS as much as it is possible.

Delfi_r 04-29-2017 01:16 PM

Anyone intalled it on a https site?

I don't want the 'you enter in a insecure page' warning just for the search button

Alan_SP 04-30-2017 10:01 AM

Google is almost completely on https. You can remove http before all links in your code, this will call https links (or, if you prefer, specify https links directly)

Delfi_r 05-01-2017 07:11 PM

Quote:

Originally Posted by Alan_SP (Post 2586056)
Google is almost completely on https. You can remove http before all links in your code, this will call https links (or, if you prefer, specify https links directly)

I'll try to remove http, changing to https was not working (the search yields a blank page) Tnaks for your reply

Stratis 05-04-2017 03:02 PM

Quote:

Originally Posted by Delfi_r (Post 2586101)
I'll try to remove http, changing to https was not working (the search yields a blank page) Tnaks for your reply

Do first what other friends say to you. If you do not have luck, read here
https://vborg.vbsupport.ru/showthread.php?t=324908

I had problem after changing to https, before all was ok.
What ever I asked here I could not manage to find why it does not work for me.

So with the above thread you will see how I manage at least to make it work.
Hope it will help a bit to put you in the right path. :)

rcull 07-29-2017 12:43 PM

NO! I just installed this code then I have updated to https and it is not working!:(

Updating to http to https does not solve the problems. I do not want to run it as Stratis' solve fixes it. I want only the original search box in the upper right. It would be nice if this mod would be updated for https as virtually all forums will now need the update.


All times are GMT. The time now is 01:02 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.01468 seconds
  • Memory Usage 1,803KB
  • 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
  • (1)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (25)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