Topic: Problem with javascript on main.tpl file (windows live translator)

I've installed windows live translator (works very well) on several pages and tried to install it on the PunBB main.tpl file. For some reason the translator scroll box is much wider on the .tpl file than any other. Here's the script <script type="text/javascript" src="http://www.windowslivetranslator.com/TranslatePageLink.aspx?pl=en"></script> The problem occurs on any .tpl file. Normally the scroll box is about 161px. On a .tpl file it’s about 257px. I’ve run into other javascript issues with .tpl, but this one is really bugging me. I want to use the translator but this way it’s too wide and a bad fit. Does anyone know of a fix for this problem?

I’d really appreciate your help.

Alex

Re: Problem with javascript on main.tpl file (windows live translator)

If you're trying to view the .tpl directly, you'll only get part of the page, making it look weird, because, in most cases, the CSS file won't be loaded.

Please, someone correct me if I'm wrong.

Re: Problem with javascript on main.tpl file (windows live translator)

Hi Garciat,

I know that the main.tpl file integrates a bunch of other files, but I'm not sure what you mean by viewing directly. I have the script in a header I added to main.tpl. When the forum is published, the problem is visible. A much wider scroll bar than if its on an individual html or php file. Try it yourself with the code I gave.

Thanks.

4 (edited by User33 2008-10-20 19:45)

Re: Problem with javascript on main.tpl file (windows live translator)

By viewing directly I meant using your browser to open the file.
Ex: "www.site.com/forum/path_to_template/file.tpl"

Anyways, maybe your CSS is making the select bar larger. See if you can find anything like:

select{ ... }

A link to your forum would help me find out what's wrong.

5 (edited by AlexanderS 2008-11-20 14:34)

Re: Problem with javascript on main.tpl file (windows live translator)

removed

6 (edited by User33 2008-10-20 23:52)

Re: Problem with javascript on main.tpl file (windows live translator)

Browser: Mozilla Firefox 3.0.3 (OK)
http://i247.photobucket.com/albums/gg13 … dex_ff.jpg
http://i247.photobucket.com/albums/gg13 … rum_ff.jpg

Browser: Google Chrome 0.2.149.30 (OK)
http://i247.photobucket.com/albums/gg13 … dex_ch.jpg
http://i247.photobucket.com/albums/gg13 … rum_ch.jpg

Browser: Internet Explorer 7.0.5730.13 (Wrong)

http://i247.photobucket.com/albums/gg13 … dex_ie.jpg
http://i247.photobucket.com/albums/gg13 … rum_ie.jpg

Due to the lack of a tool like Firebug for IE, it's really hard to find out what's wrong. IE's a web designer's nightmare...

Edit: I just found out what's wrong. Some of the options in the select bar contain foreign characters, and, because the selected charset encoding does not include them, IE just throws in random characters, making the select bar larger than expected.

This can be fixed by replacing

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

with

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

on your header.tpl (or whatever it's called).

Re: Problem with javascript on main.tpl file (windows live translator)

Any ideas? same problem in IE6 and 7. It doesn't matter which .tpl file I put it on (main.tpl, admin.tpl or maintenance.tpl) it does the same thing. Think a php include could be a work around?

Thank you.

8 (edited by User33 2008-10-21 00:35)

Re: Problem with javascript on main.tpl file (windows live translator)

Check my last post (if you haven't already).

Re: Problem with javascript on main.tpl file (windows live translator)

Garciat,

You're the man! Thank you so much for your help. Let me know if you need any help with a car.

AlexS

10

Re: Problem with javascript on main.tpl file (windows live translator)

Glad I could help big_smile