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)

Brandon Sheley 06-03-2010 02:37 AM

Is there another google search mod for the latest vB?

Preech 06-03-2010 08:34 AM

I've been using it. I have had no problem.

Merih 06-18-2010 11:23 AM

4.0.4 isnt becoming :(

rockabilly 06-20-2010 11:57 PM

I am using 4.04 and I followed SemperFideles instructions very carefully.
When I do a site search, it displays a the search page and I can see the google adsense on the top and to the right, but it does not display any of the search results.

The page says:

" Your search - autos - did not match any documents.
Suggestions:
Make sure all words are spelled correctly.
Try different keywords.
Try more general keywords."

It seems that I am almost there, but I can't get any results to come up. Does anybody have any ideas? Thanks in advance!

SemperFideles 06-21-2010 12:48 AM

Quote:

Originally Posted by Veer (Post 2045188)
Please update for vb 4.0.3

Quote:

Originally Posted by Loco.M (Post 2047412)
Is there another google search mod for the latest vB?


Search Mod is the same for 4.0.3 and 4.0.4. When you upgrade you have to replace the form code in the navbar template. The form code is really "version agnostic". The only thing that might change in the future is the format for creating a custom page but, for now, it's working fine.

lubbie 06-21-2010 03:35 PM

Just an idea, but i would like to have 2 checkboxes above or below the searchbox where u can select the search at google or in forum. Is that also possible?

rockabilly 06-21-2010 04:51 PM

As a follow up to my previous post, the google search mod works if I specify another URL of a totally different website of mine when I set up the google adsense code.
But when I revert back to my site's URL, it won't search my site.
My site is new and it is not yet indexed in google. Could this be the reason why google won't find search results for my site, because it is not indexed by google? I just submitted my sitemap to google in hopes that this mod will work when google indexes my site.

Thank you.....

Quote:

Originally Posted by SemperFideles (Post 2056710)
Search Mod is the same for 4.0.3 and 4.0.4. When you upgrade you have to replace the form code in the navbar template. The form code is really "version agnostic". The only thing that might change in the future is the format for creating a custom page but, for now, it's working fine.


SemperFideles 06-21-2010 07:30 PM

Quote:

Originally Posted by rockabilly (Post 2057012)
As a follow up to my previous post, the google search mod works if I specify another URL of a totally different website of mine when I set up the google adsense code.
But when I revert back to my site's URL, it won't search my site.
My site is new and it is not yet indexed in google. Could this be the reason why google won't find search results for my site, because it is not indexed by google? I just submitted my sitemap to google in hopes that this mod will work when google indexes my site.

Thank you.....

That makes sense. Search results are *only* what Google has indexed. This is a "drawback" on one level that it's not going to index private fora or pages that have not yet been indexed. The advantage is that it tends to give more relevant results as the built in search engine for vBulletin is relatively crude in comparison to the $Billions Google invests in search engine research.

SemperFideles 06-21-2010 07:34 PM

Quote:

Originally Posted by lubbie (Post 2056980)
Just an idea, but i would like to have 2 checkboxes above or below the searchbox where u can select the search at google or in forum. Is that also possible?

Yes, it is possible. The mod to the navbar template falls between two form tags. You could add selection criteria to determine whether google.com or your site are searched when the user hits the search button. The problem you'll experience with this is trying to implement this in a way where it doesn't make your navbar get "fatter" unless you don't care about that. I don't have the time to tweak the form code to do this but you can find the form tags you could choose for your form by doing a search on Google and playing around with it.

hany_c_v 08-01-2010 06:57 AM

very nice ,

i did it here

www.mngol.com

RichieBoy67 08-02-2010 11:13 PM

1 Attachment(s)
Never mind--I figured this out and fixed it..Thanks

another issue though--is there any way to get some padding? I know this is a google issue but it there a work around?

It is the left side that is just crammed right up to the edge...

Thanks

max2008 08-03-2010 12:34 PM

Installed , VB 4.0.4

thank you so much ..!

CEO254 08-09-2010 08:32 PM

I have everything working properly but I am having trouble with the Search Box

Whenever I type in text, it isn't visible in the box. I know its there because I highlight it and I can see it.

I think it may be because my default text on my site is white.

Is there any way I can change the text color just for the search box?

schlottkej 08-17-2010 09:00 AM

For some reason when I run the search from the main page it takes me to the results page and offers nothing but if I search again on the search page the results come up.

Both URLs are the exact same am I getting a script conflict or what?

mohammad6006 09-05-2010 03:27 PM

i dont have google adsense and credit card

what can i do?

Winter Sonata 09-15-2010 04:27 PM

Does anyone have this working with 406 version, It doesnt work with me and I gt this message

Warning: require_once(./global.php) [function.require-once]: failed to open stream: No such file or directory in /home/lan/public_html/domain name/google.php on line 29

Fatal error: require_once() [function.require]: Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/lan/public_html/domain name/google.php on line 29

SemperFideles 09-15-2010 05:03 PM

Works fine with 4.0.6 (and 4.0.7).

Your error looks like you put the wrong path in your template.

salvador21 09-17-2010 07:08 AM

Looks like a great mod, but I can't find most of those code lines in the navbar template (v 4.0.7)

EDIT:

Also my Google code doesn't have these lines:

Code:

<input type="hidden" name="cx" value="partner-pub-xxxxxxxxxxxxxxxxxxxxxxx" />
    <input type="hidden" name="cof" value="FORID:10" />
    <input type="hidden" name="ie" value="ISO-8859-1" />

It is like this:

Code:

<div id="cse" style="width: 100%;">Loading</div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
  google.load('search', '1', {language : 'en'});
  google.setOnLoadCallback(function() {
    var customSearchControl = new google.search.CustomSearchControl('xxxxxxxxxxxxxxxxxxxxxxxxxx');
    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
    customSearchControl.draw('cse');
  }, true);
</script>
<link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />


Taurus1 09-25-2010 03:08 PM

Same here! Please can you update this for 4.0.7

The code lines you give to find are no longer in there.

Thanks!

SemperFideles 09-25-2010 07:49 PM

Gents,

Look at post #36: https://vborg.vbsupport.ru/showpost....5&postcount=36

It can't be explained any more simply.

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.

SemperFideles 09-27-2010 02:09 PM

OK, hold on, I was just able to duplicate the problem on a dark skin. Am in Hawaii on business but will try to tackle this later today.

Taurus1 09-27-2010 02:15 PM

OK great! Thanks!

SemperFideles 09-28-2010 04:55 AM

OK, I think I found it. This is a change to a CSS template and I can't guarantee this won't make other areas look differently than they did.

1. Go to Style Manager.
2. Select the Style
3. Select Edit Templates
4. Under CSS templates edit the additional.css template
5. Search for:
Code:

.textbox, textarea, select {
6. First, copy and paste the back-ground color and color values into a text file so you can undo them later if you don't like the way it looks.
7. Set the following values under the ".textbox, textarea, select {" line as follows:

background-color: #fff;
color: #000;


Save and reload. It should fix the problem.

Taurus1 09-28-2010 06:32 AM

Thank you so much mate! That did it. I just changed the background color to a light gray, because it changes some other fields to white also. But that is something small. It works, and brings money in. That is important.

Thanks again for all your trouble and effort.

Taurus1 10-08-2010 12:11 PM

Man, o man! Would you perhaps be willing to help me to get this to work on my latest skin I purchased? It works on all my other skins, but this new one is a nightmare. The search box is bigger, and it uses a button also.
Also my GOOGLE page (Template you gave) is completely messed up in this skin.

Please help.

EconomicVoice 10-16-2010 01:07 PM

If you are happy for the Google search to open in a new window a simpler way which I use can be found using my adaptation of Golzarion's solution at reply #24.

FReeSTER 10-26-2010 11:45 AM

I need some help on the edits since my custom template for vb 4.3 is different from the edits I need to make.

Code:

<div id="navbar" class="navbar">
<div class="navLeft"><div class="navRight">
        <ul id="navtabs" class="navtabs floatcontainer<vb:if condition="$show['member'] AND $notifications_total"> notify</vb:if>">
                {vb:raw template_hook.navtab_start}
                <vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search'">
                        <li class="selected"><a class="navtab" href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}">{vb:rawphrase forum}</a>
                                <ul class="floatcontainer">
                                        {vb:raw template_hook.navbar_start}
                                        <vb:if condition="$show['searchbuttons']">
                                                <vb:if condition="$show['member']">
                                                <li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_Post">{vb:rawphrase new_posts_nav}</a></li>
                                                <vb:else />
                                                <li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_Post">{vb:rawphrase todays_posts}</a></li>
                                                </vb:if>
                                        </vb:if>
                                        {vb:raw template_hook.navbar_after_getnew}
                                        <vb:if condition="$show['pmmainlink']">
                                                <li><a href="private.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase private_messages}</a></li>
                                        </vb:if>
                                        {vb:raw template_hook.navbar_after_pm}
                                        <li><a rel="help" href="faq.php{vb:raw session.sessionurl_q}" accesskey="5">{vb:rawphrase faq}</a></li>
                                        {vb:raw template_hook.navbar_after_faq}
                                        <li><a href="calendar.php{vb:raw session.sessionurl_q}">{vb:rawphrase calendar}</a></li>
                                        {vb:raw template_hook.navbar_after_calendar}

                                        <vb:if condition="$show['communitylink']">
                                        <li class="popupmenu">
                                                <a href="javascript://" class="popupctrl" accesskey="6">{vb:rawphrase community}</a>
                                                <ul class="popupbody popuphover">
                                                        {vb:raw template_hook.navbar_community_menu_start}
                                                        <vb:if condition="$show['quick_links_groups']">
                                                                <li><a href="group.php{vb:raw session.sessionurl_q}">{vb:rawphrase social_groups}</a></li>
                                                        </vb:if>
                                                        <vb:if condition="$show['quick_links_albums']">
                                                                <li><a href="album.php{vb:raw session.sessionurl_q}">{vb:rawphrase pictures_and_albums}</a></li>
                                                        </vb:if>
                                                        <vb:if condition="$bbuserinfo['userid']">
                                                                <li><a href="profile.php?{vb:raw session.sessionurl}do=buddylist"><vb:if condition="$show['friends_and_contacts']">{vb:rawphrase contacts_and_friends}<vb:else />{vb:rawphrase contacts}</vb:if></a></li>
                                                        </vb:if>
                                                        <vb:if condition="$show['memberslist']">
                                                                <li><a href="memberlist.php{vb:raw session.sessionurl_q}">{vb:rawphrase members_list}</a></li>
                                                        </vb:if>
                                                        {vb:raw template_hook.navbar_community_menu_end}
                                                </ul>
                                        </li>
                                        </vb:if>
                                        {vb:raw template_hook.navbar_after_community}
                                        <li class="popupmenu">
                                                <a href="javascript://" class="popupctrl">{vb:rawphrase forum_actions}</a>
                                                <ul class="popupbody popuphover">
                                                        <li>
                                                                <a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread&amp;markreadhash={vb:raw bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a>
                                                        </li>
                                                        <vb:if condition="$show['member']">
                                                        <li>
                                                                <a href="profile.php?{vb:raw session.sessionurl}do=editoptions">{vb:rawphrase edit_options}</a>
                                                        </li>
                                                        <li>
                                                                <a href="profile.php?{vb:raw session.sessionurl}do=editprofile">{vb:rawphrase edit_your_details}</a>
                                                        </li>
                                                        </vb:if>
                                                </ul>
                                        </li>
                                        <li class="popupmenu">
                                                <a href="javascript://" class="popupctrl" accesskey="3">{vb:rawphrase quick_links}</a>
                                                <ul class="popupbody popuphover">
                                                        <vb:if condition="$show['member']">
                                                        <vb:if condition="$show['member']">






<li><a href="search.php?do=getdaily&contenttype=vBForum_Post">{vb:rawphrase todays_posts}</a></li>




                                                                <li><a href="subscription.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase subscribed_threads}</a></li>
                                                        </vb:if>
                                                        <li>
                                                                <a href="javascript://" onclick="window.open(getBaseUrl() + 'misc.php?{vb:raw session.sessionurl}do=buddylist&amp;focus=1','buddylist','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=250,height=300'); return false;">{vb:rawphrase open_contacts}</a>
                                                        </li>
                                                        </vb:if>
                                                        <vb:if condition="$vboptions['forumleaders']">
                                                        <li><a href="showgroups.php{vb:raw session.sessionurl_q}" rel="nofollow">
                <vb:if condition="$vb_suite_installed">
                        {vb:rawphrase view_site_leaders}
                <vb:else />
                        {vb:rawphrase view_forum_leaders}
                </vb:if>
        </a></li>
                                                        </vb:if>
                                                        {vb:raw template_hook.navbar_quick_links_menu_pos1}
                                                        {vb:raw template_hook.navbar_quick_links_menu_pos2}
                                                        {vb:raw template_hook.navbar_quick_links_menu_pos3}
                                                        <vb:if condition="$show['wollink']">
                                                                <li><a href="online.php{vb:raw session.sessionurl_q}">{vb:rawphrase whos_online}</a></li>
                                                        </vb:if>
                                                        {vb:raw template_hook.navbar_quick_links_menu_pos4}
                                                </ul>
                                        </li>
                                        {vb:raw template_hook.navbar_end}
                                </ul>

                        </li>
                <vb:elseif condition="$vboptions['selectednavtab']=='usercp'" />
                        <li class="selected"><a class="navtab" href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}">{vb:rawphrase forum}</a>
                                <ul class="floatcontainer">
                                        {vb:raw template_hook.navbar_start}
                                        <vb:if condition="$show['searchbuttons']">
                                                <vb:if condition="$show['member']">
                                                <li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_Post">{vb:rawphrase new_posts_nav}</a></li>
                                                <vb:else />
                                                <li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_Post">{vb:rawphrase todays_posts}</a></li>
                                                </vb:if>
                                        </vb:if>
                                        {vb:raw template_hook.navbar_after_getnew}
                                        <vb:if condition="$show['pmmainlink']">
                                                <li><a href="private.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase private_messages}</a></li>
                                        </vb:if>
                                        {vb:raw template_hook.navbar_after_pm}
                                        <li><a rel="help" href="faq.php{vb:raw session.sessionurl_q}" accesskey="5">{vb:rawphrase faq}</a></li>
                                        {vb:raw template_hook.navbar_after_faq}
                                        <li><a href="calendar.php{vb:raw session.sessionurl_q}">{vb:rawphrase calendar}</a></li>
                                        {vb:raw template_hook.navbar_after_calendar}
                                        <li class="popupmenu">
                                                <a href="javascript://" class="popupctrl">{vb:rawphrase community}</a>
                                                <ul class="popupbody popuphover">
                                                        {vb:raw template_hook.navbar_community_menu_start}
                                                        <vb:if condition="$show['quick_links_groups']">
                                                                <li><a href="group.php{vb:raw session.sessionurl_q}">{vb:rawphrase social_groups}</a></li>
                                                        </vb:if>
                                                        <vb:if condition="$show['quick_links_albums']">
                                                                <li><a href="album.php{vb:raw session.sessionurl_q}">{vb:rawphrase pictures_and_albums}</a></li>
                                                        </vb:if>
                                                        <vb:if condition="$bbuserinfo['userid']">
                                                                <li><a href="profile.php?{vb:raw session.sessionurl}do=buddylist"><vb:if condition="$show['friends_and_contacts']">{vb:rawphrase contacts_and_friends}<vb:else />{vb:rawphrase contacts}</vb:if></a></li>
                                                        </vb:if>
                                                        <vb:if condition="$show['memberslist']">
                                                                <li><a href="memberlist.php{vb:raw session.sessionurl_q}">{vb:rawphrase members_list}</a></li>
                                                        </vb:if>
                                                        {vb:raw template_hook.navbar_community_menu_end}
                                                </ul>
                                        </li>
                                        {vb:raw template_hook.navbar_after_community}
                                        <li class="popupmenu">
                                                <a href="javascript://" class="popupctrl">{vb:rawphrase forum_actions}</a>
                                                <ul class="popupbody popuphover">
                                                        <li>
                                                                <a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread&amp;markreadhash={vb:raw bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a>
                                                        </li>
                                                        <vb:if condition="$show['member']">
                                                        <li>
                                                                <a href="profile.php?{vb:raw session.sessionurl}do=editoptions">{vb:rawphrase edit_options}</a>
                                                        </li>
                                                        <li>
                                                                <a href="profile.php?{vb:raw session.sessionurl}do=editprofile">{vb:rawphrase edit_your_details}</a>
                                                        </li>
                                                        </vb:if>
                                                </ul>
                                        </li>
                                        <li class="popupmenu">
                                                <a href="javascript://" class="popupctrl">{vb:rawphrase quick_links}</a>
                                                <ul class="popupbody popuphover">
                                                        <li><a href="subscription.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase subscribed_threads}</a></li>
                                                        <li>
                                                                <a href="javascript://" onclick="window.open(getBaseUrl() + 'misc.php?{vb:raw session.sessionurl}do=buddylist&amp;focus=1','buddylist','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=250,height=300'); return false;">{vb:rawphrase open_contacts}</a>
                                                        </li>
                                                        <vb:if condition="$vboptions['forumleaders']">
                                                        <li>
                                                                <a href="showgroups.php{vb:raw session.sessionurl_q}" rel="nofollow">
                <vb:if condition="$vb_suite_installed">
                        {vb:rawphrase view_site_leaders}
                <vb:else />
                        {vb:rawphrase view_forum_leaders}
                </vb:if>
        </a>
                                                        </li>
                                                        </vb:if>
                                                        {vb:raw template_hook.navbar_quick_links_menu_pos1}
                                                        {vb:raw template_hook.navbar_quick_links_menu_pos2}

                                                        {vb:raw template_hook.navbar_quick_links_menu_pos3}

                                                        <vb:if condition="$show['wollink']">
                                                                <li><a href="online.php{vb:raw session.sessionurl_q}">{vb:rawphrase whos_online}</a></li>
                                                        </vb:if>
                                                        {vb:raw template_hook.navbar_quick_links_menu_pos4}
                                                </ul>
                                        </li>
                                        {vb:raw template_hook.navbar_end}
                                </ul>
                        </li>
                <vb:else />
                        <li><a class="navtab" href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}">{vb:rawphrase forum}</a></li>
                </vb:if>
                {vb:raw template_hook.navtab_middle}
                <vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT == 'search'">
                        <vb:if condition="$show['member']">
                        <li  class="selected"><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_Post" accesskey="2">{vb:rawphrase getnew_tab}</a>
                                <ul class="floatcontainer">
                                        <li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_Post">{vb:rawphrase new_posts_nav}</a></li>
                                        <li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_SocialGroupMessage">{vb:rawphrase new_group_messages_nav}</a></li>
                                        <li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_Event">{vb:rawphrase new_events_nav}</a></li>
                                        {vb:raw template_hook.navbar_getnew_menu}
                                        <li><a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread&amp;markreadhash={vb:raw bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a></li>
                                </ul>
                        </li>
                        <vb:else />
                        <li  class="selected"><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_Post" accesskey="2">{vb:rawphrase getnew_tab}</a>
                                <ul class="floatcontainer">
                                        <li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_Post">{vb:rawphrase todays_posts}</a></li>
                                        <li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_SocialGroupMessage">{vb:rawphrase daily_group_message}</a></li>
                                        <li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_Event">{vb:rawphrase daily_events}</a></li>
                                        {vb:raw template_hook.navbar_getdaily_menu}
                                        <li><a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread&amp;markreadhash={vb:raw bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a></li>
                                </ul>
                        </li>
                        </vb:if>
                <vb:elseif condition="$show['member']" />
                        <li><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_Post" accesskey="2">{vb:rawphrase getnew_tab}</a></li>
                <vb:else />
                        <li><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_Post" accesskey="2">{vb:rawphrase getnew_tab}</a></li>
                </vb:if>
                {vb:raw template_hook.navtab_end}
        </ul>

        <vb:if condition="$vboptions['enablesearches']">
        <div id="searchBox" class="searchBox">
                <form action="search.php?do=process" method="post">
                        <input type="hidden" name="s" value="{vb:raw session.sessionurl}" />
                        <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
                        <input type="hidden" name="do" value="process" />
                        <span class="searchBox_container"><input type="text" value="" class="textbox" name="query" tabindex="99"/></span>
                        <span class="searchBox_button"><input type="image" src="images/styles/BlueDemon/buttons/search.png" name="submit" onclick="document.getElementById('navbar_search').submit;" tabindex="100"/></span>
                </form>
                <ul class="searchBox_advanced_search">
                        <li><a href="search.php{vb:raw session.sessionurl_q}" accesskey="4">{vb:rawphrase advanced_search}</a></li>
                </ul>
        </div>
        </vb:if>
</div></div>
</div>
<div id="header" class="floatcontainer doc_header"><div class="headerWrap">
        {vb:raw ad_location.ad_header_logo}
        <div><a name="top" href="{vb:raw vboptions.forumhome}.php{vb:raw session.sessionurl_q}" id="logo"><img src="{vb:stylevar titleimage}" alt="{vb:rawphrase x_powered_by_vbulletin, {vb:raw vboptions.bbtitle}}" /></a></div>
        <div class="bannerBox">





<script type="text/javascript"><!--
google_ad_client = "pub-2906218701361472";
/* 468x60, created 10/26/10 */
google_ad_slot = "4662250360";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>







<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
        </div>
        {vb:raw ad_location.ad_header_end}
</div></div>
</div><!-- closing div for above_body -->

                <div id="contentMain">
                        <div id="contentBox">
                                <div class="contentBoxLeft"><div class="contentBoxRight">

<div class="body_wrapper">
<div id="breadcrumb" class="breadcrumb">
<div class="bcLeft"><div class="bcRight">
        <ul class="floatcontainer">
                <li class="navbithome"><a href="index.php{vb:raw session.sessionurl_q}" accesskey="1"><img src="{vb:stylevar imgdir_misc}/navbit-home.png" alt="{vb:rawphrase home}" /></a></li>

                {vb:raw navbits.breadcrumb}
                {vb:raw navbits.lastelement}
        </ul>
        <hr />
</div></div>
</div>

{vb:raw ad_location.ad_navbar_below}
{vb:raw ad_location.global_below_navbar}

<vb:if condition="$show['notices']">
        <form action="profile.php?do=dismissnotice" method="post" id="notices" class="notices">
                <input type="hidden" name="do" value="dismissnotice" />
                <input type="hidden" name="s" value="{vb:raw session.sessionurl}" />
                <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
                <input type="hidden" id="dismiss_notice_hidden" name="dismiss_noticeid" value="" />
                <input type="hidden" name="url" value="{vb:raw return_link}" />
                <ol>
                        {vb:raw notices}
                </ol>
        </form>
</vb:if>

Any help making the edits I will appreciate.

Thanks,

SemperFideles 10-26-2010 12:13 PM

I think this should work (replace siteurl.com with yours, make sure you made a google.php file, and use your google code as opposed the the X's):

Replace
Code:

        <form action="search.php?do=process" method="post">
            <input type="hidden" name="s" value="{vb:raw session.sessionurl}" />
            <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
            <input type="hidden" name="do" value="process" />
            <span class="searchBox_container"><input type="text" value="" class="textbox" name="query" tabindex="99"/></span>
            <span class="searchBox_button"><input type="image" src="images/styles/BlueDemon/buttons/search.png" name="submit" onclick="document.getElementById('navbar_search').submit;" tabindex="100"/></span>
        </form>

With
Code:

<form action="http://www.siteurl.com/google.php" id="cse-search-box">
    <input type="hidden" name="cx" value="partner-pub-xxxxxxxxxxx:xxxxxx-xxxx" />
    <input type="hidden" name="cof" value="FORID:9" />
    <input type="hidden" name="ie" value="ISO-8859-1" />
            <span class="searchBox_container"><input type="text" value="" class="textbox" name="q" tabindex="99"/></span>
            <span class="searchBox_button"><input type="image" src="images/styles/BlueDemon/buttons/search.png" name="submit" onclick="document.getElementById('navbar_search').submit;" tabindex="100"/></span>
        </form>
<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"></script>


lycheepassion 12-13-2010 07:11 PM

Is there a demo or better screenshot? Thanks!

Inferno Dragon 12-24-2010 04:45 PM

I have added this modification on my members request and it's working fine however it's not displaying any search result..I always gets:

Quote:


Your search - free - did not match any documents.

Suggestions:

* Make sure all words are spelled correctly.
* Try different keywords.
* Try more general keywords.
I tried many keywords but it's not working :S

my search site URL in google adsense is: www.pakgamers.com/forums
and search results page URL is: http://www.pakgamers.com/forums/google.php


All times are GMT. The time now is 03: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.01682 seconds
  • Memory Usage 2,002KB
  • 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
  • (8)bbcode_code_printable
  • (9)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
  • (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