Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

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
  #12  
Old 12-03-2010, 09:40 PM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by stormzone View Post
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
Why would they do that when the point of their providing you with a product called AdSense for Search using program code they also provide, is to use it for searching and displaying their ads?

They say "Offer your users site search or web search while earning revenue from ads relevant to their search terms."

In fact, they even provide multiple versions for iFrame use within your site, as well as go to "New Page" on their site, on blogs, web sites and bulletin boards.

I suspect you must have done something else wrong?

Regards,
Doug
Reply With Quote
Reply


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 10:41 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.03654 seconds
  • Memory Usage 2,273KB
  • Queries Executed 17 (?)
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
  • (4)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
  • (2)post_thanks_box
  • (1)post_thanks_box_bit
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (2)post_thanks_postbit_info
  • (1)postbit
  • (2)postbit_attachment
  • (2)postbit_onlinestatus
  • (2)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