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)

TheWhite 01-27-2008 12:02 PM

Can someone give me the automatic Italian to English string?

Best regards

Digital Jedi 01-27-2008 02:00 PM

I made sure to make each block easy to find in the attached zip file in Post 2. Italian to English is in a block by itself.

baghdad4ever 01-27-2008 02:38 PM

Quote:

Originally Posted by Digital Jedi (Post 1429372)
baghdad4ever, what additional languages are you looking for? Have you tried the other language options yet? Sorry if I'm misunderstanding you.
.


hi

my forum language is arabic, so when german guest come and want to translate the page, he will press on german flag but the google cannot translate the page

only arabic to english worked

how can i fix that??

Digital Jedi 01-27-2008 03:28 PM

Quote:

Originally Posted by baghdad4ever (Post 1430102)
hi

my forum language is arabic, so when german guest come and want to translate the page, he will press on german flag but the google cannot translate the page

only arabic to english worked

how can i fix that??

I see what you mean now. The way the code works is it translates a predetermined language to a predetermined language. Google can't guess what language your page is in, so the links are premade to translate one specific language to one specific language. So the only thing the German flag (on the Post 1 mod) is going to do is translate "English to German", not "Any Language to German".

For the moment, Google only translates Arabic to English. But if they add any more languages, I'll be sure to add it in.

TheWhite 01-27-2008 03:46 PM

ok thanks but now how do i add the domain to the whitelist?

how comw that with the some of the other languages you don't need the guest feature on? :(

Digital Jedi 01-27-2008 04:19 PM

Quote:

Originally Posted by TheWhite (Post 1430140)
ok thanks but now how do i add the domain to the whitelist?

how comw that with the some of the other languages you don't need the guest feature on? :(

If it's not viewable by Guests, then Google can't read it either. There shouldn't be any exceptions to that, unless you've stumbled across a bug in your permissions.

R-D 02-08-2008 11:38 PM

Great hack, thanks Digital Jedi! :)

Habsy 02-09-2008 03:29 AM

Hi, I am having a problem adding this mod. Step 2A asks to look for

<script type="text/javascript">
<!--
vB_AJAX_ThreadRate_Init('showthread_threadrate_for m');
var threadid = $threadinfo[threadid];
//-->
</script>
</if>

Yet my style does not contain that function.

Is there another area of the style I can place this mod? I would love to get it working.

Thanks in advance.

Digital Jedi 02-09-2008 10:00 AM

Quote:

Originally Posted by R-D (Post 1439142)
Great hack, thanks Digital Jedi! :)

Your welcome. :cool: And thank you.

Quote:

Originally Posted by Habsy (Post 1439227)
Hi, I am having a problem adding this mod. Step 2A asks to look for

<script type="text/javascript">
<!--
vB_AJAX_ThreadRate_Init('showthread_threadrate_for m');
var threadid = $threadinfo[threadid];
//-->
</script>
</if>

Yet my style does not contain that function.

Is there another area of the style I can place this mod? I would love to get it working.

Thanks in advance.

Can you post your template code? Maybe it's just arranged differently.

skrazydogz 02-09-2008 11:03 AM

your English traslation isnt correct it opens only google translator...and not an german - english translation for example.

MiahBeSmokin420 02-09-2008 11:31 AM

To bad this dose not work if you block proxies on your site

Unless you do a little work and allow the site that it is translating from

But thats not too hard i guess

But anyways ya just figured i would say something about the proxies problem

Digital Jedi 02-09-2008 11:34 AM

Quote:

Originally Posted by skrazydogz (Post 1439358)
your English traslation isnt correct it opens only google translator...and not an german - english translation for example.

It's not wrong, that's just what it does. I mention that in the description.

Quote:

Originally Posted by Digital Jedi

As I explained before, Google doesn't know what language your pages are in. So all translations presume your page is in English and translate accordingly.

BUT, if you want more language options then just English to [LANGUAGE], then see Post 2 of this thread. (Again, I did mention this in the description.)

Quote:

Originally Posted by Digital Jedi
Step 2. (For those that want more language options, there is an alternative to Step 2 here).


Digital Jedi 02-09-2008 11:48 AM

Quote:

Originally Posted by MiahBeSmokin420 (Post 1439364)
To bad this dose not work if you block proxies on your site

Unless you do a little work and allow the site that it is translating from

But thats not too hard i guess

But anyways ya just figured i would say something about the proxies problem

Shouldn't be too hard, I wouldn't think. The downside of having to use a third-party website, I suppose. The plus side is you don't have to worry about server load or anything like that. :)

MiahBeSmokin420 02-09-2008 12:22 PM

Quote:

Originally Posted by Digital Jedi (Post 1439374)
The plus side is you don't have to worry about server load or anything like that. :)

