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)
-   -   Integration with vBulletin - Replace search with Google Custom Search (https://vborg.vbsupport.ru/showthread.php?t=229247)

Taurus1 09-25-2010 10:33 PM

Thank you, I already did all that, but the code in the navbar is the problem. I need to know exactly which code to replace with the google code??

Thanks again!

SemperFideles 09-26-2010 09:46 AM

Quote:

Originally Posted by Taurus1 (Post 2103169)
Thank you, I already did all that, but the code in the navbar is the problem. I need to know exactly which code to replace with the google code??

Thanks again!

For future reference, what is replaced in the navbar template is everything between the form tags. For vb 4.0.7, look for this code:

Code:

                <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="" 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="(is_browser('ie') AND !is_browser('ie', 7) AND !is_browser('ie', 8))">gif<vb:else />png</vb:if>" name="submit" onclick="document.getElementById('navbar_search').submit;" tabindex="100"/></span></span>
                </form>

Replace with:
Code:

        <form action="http://www.puritanboard.com/google.php" id="cse-search-box">
    <input type="hidden" name="cx" value="partner-pub-XXXXX:XXXX" />
    <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="" 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>

Replace the partner-pub code with the code you get from setting up your custom search.

Taurus1 09-26-2010 10:36 AM

Man!! Thank you so much works perfectly on the vbulletin default skin.

Only have a problem on my default skin, when you type something into the search box, you cannot see it. Obviously because the font is set to white. Is there something I can do about that?

Thanks again!!

SemperFideles 09-27-2010 05:53 AM

Quote:

Originally Posted by Taurus1 (Post 2103291)
Man!! Thank you so much works perfectly on the vbulletin default skin.

Only have a problem on my default skin, when you type something into the search box, you cannot see it. Obviously because the font is set to white. Is there something I can do about that?

Thanks again!!

Looks like you figured it out. Went to your forum and the search box is black text on white background.

Taurus1 09-27-2010 06:33 AM

Quote:

Originally Posted by SemperFideles (Post 2103586)
Looks like you figured it out. Went to your forum and the search box is black text on white background.

It is working and enabled on the vbulletin default skin, but not on my default, which is a dark skin. There it will also show the watermark normally, but as soon as you type something in the search field, it is white. You cannot see it.

Don't know if there is a way to only change the font color for search box though.

Winter Sonata 09-27-2010 09:56 AM

For some reasons, When I click search, It logged me out and shows results from other sites.

Google watermark is showing up in the navbar - - - 406

what should be the problem ?

SemperFideles 09-27-2010 01:07 PM

I can't duplicate your problem. I assume we're talking about creativex.net/forums.

When I look at the two dark themes, the search box is black and I cannot read the Google Custom Search in either dark theme but when I click on the search box it is a black background with white text. I can read it fine.

There's nothing in this mod that is changing font colors, you'll have to go into the Style Variables for each skin to mess with how that looks if you don't like white text on a black background for your search field.

Taurus1 09-27-2010 01:13 PM

Because I did not do the google integration on those themes. I cannot for the problem I mentioned.

SemperFideles 09-27-2010 01:39 PM

I guess I'm completely lost as to what your question is. If you only implemented it in the Vbulletin Default style then it is working as it should. It shows the Google Custom Search until you click on it and start typing black letters on a white background. It's supposed to do that.

If you integrate it with the other styles then it will work there too. Go look at how it works on my site on my dark themes. There's nothing to change in any of the code. The font colors are not changed by this theme change.

Taurus1 09-27-2010 01:46 PM

Now I am lost also. Because when I implement it on my dark skins, then the moment I type something in the search box, the font is obviously white, and you cannot see what you are typing.

Thanks for all your effort here mate. I really appreciate it. I would even pay you to get this figured out!

EDIT: You have the exact same issue on your BP-Brown skin. Just type something into the search field.


All times are GMT. The time now is 02:48 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.01269 seconds
  • Memory Usage 1,746KB
  • 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
  • (2)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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