Back to vBulletin 4.x Template Modifications

Language & Styles Selectors + Google Custom Search In Navbar
Mod Version: 1.00, by horussjr

vB Version: 4.0.8 Rating: (1 vote - 5.00 average) Installs: 8
Released: 28 Nov 2010 Last Update: Never Downloads: 0
Not Supported Uses Plugins Template Edits Re-usable Code Translations  

Hello everybody! I want to present you my first mod for vbulletin, something that i was expecting to appear but it didn't happened like this. So, presenting my first mod,

Language & Styles Selectors In Navbar + Google Custom Search
Description: Duplicate Language & Styles Selectors in Navbar so you and your users can change them quicker! Also Google Custom Search! So it would appear like this
&stc=1&d=1290950338
BUT ALSO REMAINS HERE!!
&stc=1&d=1290950338

Installing:
STEP 1
Go to AdminCP --> Plugins & Products --> Plugin Manager --> Go to the bottom of the page and click [Add New Plugin] --> Complete the fields:
Product: LET AS DEFAULT
Hook Location: parse_templates
Title: Language & Styles Selectors In Navbar
Execution Order: LET AS DEFAULT
Plugin PHP Code:
PHP Code:
vB_Template::preRegister('navbar',array( 
'languagechooserbits' => $languagechooserbits
));  
vB_Template::preRegister('navbar',array( 
'quickchooserbits' => $quickchooserbits
)); 
Plugin is Active: Yes --> Save

STEP 2
In this step you will install both language and style mod and google custom search!!
Go to AdminCP --> Styles & Templates --> Search in Templates --> search for navbar (select your desired style to implement this mod and set yes to search titles only) --> double click the navbar template an look for:
PHP Code:
</div><!-- closing div for above_body --> 
Between that and <div class="body_wrapper"> add:
PHP Code:
<table width="100%">
<
tr><td align="left" width="50%">
    <
form action="{vb:raw vboptions.forumhome}.php" method="get" id="footer_select" class="footer_select">
    
        <
vb:if condition="$show['quickchooser']">
            <
select name="styleid" onchange="switch_id(this, 'style')">
                <
optgroup label="{vb:rawphrase quick_style_chooser}">
                    {
vb:raw quickchooserbits}
                </
optgroup>
            </
select>    
        </
vb:if>
        
        <
vb:if condition="$show['languagechooser']">
            <
select name="langid" onchange="switch_id(this, 'lang')">
                <
optgroup label="{vb:rawphrase quick_language_chooser}">
                    {
vb:raw languagechooserbits}
                </
optgroup>
            </
select>
        </
vb:if>
</
form>

</
td><td align="right" width="50%">
<
form action="http://www.google.ro/cse" id="cse-search-box">
  <
div>
    <
input type="hidden" name="cx" value="partner-pub-XXXXXXXXXXXXXXXXXXXXXXXX" />
    <
input type="hidden" name="ie" value="UTF-8" />
    <
input type="text" name="q" size="25" />
    <
input type="submit" name="sa" value="Search" />
  </
div>
</
form>

<
script type="text/javascript" src="http://www.google.ro/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>
</
td></tr></table
XXXXXXXXXXXXX must be replaced with your own google account numbers
For more information go to http://wWw.StormZone.Ro and PM user Lloyd or pm me here

Working on 4.0.8. Not tested on any other version. Please install and tell me

ENJOY!!

IF YOU WANT ONLY LANGUAGE AND THEME WITHOUT THE GOOGLE SEARCH BAR
At step 2 instead of that code add this
PHP Code:
<table width="100%">
<
tr><td align="left" width="50%">
    <
form action="{vb:raw vboptions.forumhome}.php" method="get" id="footer_select" class="footer_select">
    
        <
vb:if condition="$show['quickchooser']">
            <
select name="styleid" onchange="switch_id(this, 'style')">
                <
optgroup label="{vb:rawphrase quick_style_chooser}">
                    {
vb:raw quickchooserbits}
                </
optgroup>
            </
select>    
        </
vb:if>
        
        <
vb:if condition="$show['languagechooser']">
            <
select name="langid" onchange="switch_id(this, 'lang')">
                <
optgroup label="{vb:rawphrase quick_language_chooser}">
                    {
vb:raw languagechooserbits}
                </
optgroup>
            </
select>
        </
vb:if>
</
form>

</
td></tr>
</
table

Download

No files for download.

Screenshots

Click image for larger version
Name:	language.jpg
Views:	640
Size:	122.1 KB
ID:	123964   Click image for larger version
Name:	language2.jpg
Views:	444
Size:	21.7 KB
ID:	123965  

Similar Mods

Miscellaneous Hacks Non-Adsense Google site & web search for your navbar! vBulletin 3.8 Template Modifications

vblts.ru supports vBulletin®, 2022-2024