![]() |
Quote:
The DB errors will happen, you can reduce them but upping the time out limit of MySQL. Some pages take some time to translate due to the amount of text on the page and MySQL get's impatient, they will stop eventually as translations load from cache and do not impact the working of your site. |
Is it possible to do that?:
When the page will be translated for the first time, user will see the message "Please wait ... Loading ..." |
Quote:
The users that come from google to your translated pages will see the page load instant, because for the page to be indexed in the first place the search bot would of already translated it and cached it for you. So it really isn't necessary imo. |
Quote:
What would be the best way to limit the script to only vB pages? Since I have so many different mods that it will not work with I think it would be best to wrap the flag code in conditionals. Has anybody done this yet? |
Quote:
|
Quote:
---------------------------------------- <if condition="is_member_of($bbuserinfo,1)"> <if condition="(THIS_SCRIPT == 'showthread')"> -code- </if> </if> |
Quote:
So find the line for english and put <!-- at the start. and --> at the end. Or just delete the line altogether, same thing happens, the flag will not display. |
Quote:
Still getting some database errors but once on the first access. After that everything comes up. Thanks again :) |
Hey is there a way to block certain parts of the page from being translated?
This sort of functionality would be VERY nice. For example Text that gets translated here <!--notranslatestart--> This text doesnt get translated <!--notranslateend--> text that gets translated here Do you think it can be done? |
Not yet, we may do it in the future. Working on some other features right now but it's been noted, thanks.
|
Quote:
|
In the database i see the " originaltext "
But the " translated " is empty ... https://vborg.vbsupport.ru/external/2009/06/2.jpg |
Quote:
|
Hey dave, very nice plugin.
I figured it out for you :D Code:
<!--notranslatestart--> Change the plugin code to the following: Code:
// Enable UTF-8 characters You need to add a Code:
@curl_setopt($ch, CURLOPT_REFERER,"http://$_SERVER[SERVER_NAME]$_SERVER[VBSEO_URI]"); according to google. and adding an api key to the request doesn't hurt. http://code.google.com/apis/ajaxsearch/signup.html at http://code.google.com/apis/ajaxlanguage/documentation it says: Quote:
Quote:
|
I'm trying to figure out a way I could use this with vbSEO. Ideally the url's should be in the format site.com/xx/thread_name/ where xx is the language abbreviation. Anyone have any ideas?
Also, is there any reason that links on the translated page shouldn't be to the translated version of corresponding page? Otherwise the user would have to keep clicking their flag for each new page. |
Quote:
As for HREF rewriting, I checked the code and I believe its a feature dave is working on but currently its not in place. The idea is to boost search traffic not to provide a comprehensive translation experience. The google translation gadget offers a much faster translation experience for users if this is what you are looking for: http://translate.google.com/translate_tools |
Quote:
|
Quote:
|
Quote:
|
Quote:
As far as I'm aware domain names and URLs are only allowed in English, that just the way the net is... |
trying this again....
|
Quote:
ah yes thanks ;)EN flag seems to be gone and so far working great. cheers ;) |
i have curl enabled
https://vborg.vbsupport.ru/ and i get a white screen whenever i press a flag button |
Quote:
|
Alright I have updated the translation exceptions a little bit.
Basically go to your plugins in VB, and if you remember you created one that hooked "global_complete". Find that plugin, and edit it. Replace that plugin with this: Code:
// Enable UTF-8 characters What you can do with this is if you have some piece of information that you dont want to be translated, wrap it in those tags. You can do so in your templates or php files or whatever. You should never see those tags in your actual html page as they will be removed. I have also made some improvements in regards to translating numbers and times. I've found that by disabling translation of time likes 01:30 PM and by disabling translation of numbers like 32,423, you sacrifice a bit of readibility for foreign users but the pages load MUCH faster. I haven't included this in any of my posts yet but I will soon. |
I want to mainly know how to avoid Google being unhappy, how do I implement the API key? Thanks
|
Ok sorry, first of all here is a small bug fix of what i posted earlier, as it was slightly bugged.
Code:
// Enable UTF-8 characters As far as making google happy, ( This code will ONLY work if you have VBSEO) Do this: 1. Open up your translate.php. find these lines: Code:
@curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); Code:
@curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); Go to http://code.google.com/apis/ajaxsearch/signup.html Get an api key for your site, copy it find: Code:
@curl_setopt($ch, CURLOPT_URL, "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&langpair=".urlencode($fl.'|'.$tl)."&q=".urlencode($text)); change it to Code:
@curl_setopt($ch, CURLOPT_URL, "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&key=COPYYOURKEYHERE&langpair=".urlencode($fl.'|'.$tl)."&q=".urlencode($text)); That's all. Easy as pie. This will ensure google knows where the requests are coming from and that they can contact you in case of problems instead of just banning you from all of google by ip. |
FYI we have never had a site banned, after years of running these and similar scripts.
At most google will ban your IP from the API service for 24hrs, no big deal. |
Quote:
I would not be able to easily change the ip of my site. I always say better safe than sorry. |
Quote:
|
I tried to Install the 2.0 version and I was able to show the flags on the site without crashing. Also the db tables are being filled correctly ( both source and translation ) but after I click on 1 flag I still get the message below
-------------------------------------------------------------------------------------- Content Encoding Error The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression. The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression. * Please contact the website owners to inform them of this problem. -------------------------------------------------------- Paolo |
Im not sure whether to bother, is there any harm in adding it Dave? Thanks :up:
|
Quote:
At worst they may block your IP from the translate APi for 24hrs, they used to do this on their translate website but I have NEVER had it happen with the API, that may change. Seriously, Google bans scraper sites, sites using only rss feeds and other autogenerated shit. It does not ban quality sites with good content be it in english or auto translated. |
I think I will just keep it as is, thanks for the advice Dave :up:
|
You certainly can't be hurting anything by including an API key.
Here's another question... How about displaying flags based on where the IP is from? I understand this would involve a small index of IP's, but perhaps it could be an exclusion. For example, 'if not from US, display flags' edit - nevermind - that would be a very large index either way that would have to be referenced on every visit, which sounds very expensive |
ok i left it installed overnight and i checked the mysql tables and this is what it looks like
https://vborg.vbsupport.ru/external/2009/06/1.jpg still not loading anything in the cache table. and when i click any flags, nothing is loading for me. any ideas? |
Quote:
Either way if some of them are filling up then caching is working as far as i can see, is there an actual problem you are having? |
Well I installed the new version 2.0 script yesterday.
My forum currently has 4,745 threads and 17,052 posts and today my DB looks like this: https://vborg.vbsupport.ru/ 34.7MB in 24 hours ?!!?!? I'll let you know how big this DB gets after a week..... Cheers, and thanks for the great script! Regards, Gerald. |
Quote:
S-MAN |
Quote:
|
All times are GMT. The time now is 01:03 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|