Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications

Reply
 
Thread Tools
Quick "Translate This Page" Link Details »»
Quick "Translate This Page" Link
Version: 0.01, by RWerksman RWerksman is offline
Developer Last Online: Dec 2011 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.6.8 Rating:
Released: 12-28-2007 Last Update: Never Installs: 22
Template Edits
Re-useable Code  
No support by the author.

This modification adds a drop down box in the lower right corner of each page directly under the Forum Jump Box that is currently there. When a user selects an option from this box, they'll be forwarded on to a Google translation of the page at hand.

Please note that when viewing the translated version of this page, the user will not be logged in.

In the forumjump template, look for:

Code:
<br /><br />
and

Code:
</div>
Place the following code between the two entires:

Code:
 
<strong>Translate This Page<br />
<form action="http://translate.google.com/translate" method="post">
 <input type="hidden" name="u" value="http://YOURSITE.COM/$scriptpath" />
 <select name="langpair" onchange="this.form.submit();">
  <option value="en|de">English to German</option>
  <option value="en|nl">English to Dutch</option>
  <option value="en|es">English to Spanish</option>
  <option value="en|fr">English to French</option>
  <option value="en|it">English to Italian</option>
  <option value="en|pt">English to Portuguese</option>
  <option value="en|ko">English to Korean</option>
  <option value="en|ja">English to Japanese</option>
  <option value="en|ar">English to Arabic</option>
  <option value="de|en">German to English</option>
  <option value="de|nl">German to Dutch</option>
  <option value="de|es">German to Spanish</option>
  <option value="de|fr">German to French</option>
  <option value="de|it">German to Italian</option>
  <option value="de|pt">German to Portuguese</option>
  <option value="de|ko">German to Korean</option>
  <option value="de|ja">German to Japanese</option>
  <option value="de|ar">German to Arabic</option>
  <option value="nl|en">Dutch to English</option>
  <option value="nl|de">Dutch to German</option>
  <option value="nl|es">Dutch to Spanish</option>
  <option value="nl|fr">Dutch to French</option>
  <option value="nl|it">Dutch to Italian</option>
  <option value="nl|pt">Dutch to Portuguese</option>
  <option value="nl|ko">Dutch to Korean</option>
  <option value="nl|ja">Dutch to Japanese</option>
  <option value="nl|ar">Dutch to Arabic</option>
  <option value="es|en">Spanish to English</option>
  <option value="es|de">Spanish to German</option>
  <option value="es|nl">Spanish to Dutch</option>
  <option value="es|fr">Spanish to French</option>
  <option value="es|it">Spanish to Italian</option>
  <option value="es|pt">Spanish to Portuguese</option>
  <option value="es|ko">Spanish to Korean</option>
  <option value="es|ja">Spanish to Japanese</option>
  <option value="es|ar">Spanish to Arabic</option>
  <option value="fr|en">French to English</option>
  <option value="fr|de">French to German</option>
  <option value="fr|nl">French to Dutch</option>
  <option value="fr|es">French to Spanish</option>
  <option value="fr|it">French to Italian</option>
  <option value="fr|pt">French to Portuguese</option>
  <option value="fr|ko">French to Korean</option>
  <option value="fr|ja">French to Japanese</option>
  <option value="fr|ar">French to Arabic</option>
  <option value="it|en">Italian to English</option>
  <option value="it|de">Italian to German</option>
  <option value="it|nl">Italian to Dutch</option>
  <option value="it|es">Italian to Spanish</option>
  <option value="it|fr">Italian to French</option>
  <option value="it|pt">Italian to Portuguese</option>
  <option value="it|ko">Italian to Korean</option>
  <option value="it|ja">Italian to Japanese</option>
  <option value="it|ar">Italian to Arabic</option>
 </select>
 <input type="hidden" name="hl" value="en" />
 <input type="hidden" name="ie" value="UTF-8" />
 <input type="hidden" name="oe" value="UTF-8" />
 <input type="hidden" name="safe" value="active" />
 <input type="hidden" name="prev" value="/language_tools" />
 </select>$gobutton
</form>
Make sure that you change the YOURSITE.COM to the correct domain name.

Save.

Enjoy.


Credit goes to oldfan (for his or her post here) that I tweaked to make work better.


For a demo of what this looks like go here: http://f800riders.org/forum/forumdisplay.php?f=67

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 12-29-2007, 03:45 AM
RWerksman RWerksman is offline
 
Join Date: Dec 2007
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Reserved
Reply With Quote
  #3  
Old 12-29-2007, 04:48 AM
iogames's Avatar
iogames iogames is offline
 
Join Date: Jan 2007
Location: Las Vegas, NV.
Posts: 1,433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is great! why nobody is installing???
Reply With Quote
  #4  
Old 12-29-2007, 05:12 AM
RWerksman RWerksman is offline
 
Join Date: Dec 2007
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by iogames View Post
This is great! why nobody is installing???
Probably because it was just posted today
Reply With Quote
  #5  
Old 12-29-2007, 06:08 AM
iogames's Avatar
iogames iogames is offline
 
Join Date: Jan 2007
Location: Las Vegas, NV.
Posts: 1,433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Whenever I translate the site, it automatically logs me out of the site and says that the admin must add the URL to the whitelist. Can you fix this issue?
Reply With Quote
  #6  
Old 12-29-2007, 10:15 PM
RWerksman RWerksman is offline
 
Join Date: Dec 2007
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Admin CP -> vBulletin Options -> General Settings

Add translate.google.com to the Post Referrer Whitelist.

Save.
Reply With Quote
  #7  
Old 12-29-2007, 11:18 PM
rcwild rcwild is offline
 
Join Date: Mar 2004
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool.

Our site gets visitors from around the world, so the translation will add convenience. Would be even nicer if it was more obvious to users. Would be awesome if it was near the top of the page and included country flags to indicate languages, with image linked to the correct translation.
Reply With Quote
  #8  
Old 12-30-2007, 04:23 PM
iogames's Avatar
iogames iogames is offline
 
Join Date: Jan 2007
Location: Las Vegas, NV.
Posts: 1,433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rcwild View Post
Cool.

Our site gets visitors from around the world, so the translation will add convenience. Would be even nicer if it was more obvious to users. Would be awesome if it was near the top of the page and included country flags to indicate languages, with image linked to the correct translation.
Mine just stopped working! I just upgraded vBSEO...
Yes the flags could be a nice addition!

Quote:
<div align="left">
<strong>Translate Forum<br />
<form action="http://translate.google.com/translate" method="post">
<input type="hidden" name="u" value="http://iogames.com/$scriptpath" />
<select name="langpair" onchange="this.form.submit();">
<option value="en|es">English -> Spanish</option>
<option value="en|ja">English -> Japanese</option>
<option value="en|de">English -> German</option>
<option value="en|fr">English -> French</option>
<option value="en|it">English -> Italian</option>
<option value="en|nl">English -> Dutch</option>
<option value="en|pt">English -> Portuguese</option>
<option value="en|ko">English -> Korean</option>
<option value="en|ar">English -> Arabic</option>
</select>
<input type="hidden" name="hl" value="en" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="hidden" name="oe" value="UTF-8" />
<input type="hidden" name="safe" value="active" />
<input type="hidden" name="prev" value="/language_tools" />
</select>$gobutton
</form>
Reply With Quote
  #9  
Old 12-30-2007, 06:39 PM
RWerksman RWerksman is offline
 
Join Date: Dec 2007
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by iogames View Post
Mine just stopped working! I just upgraded vBSEO...
Yes the flags could be a nice addition!
I have no plans to include flags as they represent countries, not languages.

I currently don't have vBSEO installed, is there somewhere that I can see this not working on your site?
Reply With Quote
  #10  
Old 01-04-2008, 06:46 PM
iogames's Avatar
iogames iogames is offline
 
Join Date: Jan 2007
Location: Las Vegas, NV.
Posts: 1,433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well after a few hours I've improved mine alot!

http://chat.iogames.com/

even I put flags
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 02:22 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04210 seconds
  • Memory Usage 2,302KB
  • 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
  • (3)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (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
  • 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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete