vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - vB Global Translator - Multiply your indexed pages & put search traffic on autopilot (https://vborg.vbsupport.ru/showthread.php?t=217329)

imported_silkroad 08-05-2009 06:57 AM

Hey!

I nominated the mod for MOTM, and sure enough, there it is and currently running in second place !!!

https://vborg.vbsupport.ru/showthread.php?t=219942

Go Man Go!

imported_silkroad 08-05-2009 07:07 AM

Quote:

Originally Posted by tpearl5 (Post 1861295)
Did you add this to your custom rewrite rules and custom redirects?

No, not yet.... just brainstorming.... please do not install the CRRs mentioned !

I was only brainstorming with NLP-er !! (and it did not work yet!)

Still under development!!

Ideas welcome!

PS: Maybe I should not brainstorm CRRs here? We don't want anyone to crash their board on an untested idea....

CThiessen 08-05-2009 07:22 AM

Quote:

Originally Posted by imported_silkroad (Post 1861674)
Ideas welcome!

Hi.
Maybe it is necessary to change the general rewrite settings.


Instead of : link.html use link.html&hl=en (own language) by editing the core files.

So than the standard is equal.
In the next step using the CRR to change:

link.html&hl=en to link.html (own language)
and
link.html&hl=ja to /ja/link.html (for every other language)

I am not a coder it is only a Idea.
Christian

imported_silkroad 08-05-2009 07:37 AM

I like this idea as well. We need to consider how this all plays with the vBSEO Sitemap Generator as well.

Unfortunately, I am not an expert on CRRs, but I think we can get there with a little time and help from our friends at vBSEO.

I think the overall requirement should be to rewrite all "/link.html?hl=flag" links to "flag/link.html" and to also make sure the "flag/link.html" links in the sitemaps, as well as the original "/link.html?hl=flag" work.

Also, I have been using distinct Google Sitemap for each flag and it works much better than combining all the flags in one huge, unmanageable process.

See attached update, as a FYI. (Note, in my image below, I changed es to sp (directory) ... the directory for the sitemaps only, because I had another es directory... you can use any method you like, but I like to have all lang sitemaps in a single directory for each lang.... much easier to manage!)

cyc 08-05-2009 07:58 AM

Quote:

Originally Posted by imported_silkroad (Post 1861684)
I think the overall requirement should be to rewrite all "/link.html?hl=flag" links to "flag/link.html" and to also make sure the "flag/link.html" links in the sitemaps, as well as the original "/link.html?hl=flag" work.

I also think this is the way to go!

imported_silkroad 08-05-2009 11:44 AM

Quote:

Originally Posted by cyc (Post 1861691)
I also think this is the way to go!

OK, thanks to Oleg at vBSEO, we have the first part working with:

Code:

RewriteEngine on
RewriteRule (.*) http://www.site.com/$1?hl=ja [L,R=301]

Using Japanese as an example (ja), we use SED to create a new sitemap, changing

Code:

http://www.yoursite.com/link.html?hl=ja
to

Code:

http://www.yoursite.com/japan/link.html

Tested and working thanks to the vBSEO team's great support. Thanks again VBSEO team.

imported_silkroad 08-05-2009 11:59 AM

[QUOTE=imported_silkroad;1861799]

Code:

RewriteEngine on
RewriteRule (.*) http://www.site.com/$1?hl=ja [L,R=301]

OBTW, I forgot to ask....

Is there any SEO issue related to returning a 301 permanent redirect code?

Saviour 08-05-2009 10:50 PM

Just got the following database errors after Google and AdSense spidered the site:

Code:

Database error in vBulletin 3.8.3:

Invalid SQL:

UPDATE vb_session
SET lastactivity = 1249514101, location = '/forums/showthread.php?t=845&hl=tr', inforum = 58, inthread = 845, incalendar = 0, badlocation = 0
WHERE sessionhash = '122a4492f1ad4d9b896966deb0020880';

MySQL Error  : MySQL server has gone away
Error Number  : 2006
Request Date  : Wednesday, August 5th 2009 @ 07:15:01 PM
Error Date    : Wednesday, August 5th 2009 @ 07:16:22 PM
Script        : http://glitchpc.com/forums/showthread.php?t=845&hl=tr
Referrer      :
IP Address    : 66.249.71.172
Username      : Unregistered
Classname    : vB_Database
MySQL Version :


Also...

Code:

Database error in vBulletin 3.8.3:

Invalid SQL:

UPDATE vb_session
SET lastactivity = 1249514535, location = '/forums/showthread.php?t=845&hl=th', inforum = 58, inthread = 845, incalendar = 0, badlocation = 0
WHERE sessionhash = '122a4492f1ad4d9b896966deb0020880';

MySQL Error  : MySQL server has gone away
Error Number  : 2006
Request Date  : Wednesday, August 5th 2009 @ 07:22:15 PM
Error Date    : Wednesday, August 5th 2009 @ 07:23:36 PM
Script        : http://glitchpc.com/forums/showthread.php?t=845&hl=th
Referrer      :
IP Address    : 66.249.71.172
Username      : Unregistered
Classname    : vB_Database
MySQL Version :


And again...

Code:

Database error in vBulletin 3.8.3:

Invalid SQL:

UPDATE vb_session
SET lastactivity = 1249514972, location = '/forums/showthread.php?t=845&hl=nl', inforum = 58, inthread = 845, incalendar = 0, badlocation = 0
WHERE sessionhash = '122a4492f1ad4d9b896966deb0020880';

MySQL Error  : MySQL server has gone away
Error Number  : 2006
Request Date  : Wednesday, August 5th 2009 @ 07:29:32 PM
Error Date    : Wednesday, August 5th 2009 @ 07:30:41 PM
Script        : http://glitchpc.com/forums/showthread.php?t=845&hl=nl
Referrer      :
IP Address    : 66.249.71.172
Username      : Unregistered
Classname    : vB_Database
MySQL Version :


Any ideas what's causing this?

cyc 08-05-2009 11:12 PM

Quote:

Originally Posted by Saviour (Post 1862224)
Just got the following database errors after Google and AdSense spidered the site:

Hi there

The first time a page is cached, it can take 5 or 10 seconds, your mysql connection is probably timing out.

open your /etc/my.cnf file with vi or similar editor.

There should be a setting called "wait_timeout" i'd increase it a little until the errors stop, ours is;

wait_timeout = 30

regards

Saviour 08-05-2009 11:34 PM

cyc...

Thanks for replying. I don't see the /etc/ directory you're referring to on my server.

I'm on a shared server...not sure if this makes a difference.

matthewhotdude 08-05-2009 11:36 PM

/etc/my.cnf

where the hell is that?

lol saviour me neither

cyc 08-05-2009 11:41 PM

Quote:

Originally Posted by Saviour (Post 1862240)
cyc...

Thanks for replying. I don't see the /etc/ directory you're referring to on my server.

I'm on a shared server...not sure if this makes a difference.

If you're have a shared hosting account you wont be able to edit that file.

Quote:

Originally Posted by matthewhotdude (Post 1862241)
/etc/my.cnf

where the hell is that?

lol saviour me neither

Its the configuration file for MySQL :)

Saviour 08-05-2009 11:56 PM

Which database though...

The forum database or the database for this mod?

Saviour 08-06-2009 12:02 AM

Nevermind...

It doesn't make any difference, since my host states this setting cannot be changed on a shared server. It's set by the host admin. Which means this mod is useless on a shared server.

Thanks for the help though, cyc...much appreciated.

Guess I'll have to uninstall this...

What a waste...

cyc 08-06-2009 12:12 AM

Quote:

Originally Posted by Saviour (Post 1862247)
Which database though...

The forum database or the database for this mod?

Hey

not a specific database, the MySQL server itself.

How many errors are you getting?

regards

Saviour 08-06-2009 12:17 AM

I've received 15 database errors within the last hour or so...

Needless to say...I've just uninstalled the whole thing...including the database.

I contacted the host...and they said there is no issue with either the forum or the translator database.

Since I cannot modify the file you're referring to...to me...there's no need to further waste your time trying to correct it. Since it's timing out...and I cannot make any changes to the file in question...I can't use this mod.

Thanks, anyway, for the help...

cyc 08-06-2009 12:22 AM

Quote:

Originally Posted by Saviour (Post 1862256)
I've received 15 database errors within the last hour or so...

Needless to say...I've just uninstalled the whole thing...including the database.

I contacted the host...and they said there is no issue with either the forum or the translator database.

Since I cannot modify the file you're referring to...to me...there's no need to further waste your time trying to correct it. Since it's timing out...and I cannot make any changes to the file in question...I can't use this mod.

Thanks, anyway, for the help...

no problem mate, someone else might have a different solution, stay subscribed to the thread. I was just sharing what I did to get around the same problem.

cheers

imported_silkroad 08-06-2009 02:59 AM

Quote:

Originally Posted by Saviour (Post 1862247)
Which database though...

The forum database or the database for this mod?

The problem on your end seems to be the overall MySQL database configuration (my.cnf is for the entire MySQL configuration).

Most shared hosting sites are not going to permit you to override these settings, so it will be difficult for you to get this mod to work on a shared hosting site if the settings are not correct.

This is not a problem with the mod because the mod must make a request to the Google translate API when a page is first translated, and this is slow because of the network and Google's process, not the mod. Plus, things are always slower on (most) shared hosting environments.

I don't recommend people on shared hosting run this mod, BTW. If you want to run something like this, move to a solution where you control the MySQL configuration, either dedicated hosting or a robust VPS.

Don't be frustrated, just upgrade :-)

Dave Hybrid 08-06-2009 09:56 AM

Quote:

Originally Posted by imported_silkroad (Post 1861662)
Hey!

I nominated the mod for MOTM, and sure enough, there it is and currently running in second place !!!

https://vborg.vbsupport.ru/showthread.php?t=219942

Go Man Go!

Nice one, thanks.:up:

Dave Hybrid 08-06-2009 09:58 AM

Quote:

Originally Posted by Saviour (Post 1862250)
Nevermind...

It doesn't make any difference, since my host states this setting cannot be changed on a shared server. It's set by the host admin. Which means this mod is useless on a shared server.

Thanks for the help though, cyc...much appreciated.

Guess I'll have to uninstall this...

What a waste...

Get a better host. :rolleyes:

Dave Hybrid 08-06-2009 10:00 AM

Quote:

Originally Posted by Saviour (Post 1862256)
I've received 15 database errors within the last hour or so...

Needless to say...I've just uninstalled the whole thing...including the database.

I contacted the host...and they said there is no issue with either the forum or the translator database.

Since I cannot modify the file you're referring to...to me...there's no need to further waste your time trying to correct it. Since it's timing out...and I cannot make any changes to the file in question...I can't use this mod.

Thanks, anyway, for the help...

You only get those emails as the first time you translate a BIG page it times mysql out, no error actually occurs, mysql just sends an email warning.

Your forum users notice nothing, at all, it's just an email and once your site is fully translated they go away to a point.

I put up with a few emails in trade of 10k daily uniques. :up:

imported_silkroad 08-06-2009 10:56 AM

Quote:

Originally Posted by Dave Hybrid (Post 1862450)
I put up with a few emails in trade of 10k daily uniques. :up:

Only 10K uniques/day :confused:

We are already getting 20K (more, hl=lang traffic) uniques per weekday after installing on July 14th :D

Dave Hybrid 08-06-2009 11:15 AM

Quote:

Originally Posted by imported_silkroad (Post 1862473)
Only 10K uniques/day :confused:

We are already getting 20K (more, hl=lang traffic) uniques per weekday after installing on July 14th :D

You have a load more threads than I do, I'd imagine you have more translated pages indexed.

imported_silkroad 08-06-2009 11:47 AM

Hi Dave,

Yes, things should get interesting in a few more weeks.

I hope you win MOTM. You deserve it. The other nominations are good, but this mod give real results.

Thanks for the great work.

Please add the capability to process Google Translate tags for notranslate in the next release. Thanks so much! We need to add this to our code tags. Cheers.

Dave Hybrid 08-06-2009 11:52 AM

I've been on holiday and am going here and there again over the next few months, but will work on a new release asap. If anyone has any suggestions leave them here please.

ThePixel 08-06-2009 12:30 PM

Hey :S is it sombody som can help me whit this :S ?

NLP-er 08-06-2009 01:29 PM

Quote:

Originally Posted by Saviour (Post 1862250)
Nevermind...

It doesn't make any difference, since my host states this setting cannot be changed on a shared server. It's set by the host admin. Which means this mod is useless on a shared server.

Thanks for the help though, cyc...much appreciated.

Guess I'll have to uninstall this...

What a waste...

Stop! It's working fine. This error is harmless! You can use this mod and it will work fine. After most pages will translate those errors will stop occures.

This error is not of this mod, but vbulettin. At the very end of request vbulletin just want to update date of last session activity - and it cannot because session is timeout. It doesn't affect in any way vbulletin or this mod. So you can just ignore it. Dave was working on this, but it looks that he abandon this issue since it is harmless - still annoying of course ;)

Dave Hybrid 08-06-2009 01:34 PM

Quote:

Originally Posted by NLP-er (Post 1862542)
Stop! It's working fine. This error is harmless! You can use this mod and it will work fine. After most pages will translate you those errors will stop occures.

This error is not of this mod, but vbulettin. At the very end of request vbulletin just want to update date of last session activity - and it cannot because session is timeout. It doesn't affect in any way vbulletin or this mod. So you can just ignore it. Dave was working on this, but it looks that he abandon this issue since it is harmless - still annoying of course ;)

I didnt abandon it, it cannot be fixed, BIG fresh pages take time to translate the first time round and mysql gets bored waiting, unless you set the php wait timeout to minutes it cannot be avoided (wgich is bad for security). I dont cmind anyway, it is just a stupid email warning, no error coccus at all and it does not effect the running of the site at all. I just send them to mysql@domain.com and forward them to their own folder in outlook. They can be ignored. As i said i can put up with them for 10k uniques a day, others reported 20k new uniques a day, so i guess they can put up with them also.;)

NLP-er 08-06-2009 01:35 PM

Quote:

Originally Posted by ThePixel (Post 1862520)
Hey :S is it sombody som can help me whit this :S ?

What's the issue?

NLP-er 08-06-2009 01:41 PM

Quote:

Originally Posted by Dave Hybrid (Post 1862547)
I didnt abandon it, it cannot be fixed, BIG fresh pages take time to translate the first time round and mysql gets bored waiting, unless you set the php wait timeout to minutes it cannot be avoided (wgich is bad for security). I dont cmind anyway, it is just a stupid email warning, no error coccus at all and it does not effect the running of the site at all. I just send them to mysql@domain.com and forward them to their own folder in outlook. They can be ignored. As i said i can put up with them for 10k uniques a day, others reported 20k new uniques a day, so i guess they can put up with them also.;)

I'm not so sure does it cannot be avoided. Just speculate. But if look into vBulletin source code you can find where exactly session is updated and check does there is a hook which can work after it.
Another possible solution (potentially easier) you already have in your mod - I was working on cache in this mod and have to fight with same problem. If translation takes too long then also connection to vBGT DB was lost. So I just reconnect. Did you try to reestablish connection to vBulletin database at the end of translation?...

Dave Hybrid 08-06-2009 01:52 PM

Quote:

Originally Posted by NLP-er (Post 1862555)
I'm not so sure does it cannot be avoided. Just speculate. But if look into vBulletin source code you can find where exactly session is updated and check does there is a hook which can work after it.
Another possible solution (potentially easier) you already have in your mod - I was working on cache in this mod and have to fight with same problem. If translation takes too long then also connection to vBGT DB was lost. So I just reconnect. Did you try to reestablish connection to vBulletin database at the end of translation?...

Everything i tried didnt work, if you have a code suggestion that works i'd be glad to add/test it.

NLP-er 08-06-2009 02:09 PM

Quote:

Originally Posted by Dave Hybrid (Post 1862563)
Everything i tried didnt work, if you have a code suggestion that works i'd be glad to add/test it.

It's not related with cache and I have lot of other work right now :) I gave you direction - go for it :)

In maintime I think it would be good to describe it as Known Issues - people would be prepared for this and didn't panic ;)

yahoooh 08-06-2009 05:00 PM

hello

i installed this in my site which use utf-8 encoding
and i use vbseo that make threads url using arabic font

i see that the translate not working in thread url that have arabic words in its address
but only translate any english url address

also i use vba links which using its seo and vba dynamic which also use its seo
now how to make this addon at least translate pages that have url arabic

this occur only in threads but in groups and other thing works perfect



also i found another issue in NLP site :
http://www.forum.simple-nlp.pl/tags/...%87.html?hl=ar

NLP-er 08-06-2009 11:18 PM

Quote:

Originally Posted by yahoooh (Post 1862686)
also i found another issue in NLP site :
http://www.forum.simple-nlp.pl/tags/...%87.html?hl=ar

This is not issue of this mod but of vbSEO (you can see that it will be same for URL without hl param - also error message). vbSEO doesn't change special letters in URL's for tags, i.e. 'ś' to 's' (I wrote to them about this - no result).

yahoooh 08-07-2009 12:19 AM

i already fix this by change my forum and db to utf-8
it works perfect but the issue is :
i see that the translate not working in thread url that have arabic words in its address
but only translate any english url address

this issue only affect the threads of forum

yaku 08-07-2009 03:31 AM

One problem for me: I'm getting this error message when I try to run this. Any ideas?

Parse error: syntax error, unexpected '<' in /translateflags.php on line 10

NLP-er 08-07-2009 10:34 AM

Quote:

Originally Posted by yaku (Post 1862901)
One problem for me: I'm getting this error message when I try to run this. Any ideas?



Parse error: syntax error, unexpected '<' in /translateflags.php on line 10

My idea is you was editing this file and made somesthing wrong :) Download oryginal file - made copy before changes and then change :)

NLP-er 08-07-2009 10:36 AM

Quote:

Originally Posted by yahoooh (Post 1862856)
i already fix this by change my forum and db to utf-8
it works perfect but the issue is :
i see that the translate not working in thread url that have arabic words in its address
but only translate any english url address


this issue only affect the threads of forum

Can you show me this behaviour? I'm not sure what you mean by "thread url that have arabic words in its address". Could you copy here good and bad link?

Dave Hybrid 08-07-2009 10:42 AM

All URLs on the Internet anywhere in the world only allow English characters.

imported_silkroad 08-07-2009 12:15 PM

Quote:

Originally Posted by NLP-er (Post 1863008)
Can you show me this behaviour? I'm not sure what you mean by "thread url that have arabic words in its address". Could you copy here good and bad link?

vBSEO has an option to replace/remove/keep non-English chars in the URL:

Quote:

Replace Non-English Characters in URLs?

Select 'Yes' to replace non-English characters with their English equivalent. Enable this option if your forums are not in English or if any non-English characters occur in your forums (E.g. Caf?)


All times are GMT. The time now is 03:55 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.02380 seconds
  • Memory Usage 1,867KB
  • 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
  • (7)bbcode_code_printable
  • (26)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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