vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Show Thread Enhancements - Translate a Thread in a Google Pop-Up Window (https://vborg.vbsupport.ru/showthread.php?t=168439)

paulvev 02-21-2008 11:11 PM

my forum has a tiny bit of flash in the header...this modification gives me a white page on the google popup saying "Google error - Server Error - Please try again in 30 seconds" but its not working at all ?

Any suggestions?

Digital Jedi 02-22-2008 12:36 AM

It probably means just that. An internal server error. In fact, I believe Google was having some problems earlier today. Try again later on and it should work fine.

paulvev 02-22-2008 08:51 PM

Think so? Im not sure...its been 24 hours now and the server error is still showing each time i try to translate.

Going in via google, its translation of web page services (directly) seems to be working ok? Anybody got any ideas...i'd love this on my forum...i have people from 28 different countries!

Is there a way that the popup can show just the thread or post, rather than the header/navbar?
Im sure the problem lies in my flash header or complex navbar.

Digital Jedi 02-22-2008 09:12 PM

Hrm, that sounds odd. Have you tried the workaround ScaleMotoreCars tried? He was having trouble with his flash banner as well.

By the way, I think I've almost got the bugs on that vBa module worked out. But I can't be sure it will work for every forum until you try it out. So consider it a Beta. :D

paulvev 02-22-2008 09:53 PM

I also have the Limited Guest hack installed. I turned it off
https://vborg.vbsupport.ru/showt...=Limited+Guest

still didnt work. My forum is set up for guests to be able to view posts.
I do have a tiny bit of flash in my header..

you can see whats happening here :
http://www.forumvme.com/showthread.php?t=699
The language menu opens up fine, but the google translation page struggles and gives a "google internal server error"...although i know its not google, cos all the examples including your demo are actually working right now.

I'm using Firefox... but it doesnt work in IE too.
Im pretty stuck now to be honest. Any ideas?

Magnusson2u 02-23-2008 03:19 AM

That's some great shit! I can't use it, but I love it! :)

Digital Jedi 02-25-2008 06:57 PM

Quote:

Originally Posted by paulvev (Post 1449002)
I also have the Limited Guest hack installed. I turned it off
https://vborg.vbsupport.ru/showt...=Limited+Guest

still didnt work. My forum is set up for guests to be able to view posts.
I do have a tiny bit of flash in my header..

you can see whats happening here :
http://www.forumvme.com/showthread.php?t=699
The language menu opens up fine, but the google translation page struggles and gives a "google internal server error"...although i know its not google, cos all the examples including your demo are actually working right now.

I'm using Firefox... but it doesnt work in IE too.
Im pretty stuck now to be honest. Any ideas?

I'm thinking it is Google. It's just having a problem with your site in particular. You wouldn't get a server error message if it was on your end. I suggest disabling your hacks one by one, and trying each time to see which one might be causing the problem. I'd start with your advertisements first, and see if it's the flash causing the problem. Google is having a problem processing something and it's causing an error on their end.

Quote:

Originally Posted by Magnusson2u (Post 1449137)
That's some great shit! I can't use it, but I love it! :)

Why, thank you. :D

Scalemotorcars 02-26-2008 02:04 AM

Google doesn't like the flash get around JS script. I took a quick look at your site and noticed your flash gets around the active-X. So however your doing that I bet thats your problem.

Digital Jedi 02-28-2008 08:09 PM

Sorry this took so long. Just been busy.

This will create a vBadvanced module on your home page. Let's test this first and make sure it works for everyone, before we tackle a module for all your pages and the additional language options.

Step 1
(For vBadvanced 3.0.0) Go to Admin CP >>> vBa CMPS >>> Add Module>>>Template Module

Step 2

Name the module what you will. I named mine Translate this Page. The important options to set are as follows. You can set the others to whatever you wish.
Template to Include: translate_page
Template Content:
PHP Code:

<center>  
   <
table width="99%" class="tcat">
      <
tr>
         <
td id="languagemenu" nowrap="nowrap">
            <
a href="$show[nojs_link]#goto_languagemenu"><strong>Translate this Page</strong></a>
           <if 
condition="$show['popups']"><script type="text/javascript"vbmenu_register("languagemenu"); </script></if>
         </
td>
      </
tr>
   </
table>
</
center>
 <
br />
 
  <!-- 
Language Translator Menu -->
   <
div class="vbmenu_popup" id="languagemenu_menu" style="display:none">
  <
table cellpadding="4" cellspacing="1" border="0">
<
tr><td class="thead">Translate this Page</td></tr>
 
<!-- 
Arabic -->
<
tr><td class="vbmenu_option"><a href="#" onClick="Martinezl=window.open('http://translate.google.com/translate?u=http%3A%2F%2Fwww.YOURDOMAIN.COM&langpair=en%7Car&hl=en&ie=UTF-8','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=800,height=800')">
<
img src="$stylevar[imgdir_button]/ae.gif" alt="Arabic" width="15" height="10" border="0" /> <span title="Arabic">Arabic</span></a></td></tr>
 
<!-- 
Chinese (Simplified) -->
<
tr><td class="vbmenu_option"><a href="#" onClick="Martinez1=window.open('http://translate.google.com/translate?u=http%3A%2F%2Fwww.YOURDOMAIN.COM&langpair=en%7Czh-CN&hl=en&ie=UTF-8','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=800,height=800')">
<
img src="$stylevar[imgdir_button]/cn.gif" alt="Chinese (Simplified)" width="15" height="10" border="0" /> <span title="Chinese (Simplified)">Chinese (s)</span></a></td></tr>
 
<!-- 
Chinese (Traditional) -->
<
tr><td class="vbmenu_option"><a href="#" onClick="Martinez1=window.open('http://translate.google.com/translate?u=http%3A%2F%2Fwww.YOURDOMAIN.COM&langpair=en%7Czh-TW&hl=en&ie=UTF-8','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=800,height=800')">
<
img src="$stylevar[imgdir_button]/tw.gif" alt="Chinese (Traditional)" width="15" height="10" border="0" /> <span title="Chinese (Traditional)">Chinese (t)</span></a></td></tr>
 
<!-- 
English -->
<
tr><td class="vbmenu_option"><a href="#" onClick="Martinez1=window.open('http://www.google.com/language_tools','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=700,height=500')">
<
img src="$stylevar[imgdir_button]/us.gif" alt="English" width="15" height="10" border="0" /> <span title="English">English</span></a></td></tr>
 
<!-- 
French -->
<
tr><td class="vbmenu_option"><a href="#" onClick="Martinez1=window.open('http://translate.google.com/translate?u=http%3A%2F%2Fwww.YOURDOMAIN.COM&langpair=en%7Cfr&hl=en&ie=UTF-8','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=800,height=800')">
<
img src="$stylevar[imgdir_button]/fr.gif" alt="French" width="15" height="10" border="0" /> <span title="French">Fran?ais</span></a></td></tr>
 
<!-- 
German -->
<
tr><td class="vbmenu_option"><a href="#" onClick="Martinez1=window.open('http://translate.google.com/translate?u=http%3A%2F%2Fwww.YOURDOMAIN.COM&langpair=en%7Cde&hl=en&ie=UTF-8','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=800,height=800')">
<
img src="$stylevar[imgdir_button]/de.gif" alt="German" width="15" height="10" border="0" /> <span title="German">Deutsch</span></a></td></tr>
 
<!-- 
Greek -->
<
tr><td class="vbmenu_option"><a href="#" onClick="Martinez1=window.open('http://translate.google.com/translate?u=http%3A%2F%2Fwww.YOURDOMAIN.COM&langpair=en%7Cel&hl=en&ie=UTF-8','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=800,height=800')">
<
img src="$stylevar[imgdir_button]/gr.gif" alt="Greek" width="15" height="10" border="0" /> <span title="Greek">Greek</span></a></td></tr>
 
<!-- 
Italian -->
<
tr><td class="vbmenu_option"><a href="#" onClick="Martinez1=window.open('http://translate.google.com/translate?u=http%3A%2F%2Fwww.YOURDOMAIN.COM&langpair=en%7Cit&hl=en&ie=UTF-8','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=800,height=800')">
<
img src="$stylevar[imgdir_button]/it.gif" alt="Italian" width="15" height="10" border="0" /> <span title="Italian">Italiano</span></a></td></tr>
 
<!-- 
Japanese -->
<
tr><td class="vbmenu_option"><a href="#" onClick="Martinez1=window.open('http://translate.google.com/translate?u=http%3A%2F%2Fwww.YOURDOMAIN.COM&langpair=en%7Cja&hl=en&ie=UTF-8','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=800,height=800')">
<
img src="$stylevar[imgdir_button]/jp.gif" alt="Japanese" width="15" height="10" border="0" /> <span title="Japanese">Japanese</span></a></td></tr>
 
<!-- 
Korean -->
<
tr><td class="vbmenu_option"><a href="#" onClick="Martinez1=window.open('http://translate.google.com/translate?u=http%3A%2F%2Fwww.YOURDOMAIN.COM&langpair=en%7Cko&hl=en&ie=UTF-8','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=800,height=800')">
<
img src="$stylevar[imgdir_button]/kr.gif" alt="Korean" width="15" height="10" border="0" /> <span title="Korean">Korean</span></a></td></tr>
<!-- 
Portuguese -->
<
tr><td class="vbmenu_option"><a href="#" onClick="Martinez1=window.open('http://translate.google.com/translate?u=http%3A%2F%2Fwww.YOURDOMAIN.COM&langpair=en%7Cpt&hl=en&ie=UTF-8','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=800,height=800')">
<
img src="$stylevar[imgdir_button]/pt.gif" alt="Portuguese" width="15" height="10" border="0" /> <span title="Portuguese">Portuguese</span></a></td></tr>
 
<!-- 
Russian -->
<
tr><td class="vbmenu_option"><a href="#" onClick="Martinez1=window.open('http://translate.google.com/translate?u=http%3A%2F%2Fwww.YOURDOMAIN.COM&langpair=en%7Cru&hl=en&ie=UTF-8','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=800,height=800')">
<
img src="$stylevar[imgdir_button]/ru.gif" alt="Russian" width="15" height="10" border="0" /> <span title="Russian">Russian</span></a></td></tr>
 
<!-- 
Spanish -->
<
tr><td class="vbmenu_option"><a href="#" onClick="Martinez1=window.open('http://translate.google.com/translate?u=http%3A%2F%2Fwww.YOURDOMAIN.COM&langpair=en%7Ces&hl=en&ie=UTF-8','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=800,height=800')">
<
img src="$stylevar[imgdir_button]/es.gif" alt="Spanish" width="15" height="10" border="0" /> <span title="Spanish">Espa?ol</span></a></td></tr
    
<!-- 
Dutch -->
<
tr><td class="vbmenu_option"><a href="#" onclick="Martinez1=window.open('http://translate.google.com/translate?u=http%3A%2F%2Fwww.YOURDOMAIN.COM&amp;langpair=en%7Cnl&amp;hl=en&amp;ie=UTF-8','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=800,height=800')">
<
img src="$stylevar[imgdir_button]/nl.gif" alt="Dutch" width="15" height="10" border="0" /> <span title="Dutch">Nederlands</span></a></td></tr>
  
   </
table></div>
   <!-- / 
Language Translator Menu --> 

Use Module Wrapper Template: No
Step 3
Replace each instance of YOURDOMAIN.COM with the location of your forum.

Step 4
After setting your other settings to preference, save the module and when prompted, add it to the page your using as your home page.

And that should do it. The rest can be set to your customizations. When you wish to edit the appearance and the code of the module, you will go to your Style Manager and edit the template named adv_portal_translate_page. Here's mine in action: www.cogonline.net

Tom S 02-29-2008 04:22 AM

Thank You so much for writing this code. It is going to help our research like you would not believe. I have just worked on this for around an hour (I am really new to this code stuff). But I did get it working correctly. Now if I could just figure out what I did wrong with the Mp3 player:(

Check out my Forum: http://www.bigfootreferenceguide.com/index.php

You guys are geniuses in my book. I was just noticing the update to add to the Template Module. This will not overwrite what I have just done, correct? This will be for the next Forum Skin that I build?

Tom S. :D


All times are GMT. The time now is 03:28 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.01214 seconds
  • Memory Usage 1,849KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete