Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

Reply
 
Thread Tools
Language & Styles Selectors + Google Custom Search In Navbar Details »»
Language & Styles Selectors + Google Custom Search In Navbar
Version: 1.00, by horussjr horussjr is offline
Developer Last Online: Oct 2013 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 4.0.8 Rating:
Released: 11-27-2010 Last Update: Never Installs: 8
Uses Plugins Template Edits
Re-useable Code Translations  
No support by the author.

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
https://vborg.vbsupport.ru/attachmen...1&d=1290950338
BUT ALSO REMAINS HERE!!
https://vborg.vbsupport.ru/attachmen...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 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

Screenshots

File Type: jpg language.jpg (122.1 KB, 0 views)
File Type: jpg language2.jpg (21.7 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
bp323

Comments
  #2  
Old 11-29-2010, 02:49 AM
Dr.osamA's Avatar
Dr.osamA Dr.osamA is offline
 
Join Date: Aug 2004
Location: Syrie
Posts: 979
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installd + 5 stars
thank you

keep it up bro
Reply With Quote
  #3  
Old 11-29-2010, 12:09 PM
Winter Sonata Winter Sonata is offline
 
Join Date: Apr 2010
Posts: 232
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello, could you please tell me how to show only the Google custom search in that place you chosen ?

Thanks
Reply With Quote
  #4  
Old 11-29-2010, 04:57 PM
horussjr horussjr is offline
 
Join Date: Feb 2010
Location: Romania
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

give me a link to your site to see it working and the make an image obout the problem
Reply With Quote
  #5  
Old 11-29-2010, 05:05 PM
Winter Sonata Winter Sonata is offline
 
Join Date: Apr 2010
Posts: 232
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello, there is no problem at all , I just need to show up only the search bar at the same place in your screen shot , so could you please give me the code for the Google custom search ?

Thank you for you kind support~!
Reply With Quote
  #6  
Old 11-29-2010, 05:44 PM
horussjr horussjr is offline
 
Join Date: Feb 2010
Location: Romania
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

try with a div code like this
PHP Code:
<div align="right">
<
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>
</
div
also you can try with span like this
PHP Code:
<span align="right">
<
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>
</
span
Reply With Quote
  #7  
Old 12-03-2010, 04:07 AM
my123world's Avatar
my123world my123world is offline
 
Join Date: Aug 2010
Location: -| Heart of vB |-
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please Can Anyone Tell Me Where Is That Mod For Switching Tabs Like Shown In The ScreenShot..?
Reply With Quote
  #8  
Old 12-03-2010, 11:25 AM
horussjr horussjr is offline
 
Join Date: Feb 2010
Location: Romania
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what tab switching man? please, be more precise or download one of my images and mark with paint the zone and reply. maybe i can help you.

PS: if you are talking about language and theme, this is the mod
Reply With Quote
  #9  
Old 12-03-2010, 01:49 PM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by horussjr View Post
try with a div code like this
PHP Code:
<div align="right">
<
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>
</
div
Thanks horussjr ... :up:

I used this method you recommended, as I only wanted to have the extra Google Adsense Custom search added to our site, while keeping the regular vBulletin ones for those that preferred it....

Seems to work great, including using Google's iFrame approach to keep search results locally displayed...

Regards,
Doug
Reply With Quote
  #10  
Old 12-03-2010, 09:21 PM
Popa Andrei's Avatar
Popa Andrei Popa Andrei is offline
 
Join Date: May 2008
Location: Romania/Petrosani
Posts: 367
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i hope you dont have the same surprize as we did.Just raised 70 euros on adsense,and gues wath?they disabled the account,MF
Reply With Quote
Reply

Thread Tools

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

Forum Jump


All times are GMT. The time now is 11:53 AM.


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.06559 seconds
  • Memory Usage 2,375KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete