Thread: End-User Options - Forum Translator by Google
View Single Post
  #35  
Old 02-04-2011, 06:12 PM
Infopro Infopro is offline
 
Join Date: May 2003
Location: Pennsylvania
Posts: 267
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gosiah23 View Post
Infopro, thanks for your reply. These are 2 options I like. Whatever is easier, but I think the 1st choice will look better.

See attached image.


Thanks a million for this mod and your help!

Margaret


Well, this is not perfect I don't think, but should put you in the right direction.

In your navbar template, find:

Code:
	<vb:if condition="$vboptions['enablesearches']">
Just above it place this:

Code:
<!-- Translate vBulletin -->
<div style="position:absolute; right:200px;top:28px;" id="google_translate_element" class="select"></div><script type="text/javascript">
function googleTranslateElementInit() {
  new google.translate.TranslateElement({
    pageLanguage: 'en',
    multilanguagePage: true,
    layout: google.translate.TranslateElement.InlineLayout.SIMPLE
  }, 'google_translate_element');
}
</script><script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<!-- /Translate vBulletin -->
You really should want that style stuff added to your CSS instead of here but this will place it up by the Advanced Search text as you wanted for now. (see attachment, added to vB default style)

I didn't want to spend much time on this today but If I find some time I'd like to tweak the CSS and js to not be called from Google. In doing so the drop down and menu could be styled a bit nicer to match your site.

The stuff inside the div can be placed where ever you like, the js should be placed as close to the bottom of your page as possible for speed. That's why I originally placed it in footer.

In looking into the CSS end of this I did find one small tweak some might like:

Simply add this to the additional.css template to hide the "toolbar thing" and the balloon tips.

Code:
/* gtranslate */
.goog-te-banner-frame{display: none !important;}
body{top: 0px !important;}
.goog-te-balloon-frame{display: none !important;}
font{background: transparent !important;}
/* gtranslate */

Shamelessly stolen tip from here:

http://www.google.com/support/forum/...48c8591e&hl=en

Lots can be done with this. Just depends on how much playtime you have to experiment.
Attached Images
File Type: jpg gtransattop.jpg (68.9 KB, 0 views)
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01212 seconds
  • Memory Usage 1,799KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_attachment
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • 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
  • showpost_complete