True True but if your server is really good then it can handle loads the most cant. like mine lol

Habsy 02-12-2008 02:59 PM

I got it working. I added the double navbar mod and replaced one of the default functions in it with this code. Works great! Thanks!

Digital Jedi 02-13-2008 03:01 PM

I'm glad it's working for you. :)

aamirkhj 02-14-2008 06:32 PM

Any possibility of adding "urdu" language translater, I see so far google did not added urdu language tool so far on the above link, anyway to work around that to translate urdu language to english:)

Digital Jedi 02-14-2008 06:51 PM

I'm afraid I can only add what Google provides, since their the one's doing the translation. Sorry. But if they do add more languages, and I'm made aware of it, I'll be sure to add them in.

wenchdownunder 02-15-2008 10:54 AM

Ok, I tested this on a test site and it worked brilliantly....just what I need. However when I make the template edits in my forums, I am able to do step 1, no issues, but the moment I do step 2 and save...it draws a blank page in the cp and doesn't save it. Obviously I have a conflict with something else that I have added :( Any clues on what perhaps it could be?

Digital Jedi 02-15-2008 03:14 PM

Quote:

Originally Posted by wenchdownunder (Post 1443587)
Ok, I tested this on a test site and it worked brilliantly....just what I need. However when I make the template edits in my forums, I am able to do step 1, no issues, but the moment I do step 2 and save...it draws a blank page in the cp and doesn't save it. Obviously I have a conflict with something else that I have added :( Any clues on what perhaps it could be?

I can't imagine what that would be, but you'd be right. It shouldn't have anything to do with the edits. Sorry I can't be of more help. Maybe disable your hacks you have installed and see if template edits still have the same behaviour.

Scalemotorcars 02-16-2008 06:05 PM

I like this translation much better then the Bablefish version I posted last year. But like others I'm having the same IE problem. Works fine with Firefox but a blank page with IE. I can see it downloading files but once its finished its just blank. Any ideals???

Digital Jedi 02-16-2008 06:37 PM

I'm not sure whats going on. When are you getting the blank page exactly?

Scalemotorcars 02-16-2008 06:39 PM

Can someone else try this and see if its working with another computer.
http://www.scalemotorcars.com/forum/...2722#post22722

All I get is a blank, black page with the translation. Ive reset all my permissions to default and Ive checked the white list. All that seems fine. Also I tried it on the demo with IE and its working fine so this must me a conflict of some sort with google and my site.

Anyone care to take a crack at it???:D

Digital Jedi 02-16-2008 06:58 PM

Quote:

Originally Posted by Scalemotorcars (Post 1444626)
Can someone else try this and see if its working with another computer.
http://www.scalemotorcars.com/forum/...2722#post22722

All I get is a blank, black page with the translation. Ive reset all my permissions to default and Ive checked the white list. All that seems fine. Also I tried it on the demo with IE and its working fine so this must me a conflict of some sort with google and my site.

Anyone care to take a crack at it???:D

I think I see a couple of problems. For one, the link you sent was in Threaded Mode, which I presume is what you have set as the default. Initially, all I saw was the Thread tree and no posts.

The other thing I noticed is that once I'd clicked a few pages the forums where closed off to me. I'm guessing this will disrupt what Google can read as well.

There may be other reasons, but those are the ones that jump out at me.

Scalemotorcars 02-16-2008 07:30 PM

Well nuts. I didn't see that. Hold up Ill try and tweak that and see what happens.

Scalemotorcars 02-16-2008 07:38 PM

I changed the display setting and turned off this hack.
https://vborg.vbsupport.ru/showthrea...=Limited+Guest

But its still doing the same thing. :confused:

Scalemotorcars 02-16-2008 07:42 PM

Also added .translate.google.com to the VB whitelist but I dont think thats it either.

Digital Jedi 02-16-2008 08:16 PM

Quote:

Originally Posted by Scalemotorcars (Post 1444686)
Also added .translate.google.com to the VB whitelist but I dont think thats it either.

I tried translating your site directly from Google's Language Tools page, and all your pages are having the same problem. Not even the index or the CMPS page will reproduce any content. This one has got me. I can't imagine why it would come out blank, unless maybe Google is still being blocked somehow.

Scalemotorcars 02-16-2008 08:47 PM

What about the Privacy policy. I just noticed that at the bottom of the translation page theres a (privacy policy) Icon thats showing blocked cookies. Anyone know how to fix that?

Scalemotorcars 02-16-2008 09:02 PM

Found something with that privacy that may narrow it down.

Ive got a flash header and used objectswap.js to get around having to activate it. Well I removed that in the (headinclude) and now the translator shows my header but nothing else. 2 other items that are showing blocked are the (clientscript/vbulletin_global.js) and (clientscript/vbulletin_menu.js) but these appear to be be VB code and I don't want to remove those without further feedback. Anyone???

Scalemotorcars 02-16-2008 09:30 PM

Its the flash header. I reverted the header template back to the default and Wah-la it worked perfectly. Google for some reason is having a problem with it. Got any ideal???

Digital Jedi 02-16-2008 09:52 PM

This is a jack-leg fix, and I'm not sure it will work, but do you happen to have an alternate skin that doesn't use the flash headers? One of the things I had to do with the old Bablefish hack, was change the URLs in the code to something else. Like for awhile there, I had them link to the archive version of the thread, or to a different style ID. Like I said, it's a jack-leg fix, but the first thing that popped into my head.

Scalemotorcars 02-16-2008 11:37 PM

No the Flash header is a part of the site. Now that I know what the problem is I'll dig around on Google and see if theres a fix. As soon as I get it working Ill post the results here so you can add to your instructions. Thanks for everything... Daniel

One more thing. I tried putting the code into the navbar so I could translate all my portal pages but I couldn't get the <tr><td>~</td></tr>. part of the code to work anywhere. The button was easy to place anywhere on the navbar. Any Ideal where to but all the Country code?

Scalemotorcars 02-17-2008 10:44 AM

Problem solved. There were 2 issues with this hack not working with the Google Translator.

1st: For some reason Google didn't like my "objectSwap.js" This is the code to get around the pesky active X on IE.

2nd: There was a snag with my Flash content. I was using a Macromedia Shockwave Flash 6 but it kept hanging at the content. I changed it to Flash 8 and still it got stuck. SO.... I stuck the flash on its own page and used an IFrame in the header.

I know, I know its an Iframe but it works.

Now to move it into the Navbar so all pages can be translated. This would be handy for everyone with the VBadvanced CMPS portal system like myself. Make all global pages translatable. Also need to look into a fix for the ended session when translated. Any ideals.

Scalemotorcars 02-17-2008 12:44 PM

Got this into the navbar. Not really hard at all but who knows how to change the language code from "showthread.php" to translate the entire page from the navbar?

Heres the basic code for one language.
PHP Code:

<tr><td class="vbmenu_option"><a href="#" onClick="Martinezl=window.open('http://translate.google.com/translate?u=http%3A%2F%2Fwww.YOURDOMAIN.NET%2Fshowthread.php%3Ft%3D$thread[threadid]&langpair=en%7Car&hl=en&newwindow=1&safe=off&ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools','','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


Digital Jedi 02-17-2008 01:44 PM

Quote:

Originally Posted by Scalemotorcars (Post 1445068)
Problem solved. There were 2 issues with this hack not working with the Google Translator.

1st: For some reason Google didn't like my "objectSwap.js" This is the code to get around the pesky active X on IE.

2nd: There was a snag with my Flash content. I was using a Macromedia Shockwave Flash 6 but it kept hanging at the content. I changed it to Flash 8 and still it got stuck. SO.... I stuck the flash on its own page and used an IFrame in the header.

I know, I know its an Iframe but it works.

That's great. I'm glad you posted it here in case anyone encouters the same problem. Hey, I've always thought Iframes were awesome. ;)

Quote:

Now to move it into the Navbar so all pages can be translated. This would be handy for everyone with the VBadvanced CMPS portal system like myself. Make all global pages translatable. Also need to look into a fix for the ended session when translated. Any ideals.
Quote:

Originally Posted by Scalemotorcars (Post 1445136)
Got this into the navbar. Not really hard at all but who knows how to change the language code from "showthread.php" to translate the entire page from the navbar?

Give me just a couple of days, and I'll post the vBadvanced version of this. In order to get the benefit from it in the Navbar, you would need completely different code in the URL area. It's not hard, just different based on your needs.

Scalemotorcars 02-17-2008 04:43 PM

That would be awesome. I'm looking forward to it. :up:

Scalemotorcars 02-19-2008 04:17 PM

Any luck yet? I haven't had the time myself but Ill give it a wack sometime this week if you don't have the time either. :)

Scalemotorcars 02-21-2008 12:32 PM

I'm not having any luck with this.

To recap. I'm trying to get this to work from any .com page. Especially with the vbadvanced CMPS pages and the forum.

Its easy enough to add the Language button to the navbar but I cant get the rest of the code to work from that location. Any ideals???

Digital Jedi 02-21-2008 12:56 PM

There's a slight bug with the one I'm working with. It worked earlier, but I noticed that it didn't like some modifications to my portal page. I'm trying to work that out to see if it's the new HTML I added, or on Google's end.


All times are GMT. The time now is 05:16 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.01968 seconds
  • Memory Usage 1,850KB
  • 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
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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