Welcome to Egypt Forums Mark forums read | Egypt Main Page
Egypt Forums
Arabic Movies



Mods for 3.6.x Thread, Google/Adsense Site Search Navbar Integration in Mods; Google/Adsense Site Search Navbar Integration Since the vbadvanced google/adsense integration I came out with a while back I had wanted ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=3741


Reply
LinkBack Thread Tools Display Modes
Google/Adsense Site Search Navbar Integration
 
 
The God Father
Developer's Avatar

Reply With Quote
 
Join Date: Jul 2008
Location: NDC
Posts: 5,425
23-09-2008, 01:07 AM
 
Google/Adsense Site Search Navbar Integration

Since the vbadvanced google/adsense integration I came out with a while back I had wanted to think of a way to do this to the navbar, but I didn't really care for the old navbar's search - until the 3.6 version came out. I like this new version and I've now decided to come write my own based on what I did with my original for vbadvanced.

It's fairly simple...

Go to your admincp => Styles & Templates => Style Manager => look for your style to do this to and under All Style Options click Edit Templates

In your navigation bar, find

Code:
PHP Code:
<!-- header quick search form -->
    <
div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
        <
table cellpadding="4" cellspacing="1" border="0">
        <
tr>
            <
td class="thead">$vbphrase[search_forums]</td>
        </
tr>
        <
tr>
            <
td class="vbmenu_option" title="nohilite">
                <
form action="search.php?do=process" method="post">
                    <
input type="hidden" name="do" value="process" />
                    <
input type="hidden" name="quicksearch" value="1" />
                    <
input type="hidden" name="childforums" value="1" />
                    <
input type="hidden" name="exactname" 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>
                    <
div style="margin-top:$stylevar[cellpadding]px">
                        <
label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label>
                        &
nbsp;
                        <
label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label>
                    </
div>                    
                </
form>
            </
td>
        </
tr>
        <
tr>
            <
td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
        </
tr>
        
$template_hook[navbar_search_menu]
        </
table>
    </
div>
    <!-- /
header quick search form -->
and replace with

Code:
PHP Code:
<!-- header quick search form -->
    <
div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
        <
table cellpadding="4" cellspacing="1" border="0">
        <
tr>
            <
td class="thead">$vbphrase[search_forums]</td>
        </
tr>
        <
tr>
            <
td class="vbmenu_option" title="nohilite">
                <
form action="search.php?do=process" method="post">
                    <
input type="hidden" name="do" value="process" />
                    <
input type="hidden" name="quicksearch" value="1" />
                    <
input type="hidden" name="childforums" value="1" />
                    <
input type="hidden" name="exactname" 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>
                    <
div style="margin-top:$stylevar[cellpadding]px">
                        <
label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label>
                        &
nbsp;
                        <
label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label>
                    </
div>                    
                </
form>
            </
td>
        </
tr>
        <
tr>
            <
td class="vbmenu_option"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
        </
tr>
        <
tr>
            <
form action="http://www.google.com/custom" type="hidden" method=GET name="search"><td class="thead">Search Site / Google</td>
        </
tr>
        <
tr>
            <
td class="vbmenu_option" title="nohilite">
                    <
input type="hidden" name="client" value="pub-0252500186462625">
                    <
input type="hidden" name="forid" value="1">
                    <
input type="hidden" name="ie" value="ISO-8859-1">
                    <
input type="hidden" name="oe" value="ISO-8859-1">
                    <
input name="cof" type="hidden" value="GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:250;L:http://www.christianboards.org/images/logo.gif;S:http://;FORID:1">
                    <
input name="domains" type="hidden" value="www.yoursite.com">
                    <
input type="hidden" name="hl" value="en">
                    <
input type="text" class="bginput" name="q" size="25" maxlength="255" />$gobutton<br />
                    <
input name="sitesearch" type="radio" value="www.christianboards.org" checked> Christianboards.org<br />
                    <
input name="sitesearch" type="radio" value=""><a href="http://www.google.com/search"><img src="http://www.google.com/logos/Logo_25wht.gif" border="0" alt="Google" align="middle"></A>
                    </
td></form>
            </
tr>
        
$template_hook[navbar_search_menu]
        </
table>
    </
div>
    <!-- /
header quick search form -->
Replace pub-1234567890123456 with your pub- number
In the line <input name="cof" type="hidden" value="GALT:">, Replace value="GALT:" with your information (this contains information that controls how your search results are displayed - this won't necessarily start with GALTEgypt.Com EnForum.
Replace www.yoursite.com with your website in both places
Replace Yoursite.com with your website

I have updated this for 3.6.7 - there is a small change, but enough for an update.
There is a hook as well, $template_hook[navbar_search_menu], which I have a product that you can just install, but for some reason ibproarcade is conflicting with this new product.
Attached Images
File Type: gif screenshot.gif (9.7 KB, 1 views)
Attached Files
File Type: txt readme367.txt (4.7 KB, 0 views)
File Type: txt readme.txt (4.9 KB, 0 views)
__________________
I Love Walking In The Rain Cuz Nobody Know I'm Crying !!
 
 
 
Reply

Mods for 3.6.x Thread, Google/Adsense Site Search Navbar Integration in Mods; Google/Adsense Site Search Navbar Integration Since the vbadvanced google/adsense integration I came out with a while back I had wanted ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=3741


Bookmarks

Tags
google or adsense, integration, navbar, search, site


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
vB Google Adsense for Search plus Integration Developer Mods for 3.7.x 1 25-01-2009 10:11 PM
vBulletin Google Adsense Deep Integration Tutorial Developer Articles 0 08-10-2008 01:56 PM
View Your Posts/Threads from Navbar Search Developer Mods for 3.7.x 0 25-09-2008 03:05 PM
How to Create a Google Site Map Developer Search Engine Optimization (SEO) 0 11-09-2008 07:20 AM
Project Tools Remove Navbar Link & Search Developer Articles 0 10-09-2008 06:16 AM