PDA

View Full Version : Miscellaneous Hacks - vB Global Translator - Multiply your indexed pages & put search traffic on autopilot


Pages : 1 [2] 3

Dave Hybrid
07-05-2009, 11:15 AM
Ok, but i ran your duplication update a few days ago, i have to run it again for this update too?

NLP-er
07-05-2009, 11:50 AM
Ok, but i ran your duplication update a few days ago, i have to run it again for this update too?
YES! As I wrote - before my update it is possible that data are duplicated, when some pages are translated in same time. spiders usually works with friends ;) So since your last removal you have again duplication. It will not happen again after this update (ok it will but only for table wt_cache - it's mysql limitation, but tables with biggest amount of data will not have duplicated data again).

Dave Hybrid
07-05-2009, 12:59 PM
Understood, i'll try again in a bit and then update the main install. Thanks.

jaryx
07-05-2009, 04:36 PM
Does anyone use vBseo Relevant Replacement?

RR also be translated? Unfortunately, not on my forum :/

mike2902
07-05-2009, 07:40 PM
Can someone help me understand this. The goal of this MOD is to get a flood of international traffic. This traffic is unlikely to stick around because of the language issue so whats the point of wanting all this traffic.

Dave Hybrid
07-05-2009, 08:30 PM
Can someone help me understand this. The goal of this MOD is to get a flood of international traffic. This traffic is unlikely to stick around because of the language issue so whats the point of wanting all this traffic.

Same reason you want normal traffic, not everyone wants to stay and chat with them either.

For me I use it for ad revenue, branding, future referrals from word of mouth to UK traffic, it's free exposure.

Your mileage may vary.

Dave Hybrid
07-05-2009, 08:50 PM
Hello. Just worked out for you another data base update which will made it without data duplication and also faster :)

So really on one table still you can have duplicated data, because of mysql unique limitations I didn't set it in wt_cache, but this table has less data than other updated tables.

Also collate was changed - believe it works faster when makes collation by binary values, that by some additional rules like in previous DB.

To have faster DB without data duplication You have to.

For new installations
Here is new DB:

CREATE TABLE wt_cache (
id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
tl VARCHAR(10),
originaltext VARCHAR(65000),
translated TEXT,
INDEX(originaltext(50), tl)
) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_bin;

CREATE TABLE wt_cache_medium (
id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
tl VARCHAR(10),
originaltext VARCHAR(255),
translated VARCHAR(1000),
UNIQUE (originaltext, tl)
) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_bin;

CREATE TABLE wt_cache_short (
id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
tl VARCHAR(10),
originaltext VARCHAR(50),
translated VARCHAR(255),
UNIQUE (originaltext, tl)
) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_bin;


Also change code in translate.php
this one:

/* Check cache for translation */
if ($enablecache) {
$sql=null;
$length = strlen($text);
if ($length<=50) {
$sql = mysql_query("SELECT translated FROM wt_cache_short WHERE originaltext='".addslashes($text)."' AND tl='".addslashes($tl)."' LIMIT 1");
} else if ($length > 255) {
$sql = mysql_query("SELECT translated FROM wt_cache WHERE originaltext='".addslashes($text)."' AND tl='".addslashes($tl)."' LIMIT 1");
} else {
$sql = mysql_query("SELECT translated FROM wt_cache_medium WHERE originaltext='".addslashes($text)."' AND tl='".addslashes($tl)."' LIMIT 1");
}

while($t = mysql_fetch_array($sql)) {
return $lsto.$t['translated'].$rsto;
}
}
/* -- if not found, proceed with Google Translate */


To this one:

/* Check cache for translation */
if ($enablecache) {
$sql=null;
$length = strlen($text);

if ($length<=50) {
$sql = mysql_query("SELECT translated FROM wt_cache_short WHERE originaltext='".addslashes($text)."' AND tl='".addslashes($tl)."'") or die('Query to short cache failed: ' . mysql_error());
} else if ($length > 255) {
$sql = mysql_query("SELECT translated FROM wt_cache WHERE originaltext='".addslashes($text)."' AND tl='".addslashes($tl)."' LIMIT 1") or die('Query to normal cache failed: ' . mysql_error());
} else {
$sql = mysql_query("SELECT translated FROM wt_cache_medium WHERE originaltext='".addslashes($text)."' AND tl='".addslashes($tl)."'") or die('Query to medium cache failed: ' . mysql_error());
}

while($t = mysql_fetch_array($sql)) {
return $lsto.$t['translated'].$rsto;
}
}
/* -- if not found, proceed with Google Translate */


And change this one:

////////////////////////////////////////////////////
if ($enablecache) {
mysql_connect ($mysqlserver, $dbusername, $dbpassword);
mysql_select_db ($dbname);
mysql_set_charset('utf8');
}
////////////////////////////////////////////////////


To this one (less white screns):

////////////////////////////////////////////////////
if ($enablecache) {
establishConnection();
}


function establishConnection() {
global $dbusername, $dbpassword, $mysqlserver, $dbname;
mysql_connect ($mysqlserver, $dbusername, $dbpassword) or die('Could not connect: ' . mysql_error());
mysql_select_db ($dbname) or die('Could not select database');
mysql_set_charset('utf8');
}
////////////////////////////////////////////////////


And last change. This one:

/* Save to cache */
if ($enablecache && (strlen($ttext)>0)) {
$length = strlen($text);
if ($length<=50) {
mysql_query("INSERT INTO wt_cache_short SET tl='".addslashes($tl)."', originaltext='".addslashes($text)."', translated='".addslashes(trim($ttext))."'");
} else if ($length > 255) {
mysql_query("INSERT INTO wt_cache SET tl='".addslashes($tl)."', originaltext='".addslashes($text)."', translated='".addslashes(trim($ttext))."'");
} else {
mysql_query("INSERT INTO wt_cache_medium SET tl='".addslashes($tl)."', originaltext='".addslashes($text)."', translated='".addslashes(trim($ttext))."'");
}
}
/* -- */


To this one:

/* Save to cache */
if ($enablecache && (strlen($ttext)>0)) {
$length = strlen($text);

if (!mysql_ping()) {
mysql_close();
establishConnection();
}

if ($length<=50) {
mysql_query("INSERT IGNORE INTO wt_cache_short SET tl='".addslashes($tl)."', originaltext='".addslashes($text)."', translated='".addslashes(trim($ttext))."'") or die('Insert to short cache failed: ' . mysql_error());
} else if ($length > 255) {
mysql_query("INSERT INTO wt_cache SET tl='".addslashes($tl)."', originaltext='".addslashes($text)."', translated='".addslashes(trim($ttext))."'") or die('Insert to normal cache failed: ' . mysql_error());
} else {
mysql_query("INSERT IGNORE INTO wt_cache_medium SET tl='".addslashes($tl)."', originaltext='".addslashes($text)."', translated='".addslashes(trim($ttext))."'") or die('Insert to medium cache failed: ' . mysql_error());
}
}
/* -- */


So whole new translate.php is:

<?php
////////////////////////////////////////////////////
// Global Translator API
////////////////////////////////////////////////////

global $enablesession, $enablecache, $originalEncoding, $fl;
global $dbusername, $dbpassword, $mysqlserver, $dbname;

////////////////////////////////////////////////////
// SETTINGS
////////////////////////////////////////////////////
$enablesession = false; //ignore
$enablecache = true; //true - enable cache setting, false - disable cache setting
$originalEncoding = 'iso-8859-1'; //refer to your forum source code for your base encoding
$fl = 'en'; //current language (original) - refer table for language variables

$dbusername = "SET_IT";
$dbpassword = "SET_IT";
$mysqlserver = "localhost";
$dbname = "SET_IT";

////////////////////////////////////////////////////

if ($enablesession) {
@session_name("iPWTLang");
@session_start();
}


set_time_limit(0);


////////////////////////////////////////////////////
if ($enablecache) {
establishConnection();
}


function establishConnection() {
global $dbusername, $dbpassword, $mysqlserver, $dbname;
mysql_connect ($mysqlserver, $dbusername, $dbpassword) or die('Could not connect: ' . mysql_error());
mysql_select_db ($dbname) or die('Could not select database');
mysql_set_charset('utf8');
}
////////////////////////////////////////////////////

function api_strip ($dt) { $dt = str_replace("\\\\", '\\', $dt); return ($dt); }

function emodfix ($dt) { $dt = str_replace('\"', '"', $dt); return ($dt); }

function remove_tags ($html) {
/* Remove reserved triple tags in html */
return preg_replace ("|<<<([^><]*)>>>|e", "emodfix('\\1')", $html);
}

function add_tags ($buffer) {
/* Inject triple tags to html to preserve html content from translation using ob_start */
return preg_replace("/(^|>\/?)([^><]*)($|\/?<)/e",
"emodfix('\\1').'<<<'.emodfix('\\2').'>>>'.emodfix('\\3')",
$buffer);
}

function getServerLoad($windows=false)
{
//MY CODE TO DISABLE SERVER LOAD CHEcKING
return 1;
//END

$os = strtolower(PHP_OS);
if (strpos($os, "win") === false) {
if (file_exists("/proc/loadavg")) {
$data = file_get_contents("/proc/loadavg");
$load = explode(' ', $data);
return $load[0];

} elseif (function_exists("shell_exec")) {

$load = explode(' ', `uptime`);
return $load[count($load)-1];

} else {

return false;
}

} elseif($windows) {

if(class_exists("COM")) {
$wmi = new COM("WinMgmts:\\\\.");
$cpus = $wmi->InstancesOf("Win32_Processor");

$cpuload = 0;
$i = 0;

if(version_compare('4.50.0', PHP_VERSION) == 1) {
// PHP 4
while ($cpu = $cpus->Next()) {
$cpuload += $cpu->LoadPercentage;
$i++;
}

} else {

// PHP 5
foreach ( $cpus as $cpu ) {
$cpuload += $cpu->LoadPercentage;
$i++;
}
}

$cpuload = round($cpuload / $i, 2);
return "$cpuload%";

} else {

return false;
}
}
}

function translate($text, $fl, $tl){
if (trim($text) == null) return $text; //skip translation if string empty

/* Retain left and right spaces after translation */
$lsto = substr($text, 0, strlen($text) - strlen(ltrim($text)));
$rsto = substr($text, strlen(rtrim($text)), strlen($text) - strlen(rtrim($text)));
/* -- */

/* Declare global */
global $enablecache,$overloadval,$disinterval;
if(floatval(getServerLoad()) >= 1.5) // Numeral = server load on which to crash
{

// Write current time to file.
$fp = fopen("overloadcache.txt","w");
fwrite($fp, time() . "");
fclose($fp);


if($nfh= @fopen("overloadcache.txt","r"))
{
$overloadtime = fgets($nfh);
if($overloadtime > time()-30) // Numeral = # seconds after overload not to cache!
{
$enablecache = false;
}
fclose($nfh);
}
}

/* Check for server overloads (modification by DeViAnThans3)*/
global $originalEncoding;
if ($originalEncoding != 'utf-8') {
$text = iconv($originalEncoding, 'utf-8', trim($text));
} else {
$text = trim($text);
}

/* Check cache for translation */
if ($enablecache) {
$sql=null;
$length = strlen($text);
/*
if (!mysql_ping()) {
mysql_close();
establishConnection();
}
*/
if ($length<=50) {
$sql = mysql_query("SELECT translated FROM wt_cache_short WHERE originaltext='".addslashes($text)."' AND tl='".addslashes($tl)."'") or die('Query to short cache failed: ' . mysql_error());
} else if ($length > 255) {
$sql = mysql_query("SELECT translated FROM wt_cache WHERE originaltext='".addslashes($text)."' AND tl='".addslashes($tl)."' LIMIT 1") or die('Query to normal cache failed: ' . mysql_error());
} else {
$sql = mysql_query("SELECT translated FROM wt_cache_medium WHERE originaltext='".addslashes($text)."' AND tl='".addslashes($tl)."'") or die('Query to medium cache failed: ' . mysql_error());
}

while($t = mysql_fetch_array($sql)) {
return $lsto.$t['translated'].$rsto;
}
}
/* -- if not found, proceed with Google Translate */

/* -Establish cURL connection to Google Translate API server- */
$ch = @curl_init();
//@curl_setopt($ch, CURLOPT_URL, "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&langpair=".urlencode($fl.'|'.$tl)."&q=".urlencode($text));

@curl_setopt($ch, CURLOPT_URL, "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&langpair=".urlencode($fl.'|'.$tl)."&q=".urlencode($text));

//$postParams = "v=1.0&langpair=".$fl.'|'.$tl."&q=".iconv('iso-8859-2', 'utf-8', $text);
//@curl_setopt($ch, CURLOPT_URL, "http://ajax.googleapis.com/ajax/services/language/translate");
//@curl_setopt ($Curl_Session, CURLOPT_POST, 1);
//@curl_setopt ($Curl_Session, CURLOPT_POSTFIELDS, $postParams);

@curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)");
@curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$in = @curl_exec ($ch);
/* -End connection- */

preg_match('/{"translatedText":"(.*?)"}/', $in, $out);
//$ttext = conv(api_strip($out[1]));
$ttext = str_replace ('\u0026', '&' , api_strip($out[1]));
//$ttext = api_strip($out[1]);
//$ttext = unicode_encode(api_strip($out[1]), 'utf-8');

/* Save to cache */
if ($enablecache && (strlen($ttext)>0)) {
$length = strlen($text);

if (!mysql_ping()) {
mysql_close();
establishConnection();
}

if ($length<=50) {
mysql_query("INSERT IGNORE INTO wt_cache_short SET tl='".addslashes($tl)."', originaltext='".addslashes($text)."', translated='".addslashes(trim($ttext))."'") or die('Insert to short cache failed: ' . mysql_error());
} else if ($length > 255) {
mysql_query("INSERT INTO wt_cache SET tl='".addslashes($tl)."', originaltext='".addslashes($text)."', translated='".addslashes(trim($ttext))."'") or die('Insert to normal cache failed: ' . mysql_error());
} else {
mysql_query("INSERT IGNORE INTO wt_cache_medium SET tl='".addslashes($tl)."', originaltext='".addslashes($text)."', translated='".addslashes(trim($ttext))."'") or die('Insert to medium cache failed: ' . mysql_error());
}
}
/* -- */

return $lsto.$ttext.$rsto;
}


function callback($buffer){
global $fl;
$modifyhref = false;
//-------------------------------------------------------------------------------
global $enablesession;

// Get language setting from queries:
$lang = stripslashes(@$_GET['hl']);

if ($enablesession) {
// Save setting to server session [1]
// If language setting not found in queries, check session data: [2]
if (checklang($lang)) $_SESSION['lang'] = $lang; else $lang = @$_SESSION['lang'];
}

if (!checklang($lang) || $lang == $fl) { // If invalid language setting or language = original language, skip translation.

$tp = $buffer;
$tp = preg_replace("/<disp_lang>/is", checklang($fl), $tp);
return remove_tags($tp);

} else {
// Extract BUFFER
$tp = preg_replace("/(^|>\/?)([^><]*)($|\/?<)/e",
"emodfix('\\1').translate(emodfix('\\2'),'$fl','$la ng').emodfix('\\3')",
$buffer);

if ($modifyhref) {
$tp = preg_replace('/(<a [^><]*href\=")([^"]*)("[^><]*>)/e',
"emodfix('\\1').langconv('$lang',emodfix('\\2')).em odfix('\\3')",
$tp);

$tp = preg_replace('/(<form [^><]*action\=")([^"]*)("[^><]*>)/e',
"emodfix('\\1').langconv('$lang',emodfix('\\2')).em odfix('\\3'))",
$tp);
}

$tp = preg_replace("/<disp_lang>/is", checklang($lang), $tp);
$tp = remove_tags($tp);
return $tp;

}
//---end function
}

function langconv($hl, $href){
if ($href && substr($href, 0, 7) != 'http://' && substr($href, 0, 11) != 'javascript:' && strpos($href, "#") === false) {
if(strpos($href, "?") === false) return $href.'?hl='.urlencode($hl); else return $href.'&hl='.urlencode($hl);
} else { return $href; }
}

function checklang($hl){
$langvar = array ("sq"=>"Albanian","ar"=>"Arabic","bg"=>"Bulgarian","ca"=>"Catalan","zh-CN"=>"Chinese","hr"=>"Croatian","cs"=>"Czech","da"=>"Danish","nl"=>"Dutch","en"=>"English","et"=>"Estonian","tl"=>"Filipino","fi"=>"Finnish","fr"=>"French","gl"=>"Galician","de"=>"German","el"=>"Greek","iw"=>"Hebrew","hi"=>"Hindi","hu"=>"Hungarian","id"=>"Indonesian","it"=>"Italian","ja"=>"Japanese","ko"=>"Korean","lv"=>"Latvian","lt"=>"Lithuanian","mt"=>"Maltese","no"=>"Norwegian","pl"=>"Polish","pt"=>"Portuguese","ro"=>"Romanian","ru"=>"Russian","sr"=>"Serbian","sk"=>"Slovak","sl"=>"Slovenian","es"=>"Spanish","sv"=>"Swedish","zh-TW"=>"Taiwanese","th"=>"Thai","tr"=>"Turkish","uk"=>"Ukrainian","vi"=>"Vietnamese");
foreach ($langvar as $i => $val){ if ($i == $hl) return $val; }
return false;
}

function clearlangsetting(){
global $enablesession;
if ($enablesession) $_SESSION['lang'] = null; /* -Clear lang session data on server- */
}

?>


Hope Dave will include it in next release.

Now - for already installed products
Here we have 2 ways. Easy one, and good one.

In easy one - just drop all tables from DB, set it from new script and change translate.php like described.

In good one - you want to keep already cached data, and this will need some changes.
1. change translate.php like described
2. dissable cache - set $enablecache=false; in translate.php
3. change collate by executing:

Alter table wt_cache_short collate utf8_bin;
ALTER TABLE wt_cache_short CHANGE tl tl VARCHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;
ALTER TABLE wt_cache_short CHANGE originaltext originaltext VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;
ALTER TABLE wt_cache_short CHANGE translated translated VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;

Alter table wt_cache_medium collate utf8_bin;
ALTER TABLE wt_cache_medium CHANGE tl tl VARCHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;
ALTER TABLE wt_cache_medium CHANGE originaltext originaltext VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;
ALTER TABLE wt_cache_medium CHANGE translated translated VARCHAR( 1000 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;

Alter table wt_cache collate utf8_bin;
ALTER TABLE wt_cache CHANGE tl tl VARCHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;
ALTER TABLE wt_cache CHANGE translated translated TEXT CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;
ALTER TABLE wt_cache CHANGE translated translated VARCHAR( 65000 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;


4. Delete data duplication like described here (note this is very important - otherwise unique indexes will not be set): https://vborg.vbsupport.ru/showpost.php?p=1842327&postcount=214

Note that this step if very time consuming and probably you will need to connect to DB with other client that WWW. Remember - always you can use the easy way ;)

5. Optimize tables:

OPTIMIZE TABLE wt_cache, wt_cache_medium, wt_cache_short;


6. Reindex to unique:

alter table wt_cache_short drop index originaltext;
create UNIQUE INDEX originaltext on wt_cache_short (originaltext, tl);

alter table wt_cache_medium drop index originaltext;
create UNIQUE INDEX originaltext on wt_cache_medium (originaltext, tl);


7. enable cache - set $enablecache=true; in translate.php


And that is. As I wrote data duplication will disappear for ever from wt_cache_short and wt_cache_medium. Also it will be save in case of hazard described in my 2 previous posts. Also according to my automatic tests - page generation works faster.

So - enjoy :D

So what happens to saver and cleaner? Do these stay or can i remove them? Thanks.

Dave Hybrid
07-05-2009, 10:02 PM
We'll I tried again with your new update.

Had to get my host to run this bit as it times out in the browser.

4. Delete data duplication like described here (note this is very important - otherwise unique indexes will not be set):

They say the query is stuck on delete from cleaner...

So i am going to stick with the current update for now.

NLP-er
07-05-2009, 10:05 PM
So what happens to saver and cleaner? Do these stay or can i remove them? Thanks.

Those can stay for future wt_cache duplication cleaning - this is only table where duplications still can happen. Fortunately there is less records than in other tables, and it is rare to write there translations (till now in my DB i have 380 000 rows in wt_cache_short; 210 000 in wt_cache_medium; and only 65 000 in wt_cache).

wt_cache cannot have unique index for whole oryginaltext and tl, because oryginaltext is too big for that, and making it's unique only for part of it has some disadvantages. I made tests and mysql allows me to set unique index olny for first 323 letters from oryginaltest and whole tl. So if I do that, then data duplication will be a history in this mod - that's the good part. Worst part is that if we will have 2 different translations with same first 323 letters, then only first one will be cached, and second one will be translated by google every time when page will be generated.

I also realize that it is rare to have 2 different posts which starts from such long same text (323 letters), but it is possible - especially when users like to quote others posts. I've just made a query and I have such cases in my cache. So we can have actual solution which allows data duplication, but we know how to delete duplicated data, and once translated text will never be translated again. Or change it to solution where duplication never happens, but we have small chance that some texts will be translated over and over again. Usually when someone quotes other long post, and removes some part at the end – in such case we have 1 long translation of whole original text and one long translation of shorter quoted text. Now both are cashed - if we set unique index on wt_cache then one of those will be translated each time when page is generated.

So - If users want this solution I can give the solution. Who wants it?


But , till wt_cache allows for data duplication - I advice to let cleaner and saver tables stay (you can delete all data from there). Empty tables doesn't bother anyone, and can be helpful for cleaning wt_cache from time to time. In my installation I will keep those at least till I crawl all translation sites with my spider. And probably let them stay after that too.

NLP-er
07-05-2009, 10:19 PM
We'll I tried again with your new update.

Had to get my host to run this bit as it times out in the browser.

4. Delete data duplication like described here (note this is very important - otherwise unique indexes will not be set):

They say the query is stuck on delete from cleaner...

So i am going to stick with the current update for now.

Just as I wrote:
Note that this step if very time consuming and probably you will need to connect to DB with other client that WWW. Remember - always you can use the easy way ;)

New solution is better and faster. For those who makes fresh install it is same easy as it is right now. For update - 2 ways easy: one and good one.

If you cannot handle the good one, and still want have your cache - so ok, you can stay with old version. But I think that for users it would be good if you test new solution in fresh install (if have difficulties on old one) - see it works fine, and make it official release - for all new users, who I think would like to have faster DB without data duplication.

Dave Hybrid
07-05-2009, 10:22 PM
So you suggest I now release 2 versions, one for new and one for people who want to keep their old cache. I really don't think it's that much of a big deal. I appreciate your work but I think I speak for most when I say i want to keep my 1gig database that took time to grow. I cannot maintain two releases.

Dave Hybrid
07-05-2009, 10:24 PM
FYI my host tried with a Mysql desktop client and it stopped on delete from cleaner.

NLP-er
07-05-2009, 11:32 PM
Hello one little DB update, after which DB will be faster.
(Index will be larger, but also faster - more unique records in index)

Note that this update is independent of last one, so hope Dave will include it in official release even if the last one will wait a little.

Whole change is about index size for originaltext - it was changed from 50 to 323 (max according to mysql limitations).

For new installations - code for wt_cache is different now:

CREATE TABLE wt_cache (
id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
tl VARCHAR(10),
originaltext VARCHAR(65000),
translated TEXT,
INDEX(originaltext(323), tl)
) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_bin;


For update just execute:

alter table wt_cache drop index originaltext;
create INDEX originaltext on wt_cache(originaltext(323), tl);


As I wrote it is faster. Here you have results of test before update:
MIN: 3141 MAX: 9109 AVG: 5389
MIN: 3297 MAX: 24891 AVG: 5252
MIN: 2828 MAX: 7500 AVG: 4296

MIN: 2609 MAX: 25594 AVG: 5934
MIN: 3438 MAX: 7890 AVG: 4782
MIN: 3578 MAX: 5485 AVG: 4196
TOTAL AVG: 4974

And here after update:
MIN: 2813 MAX: 28016 AVG: 5785
MIN: 2813 MAX: 5187 AVG: 4021
MIN: 3016 MAX: 5109 AVG: 4159

MIN: 2953 MAX: 6750 AVG: 4228
MIN: 2735 MAX: 7938 AVG: 4109
MIN: 3359 MAX: 7125 AVG: 4607
TOTAL AVG: 4484

Each test was generating 20 translated pages in each series. There was 3 series for each test. Each test was executed twice. Times are in ms.

Note that there is still place for some little improvements - like column tl uses max 5 signs and is set for 10... Also it is enough for tl to set encoding 'iso-8859-1' instead of utf8, so it will reserve only 5 bytes in index instead 30 like now, and index for originaltext will be longer to something like 331 letters (now upgraded have 323). But it shouldn’t give any significant speed improvements. So I leave this topic.

NLP-er
07-05-2009, 11:34 PM
FYI my host tried with a Mysql desktop client and it stopped on delete from cleaner.

Delete from cleaner should be immediate. Are you sure you established connection to DB? Can you execute any query?
Did you try execute just delete from cleaner - without other queries? Does your client needs semicolon at the end of query? Make sure you executed delete from cleaner; with semicolon. It is possible that when you did it without semicolon server still waits for rest of instruction :)

NLP-er
07-05-2009, 11:43 PM
So you suggest I now release 2 versions, one for new and one for people who want to keep their old cache. I really don't think it's that much of a big deal. I appreciate your work but I think I speak for most when I say i want to keep my 1gig database that took time to grow. I cannot maintain two releases.

No. I was suggesting to release new version, and those who wants can upgrade, those who wants can stay with old one, and new members will start form the new one - just like it happens with every update in every mod :) Was just telling you to test it on clear instance, so you will be sure that what you releasing works.

Your mod - your releases - your decisions. I gave update instrucions so it is possible to update without any data loss, and of course it is time consuming when you have such big database. I'm going right now on updated version :)

1Unreal
07-06-2009, 03:37 AM
Would you be able to create something which will detect the users language. You can get it from $_SERVER['HTTP_ACCEPT_LANGUAGE']. It gives a list of their accepted languages.

Dave Hybrid
07-06-2009, 10:20 AM
v2.3b

* Small change to database optimization

To upgrade;

Run this MySQL query.

alter table wt_cache drop index originaltext;
create INDEX originaltext on wt_cache(originaltext(323), tl);

Sweeks
07-06-2009, 11:50 AM
Thanks for the update :) Dont know if I see a speed increase but it's functioning just fine :)

Dave Hybrid
07-06-2009, 12:32 PM
Thanks for letting me know sweeks! :up:

Geraldm
07-06-2009, 01:18 PM
Ok I'm a bit confused with all the different updates throughout this thread .... I'm still using v2.0 of the script. Can you please tell me the easiest way to upgrade to v2.3b while preserving the translations already in the DB?

Thanks,
Gerald.

Dave Hybrid
07-06-2009, 01:20 PM
Follow the links in the main post and work through the updates, should only take a few minutes.

NLP-er
07-06-2009, 02:48 PM
Thanks for the update :) Dont know if I see a speed increase but it's functioning just fine :)

As I show in tests results - average difference was 0,5 second - it can be hard to notice it by you, but your server will see the difference when handling several translations in same time :)

NLP-er
07-06-2009, 02:53 PM
Ok I'm a bit confused with all the different updates throughout this thread .... I'm still using v2.0 of the script. Can you please tell me the easiest way to upgrade to v2.3b while preserving the translations already in the DB?

Thanks,
Gerald.

As wrote Dave - fallow instructions in links, als okeep in mind that you have to made it all. So you cannot just jump from 2.0 to 2.3b - you have to first made updates to 2.1, then to 2.2 and so on :) And by updates I mean DB updates, because translate.php (and plugin code) you can take just from final version.

Also note - it is wise to dissable cache before you start making any changes, and enable if after upgrate is finished. Otherwise you can have errors, because of differend DB state and dfferent translate.php instructions.

isatice
07-06-2009, 04:54 PM
thanks , but could u edit it , in a way that , other languages also work ?

Dave Hybrid
07-06-2009, 05:20 PM
thanks , but could u edit it , in a way that , other languages also work ?

Please explain, not sure what you mean...?

imedic
07-06-2009, 05:47 PM
Great idea of a mod. Helpful for sure. I am watching this with interest. I am planning to install it in short time.

I have a suggestion from user pov:

For example: If you land on and English forum with a Polish search (on the Polish translation) you might be confuse the forum to a local one and try to post in Polish. (don't assume all users know at least a 10th of what you know. They don't. )

You can address this with an warning under the flags (big letters) that forum is translated, original content being in English.

" You are reading on a Polish translation of the original forum (in English). You can register here for free!" (for example)

Problem is you need this translated too in all languages and to appear in corespondent translations.

You may want to let admin decide what to put inside as a text because it might happen there are some subforums in Polish but he landed on the English part. So you may suggest:

"If you find this interesting you might visit our Polish section here."

With this you address a previously raised concern about the utility of this mod. Is understandable a Polish person will run from a translated site very fast but in case he knows English it might interest him. Hence you can get more users.

I am saying this because I have an International forum in English (I plan to add some 2-3 additional languages forums) but I rely also on users not native in English but interested in the subject (Aliens in my case :) )

I think best way is to make a phrase (so we can edit and customize) under flags and to be translated by Google in respective language.

I am waiting a little and take a shot at it. I need also to clear how links will be constructed under VBSEO (as I have this installed too).
Again thanks and congratulation on great idea MOD from traffic pov but also from international accessibility pov to a foreign language content.

racale
07-06-2009, 06:14 PM
This product works with version 3.8.3
I tried but it does not work
thanks

Megatr0n
07-06-2009, 11:23 PM
David, we still keep getting that DB error? Will a fix be released for this soon?

Dave Hybrid
07-07-2009, 10:48 AM
David, we still keep getting that DB error? Will a fix be released for this soon?

It's impossible to fix as far as we know, some long pages on your sites take a few mins to translate, MySQL doesn't like having a connection open that long while big pages are written to the database, nothing I can do after much trying. They will go away when your site is translated fully and do not impact the running of your site in any way. They are false warnings in effect.

Dave Hybrid
07-07-2009, 10:50 AM
To combat them I set a new email in vb config and an outlook rule and now they all go to their own folder in outlook. No big deal.

NLP-er
07-07-2009, 12:09 PM
To combat them I set a new email in vb config and an outlook rule and now they all go to their own folder in outlook. No big deal.

What do you think Dave to write about it in mod description as known issues instead of telling new people about it over and over again... :) I saw question about this issue so many times... Also in PM.

NLP-er
07-07-2009, 01:20 PM
Was asking about miracle - I give you miracle. I changed one query in deletion of duplicated data and now it is very fast. I will just tell that before changes 1 query on 100 000 rows with 1000 duplicated rows took 10 minutes before update, now it takes less than 1 second!!! :D

So cleaning each table has 5 queries. 2 are instant, 2 are very fast and one took me 7 seconds on 100 000 rows - this one cannot be optimized, there is no any subquery, we just need to ask DB about those data.

Hope now Dave will made new official release, which will not allow for data duplication in 2 of our 3 cache tables, and makes whole mod works faster, and your DB smaller.

Below you have again full and updated description how to clean duplicated data. I was able to run this by my browser client, but be aware, that in case of some large databases, server can go away by this client and in such case you will need to use some other client than www.

Also note that if you made changes described here (https://vborg.vbsupport.ru/showpost.php?p=1842972&postcount=242) which I hope will be included in official release, then you will not have to remove duplicated data from wt_cache_short and wt_cache_medium anymore (only once during described procedure). And after that only wt_cache will need to delete duplicated data from time to time.

So here you have again description and procedure, but much faster this time :):
If you would like to check do you have data duplication in your cache execute those queries (time consuming). Execute one by one - each one works on other cache table and tells you how many times and which data is duplicated (1st column duplication counter, 2nd for which originaltext, 3rd for which language):

select count(*) counter, originaltext, tl from wt_cache group by originaltext, tl having count(*) > 1 order by counter desc;

select count(*) counter, originaltext, tl from wt_cache_short group by originaltext, tl having count(*) > 1 order by counter desc;

select count(*) counter, originaltext, tl from wt_cache_medium group by originaltext, tl having count(*) > 1 order by counter desc;


If you want to delete data duplication first need to create 2 tables for temporary data:

CREATE TABLE saver (
id INT,
tl VARCHAR(10),
originaltext VARCHAR(65000)
) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_general_ci;

CREATE TABLE cleaner (
id INT
) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_general_ci;


And when you have those you can execute clearing queries - note those will leave first translation in your database and only remove next translations for same text and language.

delete from cleaner;
delete from saver;
insert into saver (SELECT min(id) as id, tl, originaltext from wt_cache group by originaltext,tl having count(*) > 1);
insert into cleaner (SELECT cache.id from saver, wt_cache cache where saver.originaltext=cache.originaltext and saver.tl=cache.tl and saver.id<>cache.id);
DELETE FROM wt_cache USING wt_cache INNER JOIN cleaner ON wt_cache.id = cleaner.id;

delete from cleaner;
delete from saver;
insert into saver (SELECT min(id) as id, tl, originaltext from wt_cache_short group by originaltext,tl having count(*) > 1);
insert into cleaner (SELECT cache.id from saver, wt_cache_short cache where saver.originaltext=cache.originaltext and saver.tl=cache.tl and saver.id<>cache.id);
DELETE FROM wt_cache_short USING wt_cache_short INNER JOIN cleaner ON wt_cache_short.id = cleaner.id;

delete from cleaner;
delete from saver;
insert into saver (SELECT min(id) as id, tl, originaltext from wt_cache_medium group by originaltext,tl having count(*) > 1);
insert into cleaner (SELECT cache.id from saver, wt_cache_medium cache where saver.originaltext=cache.originaltext and saver.tl=cache.tl and saver.id<>cache.id);
DELETE FROM wt_cache_medium USING wt_cache_medium INNER JOIN cleaner ON wt_cache_medium.id = cleaner.id;

racale
07-07-2009, 01:33 PM
This product works with version 3.8.3
I tried but it does not work
thanks



Code:

CREATE TABLE wt_cache (
id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
tl VARCHAR(10),
originaltext VARCHAR(65000),
translated TEXT,
INDEX(originaltext(323), tl)
) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_bin;

CREATE TABLE wt_cache_medium (
id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
tl VARCHAR(10),
originaltext VARCHAR(255),
translated VARCHAR(1000),
INDEX (originaltext, tl)
) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_general_ci;

CREATE TABLE wt_cache_short (
id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
tl VARCHAR(10),
originaltext VARCHAR(50),
translated VARCHAR(255),
INDEX (originaltext, tl)
) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_general_ci;


https://vborg.vbsupport.ru/external/2009/07/31.gif

NLP-er
07-07-2009, 01:43 PM
This product works with version 3.8.3
I tried but it does not work
thanks



Code:

CREATE TABLE wt_cache (
id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
tl VARCHAR(10),
originaltext VARCHAR(65000),
translated TEXT,
INDEX(originaltext(323), tl)
) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_bin;

CREATE TABLE wt_cache_medium (
id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
tl VARCHAR(10),
originaltext VARCHAR(255),
translated VARCHAR(1000),
INDEX (originaltext, tl)
) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_general_ci;

CREATE TABLE wt_cache_short (
id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
tl VARCHAR(10),
originaltext VARCHAR(50),
translated VARCHAR(255),
INDEX (originaltext, tl)
) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_general_ci;


https://vborg.vbsupport.ru/external/2009/07/31.gif

You already created table wt_cache :) If you want to update - just fallow update procedure, or drop table first (will lose all data if have any).

racale
07-07-2009, 02:08 PM
You already created table wt_cache :) If you want to update - just fallow update procedure, or drop table first (will lose all data if have any).

First of all I wanted to say that nn are very experienced

I'm running the full instructions ......
just that when I send Code: mida that error
I cancel the DB and tried to do anything but

I do not know how to do

https://vborg.vbsupport.ru/external/2009/07/29.gif

https://vborg.vbsupport.ru/external/2009/07/30.gif

NLP-er
07-07-2009, 03:17 PM
First of all I wanted to say that nn are very experienced

I'm running the full instructions ......
just that when I send Code: mida that error
I cancel the DB and tried to do anything but

I do not know how to do

https://vborg.vbsupport.ru/external/2009/07/29.gif

https://vborg.vbsupport.ru/external/2009/07/30.gif

You aready have DB set. So what is the problem?

Dave Hybrid
07-07-2009, 04:03 PM
Was asking about miracle - I give you miracle. I changed one query in deletion of duplicated data and now it is very fast. I will just tell that before changes 1 query on 100 000 rows with 1000 duplicated rows took 10 minutes before update, now it takes less than 1 second!!! :D

So cleaning each table has 5 queries. 2 are instant, 2 are very fast and one took me 7 seconds on 100 000 rows - this one cannot be optimized, there is no any subquery, we just need to ask DB about those data.

Hope now Dave will made new official release, which will not allow for data duplication in 2 of our 3 cache tables, and makes whole mod works faster, and your DB smaller.

Below you have again full and updated description how to clean duplicated data. I was able to run this by my browser client, but be aware, that in case of some large databases, server can go away by this client and in such case you will need to use some other client than www.

Also note that if you made changes described here (https://vborg.vbsupport.ru/showpost.php?p=1842972&postcount=242) which I hope will be included in official release, then you will not have to remove duplicated data from wt_cache_short and wt_cache_medium anymore (only once during described procedure). And after that only wt_cache will need to delete duplicated data from time to time.

So here you have again description and procedure, but much faster this time :):
If you would like to check do you have data duplication in your cache execute those queries (time consuming). Execute one by one - each one works on other cache table and tells you how many times and which data is duplicated (1st column duplication counter, 2nd for which originaltext, 3rd for which language):

select count(*) counter, originaltext, tl from wt_cache group by originaltext, tl having count(*) > 1 order by counter desc;

select count(*) counter, originaltext, tl from wt_cache_short group by originaltext, tl having count(*) > 1 order by counter desc;

select count(*) counter, originaltext, tl from wt_cache_medium group by originaltext, tl having count(*) > 1 order by counter desc;


If you want to delete data duplication first need to create 2 tables for temporary data:

CREATE TABLE saver (
id INT,
tl VARCHAR(10),
originaltext VARCHAR(65000)
) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_general_ci;

CREATE TABLE cleaner (
id INT
) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_general_ci;


And when you have those you can execute clearing queries - note those will leave first translation in your database and only remove next translations for same text and language.

delete from cleaner;
delete from saver;
insert into saver (SELECT min(id) as id, tl, originaltext from wt_cache group by originaltext,tl having count(*) > 1);
insert into cleaner (SELECT cache.id from saver, wt_cache cache where saver.originaltext=cache.originaltext and saver.tl=cache.tl and saver.id<>cache.id);
DELETE FROM wt_cache USING wt_cache INNER JOIN cleaner ON wt_cache.id = cleaner.id;

delete from cleaner;
delete from saver;
insert into saver (SELECT min(id) as id, tl, originaltext from wt_cache_short group by originaltext,tl having count(*) > 1);
insert into cleaner (SELECT cache.id from saver, wt_cache_short cache where saver.originaltext=cache.originaltext and saver.tl=cache.tl and saver.id<>cache.id);
DELETE FROM wt_cache_short USING wt_cache_short INNER JOIN cleaner ON wt_cache_short.id = cleaner.id;

delete from cleaner;
delete from saver;
insert into saver (SELECT min(id) as id, tl, originaltext from wt_cache_medium group by originaltext,tl having count(*) > 1);
insert into cleaner (SELECT cache.id from saver, wt_cache_medium cache where saver.originaltext=cache.originaltext and saver.tl=cache.tl and saver.id<>cache.id);
DELETE FROM wt_cache_medium USING wt_cache_medium INNER JOIN cleaner ON wt_cache_medium.id = cleaner.id;


That worked much better, will test and release shortly. Are you planning any more optimization? Or are we 100%? :up:

LoveStream
07-07-2009, 04:09 PM
Hello.
Thanks for your hack.

This is my first trial, but I encount below error.

Fatal error: Call to undefined function: mysql_set_charset() in /home/hosting_users/www/forum/translate.php on line 35

My target goal is that;

our origin text is mainly Korean
other translate to all other languages.

Above line 35 is,

////////////////////////////////////////////////////
if ($enablecache) {
mysql_connect ($mysqlserver, $dbusername, $dbpassword);
mysql_select_db ($dbname);
#35: mysql_set_charset('utf8');
}
////////////////////////////////////////////////////

Though, our main lanuage is Korean, but I did not change it to "ko".

<?php
////////////////////////////////////////////////////
// Global Translator API
////////////////////////////////////////////////////

global $enablesession, $enablecache, $originalEncoding, $fl;
////////////////////////////////////////////////////
// SETTINGS
////////////////////////////////////////////////////
$enablesession = false; //ignore
$enablecache = true; //true - enable cache setting, false - disable cache setting
$originalEncoding = 'iso-8859-1'; - //refer to your forum source code for your base encoding
$fl = 'en'; //current language (original) - refer table for language varibles

I had tried this $originalEncoding = 'iso-8859-1'; to $originalEncoding = 'utf-8';, but it doesn't work with the same error.

My Server set is,

PHP 4.4.1
MySQL 5.0.19
cURL: enable
mysql character set : utf-8


What it's problem?
help me. Thank you.

1Unreal
07-07-2009, 04:52 PM
Thanks for the updates :)

1Unreal
07-07-2009, 04:57 PM
Would you be able to create something which will detect the users language. You can get it from $_SERVER['HTTP_ACCEPT_LANGUAGE']. It gives a list of their accepted languages.

Bumping my post.

I think this would be a very valuable feature

TurkeySub
07-07-2009, 07:30 PM
Hi Guys,

First time using this and have run into a few different issues:

1) I am unable to get the flags to display on VBAdvanced, this is a first time I am unable to get a variable to call when on VBAdvanced, so I am not sure the issue.

I only editted the nav bits to include the flags, works on all other addons, except for VBAdvanced.

2) When you choose to translate a page, it is directing to: "www.domain.com/?hl=ar" when it should go to: "www.domain.com/index.php?hl=ar"

I am sure this issue directs right back at VBAdvanced, as I am using HTACCESS to make "portal.php" my default page instead of "index.php".

With that, I am assuming it won't work on "downloads.php, etc." for any other addons one might be running.

3) I am also using Zoints SEO, assuming item #2 can be fixed, will it then work with this?

Now for some questions:

1) Can we remove your link flag if we provide a link in our footer? I am thinking the extra flag is going to be hugely confusing.

2) Are the newly translated pages updated to the Sitemap? I am at a loss as to how this MOD will add new links to google if they are not really part of the site per say.

3) Is there a way so once you switch to a language it stays on that language, I am seeing it could be potential quite a challenge for viewers if they need to click the flag on every page.

Thanks!

NLP-er
07-07-2009, 10:23 PM
That worked much better, will test and release shortly. Are you planning any more optimization? Or are we 100%? :up:

As I wrote - some little changes could be done, but probably without significant improvement. So at least for some time I think It's done :)

So good news for everyone who is with us from the beginning and made all those weird things to update without any data lost - this it the last one :D

At least for now ;)

racale
07-08-2009, 06:42 AM
You aready have DB set. So what is the problem?

then you tell me that everything came out ok, even if error

Dave Hybrid
07-08-2009, 11:24 AM
v2.4 Official Release

* More DB optimization, fastest ever read/write cache speed :)

Upgrade Info;

Open new translate.php file, add settings as detailed in install and disable cache, so $enablecache=false

Run the following MySQL querys one by one.

Alter table wt_cache_short collate utf8_bin;
ALTER TABLE wt_cache_short CHANGE tl tl VARCHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;
ALTER TABLE wt_cache_short CHANGE originaltext originaltext VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;
ALTER TABLE wt_cache_short CHANGE translated translated VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;

Alter table wt_cache_medium collate utf8_bin;
ALTER TABLE wt_cache_medium CHANGE tl tl VARCHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;
ALTER TABLE wt_cache_medium CHANGE originaltext originaltext VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;
ALTER TABLE wt_cache_medium CHANGE translated translated VARCHAR( 1000 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;

Alter table wt_cache collate utf8_bin;
ALTER TABLE wt_cache CHANGE tl tl VARCHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;
ALTER TABLE wt_cache CHANGE translated translated TEXT CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;
ALTER TABLE wt_cache CHANGE translated translated VARCHAR( 65000 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL;

CREATE TABLE saver (
id INT,
tl VARCHAR(10),
originaltext VARCHAR(65000)
) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_general_ci;

CREATE TABLE cleaner (
id INT
) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_general_ci;

delete from cleaner;
delete from saver;
insert into saver (SELECT min(id) as id, tl, originaltext from wt_cache group by originaltext,tl having count(*) > 1);
insert into cleaner (SELECT cache.id from saver, wt_cache cache where saver.originaltext=cache.originaltext and saver.tl=cache.tl and saver.id<>cache.id);
DELETE FROM wt_cache USING wt_cache INNER JOIN cleaner ON wt_cache.id = cleaner.id;

delete from cleaner;
delete from saver;
insert into saver (SELECT min(id) as id, tl, originaltext from wt_cache_short group by originaltext,tl having count(*) > 1);
insert into cleaner (SELECT cache.id from saver, wt_cache_short cache where saver.originaltext=cache.originaltext and saver.tl=cache.tl and saver.id<>cache.id);
DELETE FROM wt_cache_short USING wt_cache_short INNER JOIN cleaner ON wt_cache_short.id = cleaner.id;

delete from cleaner;
delete from saver;
insert into saver (SELECT min(id) as id, tl, originaltext from wt_cache_medium group by originaltext,tl having count(*) > 1);
insert into cleaner (SELECT cache.id from saver, wt_cache_medium cache where saver.originaltext=cache.originaltext and saver.tl=cache.tl and saver.id<>cache.id);
DELETE FROM wt_cache_medium USING wt_cache_medium INNER JOIN cleaner ON wt_cache_medium.id = cleaner.id;

OPTIMIZE TABLE wt_cache, wt_cache_medium, wt_cache_short;

alter table wt_cache_short drop index originaltext;
create UNIQUE INDEX originaltext on wt_cache_short (originaltext, tl);

alter table wt_cache_medium drop index originaltext;
create UNIQUE INDEX originaltext on wt_cache_medium (originaltext, tl);

Some querys may take a few minutes to run, this is normal, just let them run until finished.

The set $enablecache=true; in translate.php and upload that file one last time.

NLP-er
07-08-2009, 11:47 AM
v2.4 Official Release

* More DB optimization, fastest ever read/write cache speed :)



You gave update procedure but forgot to change installation description in one detail - wt_cache has larger index since v2.3b - you set it back the short one ;)

It should be:

CREATE TABLE wt_cache (
id INT AUTO_INCREMENT NOT NULL PRIMARY KEY,
tl VARCHAR(10),
originaltext VARCHAR(65000),
translated TEXT,
INDEX(originaltext(323), tl)
) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_bin;

Dave Hybrid
07-08-2009, 11:57 AM
My bad, thanks.

NLP-er
07-08-2009, 11:57 AM
then you tell me that everything came out ok, even if error

You are trying to set up DB wich is already set up - error is good in this case :)

racale
07-08-2009, 04:11 PM
You are trying to set up DB wich is already set up - error is good in this case :)
x ok then look for something new to me because nothing works
no more what to do

thanks

puertoblack2003
07-09-2009, 12:20 AM
thanks for the update..:up:

1Unreal
07-09-2009, 12:47 AM
Thank you :)

TurkeySub
07-09-2009, 01:47 AM
Hi Guys,

First time using this and have run into a few different issues:

1) I am unable to get the flags to display on VBAdvanced, this is a first time I am unable to get a variable to call when on VBAdvanced, so I am not sure the issue.

I only editted the nav bits to include the flags, works on all other addons, except for VBAdvanced.

2) When you choose to translate a page, it is directing to: "www.domain.com/?hl=ar" when it should go to: "www.domain.com/index.php?hl=ar"

I am sure this issue directs right back at VBAdvanced, as I am using HTACCESS to make "portal.php" my default page instead of "index.php".

With that, I am assuming it won't work on "downloads.php, etc." for any other addons one might be running.

3) I am also using Zoints SEO, assuming item #2 can be fixed, will it then work with this?

Now for some questions:

1) Can we remove your link flag if we provide a link in our footer? I am thinking the extra flag is going to be hugely confusing.

2) Are the newly translated pages updated to the Sitemap? I am at a loss as to how this MOD will add new links to google if they are not really part of the site per say.

3) Is there a way so once you switch to a language it stays on that language, I am seeing it could be potential quite a challenge for viewers if they need to click the flag on every page.

Thanks!

A bump for my questions....

LoveStream
07-09-2009, 08:29 AM
As to me, it's not easy to solve the mysql_set_charset() error.

Fatal error: Call to undefined function: mysql_set_charset() in /home/hosting_users/www/forum/translate.php on line 43

Otherwise I installed this other domain, and I found the traslated text were stored in database, but it's take a log time while browsing it by national flags. It's hardly not used to browse.

I'm not sure these issues only to me.

I think this hack still under develop and so it must be to wait until more stable release.

But, I promote your works.

Thank you.

Dave Hybrid
07-09-2009, 01:25 PM
A bump for my questions....

This is for standard vb or vb + vbseo, it says that in the install. It is not ok with zoints rewritten URLs.

kartik786
07-09-2009, 01:57 PM
Simple noob question.

Why isnt LIVE DEMO site http://www.blogboost.org/ indexed in google in different languages?

TurkeySub
07-09-2009, 02:04 PM
This is for standard vb or vb + vbseo, it says that in the install. It is not ok with zoints rewritten URLs.
So one question down, any chance you could take the time to do a real reply or would that be asking to much?

Thanks for the try . . .
Simple noob question.

Why isnt LIVE DEMO site http://www.blogboost.org/ indexed in google in different languages?

I couldnt locate it in german, dutch or spanish. That is a good question and I asked the same in my post, I am thinking some of the claims of what this mod can do are allot of smoke.

It translate one page at a time, is about the extent of it.

un-installed.

NLP-er
07-09-2009, 03:09 PM
As to me, it's not easy to solve the mysql_set_charset() error.



Otherwise I installed this other domain, and I found the traslated text were stored in database, but it's take a log time while browsing it by national flags. It's hardly not used to browse.

I'm not sure these issues only to me.

I think this hack still under develop and so it must be to wait until more stable release.

But, I promote your works.

Thank you.

If you see this error it means that PHP doesn't know that function - it is not this mod cause. You have wrong version of PHP or not instaled propertly. See php manual:
http://us.php.net/manual/en/function.mysql-set-charset.php

First translation is always long, because google translates it so long and it cannot be skipped. After that it is cached and next generation of this page is very fast.

Dave Hybrid
07-09-2009, 05:00 PM
So one question down, any chance you could take the time to do a real reply or would that be asking to much?

Thanks for the try . . .


I couldnt locate it in german, dutch or spanish. That is a good question and I asked the same in my post, I am thinking some of the claims of what this mod can do are allot of smoke.

It translate one page at a time, is about the extent of it.

un-installed.

LOL, clearly you don't have a clue buddy, blogboost is blocked via robots.txt as test sites have to be according to the vb license.

Oh, 5,000 indexed translated pages here on a users site.
http://www.google.com/search?q=site%3Awww.teenforumz.com%20inurl%3Ahl%3D&hl=en&safe=off&sa=G&tbo=1

I have forums with 10% of the total pages possible indexed and getting 1,000's of new daily uniques after just 2 weeks. If they had 100% of the translated pages indexed, which will take a few months as normal, they will get getting 10's of 000's of new daily uniques.

I don't have to prove anything, take it or leave it, it makes no matter to me. I dont gain or lose by making false claims do I lol it's free.

Dave Hybrid
07-09-2009, 05:09 PM
To add, all the haters make me laugh. We are all here for mostly the same reason, traffic and profit. Someone comes along and says look try this it works real easy and requires little work and you all pull it apart.

It's free FFS! What have you to lose?

I really have nothing to gain from releasing this other than giving back to a community that has helped me. Stick with gaining the odd member here and there, writing articles and submitting to directories lol.

To get ahead online you need to think outside the box, the sooner you realise this the sooner you'll all get where you want to be.

LoveStream
07-09-2009, 05:52 PM
If you see this error it means thta PHP don't know that function - it is not this mod cause. You have rong version of PHP or not instaled propertly. See php manual:
http://us.php.net/manual/en/function.mysql-set-charset.php

First translation is always long, because google translates it so long and it cannot be skipped. After that it is cached and next generation of this page is very fast.

Thank you kindly direction to solve it.

I have two different server, MySQL and PHP version except Charset is utf-8.
As your comment, it seems to be caused by MySQL version. Accoring to mannual, that charset requres over MySQL 5.0.7 but my two server is lower than.

One of server has that

MySQL Version is 5.0.51a-log
PHP 5.2.5

and this desn't return any error messages, but when I tried other server has lower version than this, PHP 4.4.1 and MySQL 5.0.19.

In this server, it return Fatal error at mysql_set_charset; in translate.php

Well, How about this need to use cron job works in advanced before it run?
In my case, browising got stopped at last because it take too long time to translate and to stored cache table.

yours.

CThiessen
07-09-2009, 06:06 PM
Hi,
If I take a look in Google I am already satisfy seeing about 16.400 pages.
But we to have to be a little careful with this numbers.
At this point in time Google know about 16.400 pages but not all about the content, that need some time. So I will wait and see what?s happened in the next month.

I am using Woopra for statistics. There I am able to create Event notifications.
So I try to add whenever an URL within ??hl=? is called.
If this is working, I will try Combination with referrers.
But it is not working. :( Not in Woopra and not in the Forums Statistic (https://vborg.vbsupport.ru/showthread.php?t=201274&highlight=Statistic).
101764101763

I did add my Link Spider to the Spider List and I see that he is going to every page 28 times but I do ever see the same URL without the ??hl=?.
In the Visitor (Woopra) tracking I am able to see strange Signs in the title, so this pages are tracked, but not the correct URL.
Have anybody an Idea how to make that visible? Might be very interesting to monitor that traffic over the next month.

Greetings Christian

PS.: If I cannot see the full URL, is it possible to add something to the title for all translated pages?
So let them start (or at the end) with ?<|> ?, than it will possible filter this out of the title.

1Unreal
07-09-2009, 06:30 PM
I made a little jQuery thing for the flags, feel free to use it.

Demo (http://www.theflickzone.com/) - at the top

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#flags a img").hover(function(){
$("#lang_text").text($(this).attr("alt"));
})

$("#flags").mouseleave(function(){
$("#lang_text").text("Translate This Page");
})
});
</script>
</head>

<body>
<div style="margin: auto; width: 100%;" id="flags">
<a href="?hl=ar"><img src="/flags/Saudi Arabia.gif" alt="Arabic" border="0" /></a>
<a href="?hl=bg"><img src="/flags/Bulgaria.gif" alt="Bulgarian" border="0" /></a>
<a href="?hl=zh-CN"><img src="/flags/China.gif" alt="Chinese (Simplified)" border="0" /></a>

<a href="?hl=zh-TW"><img src="/flags/Taiwan.gif" alt="Chinese (Traditional)" border="0" /></a>
<a href="?hl=hr"><img src="/flags/Croatia.gif" alt="Croatian" border="0" /></a>
<a href="?hl=cs"><img src="/flags/Czech Republic.gif" alt="Czech" border="0" /></a>
<a href="?hl=da"><img src="/flags/Denmark.gif" alt="Danish" border="0" /></a>
<a href="?hl=nl"><img src="/flags/Netherlands.gif" alt="Dutch" border="0" /></a>
<a href="?hl=fi"><img src="/flags/Finland.gif" alt="Finnish" border="0" /></a>
<a href="?hl=fr"><img src="/flags/France.gif" alt="French" border="0" /></a>
<a href="?hl=de"><img src="/flags/Germany.gif" alt="German" border="0" /></a>
<a href="?hl=el"><img src="/flags/Greece.gif" alt="Greek" border="0" /></a>
<a href="?hl=iw"><img src="/flags/Israel.gif" alt="Hebrew" border="0" /></a>
<a href="?hl=hu"><img src="/flags/Hungary.gif" alt="Hungarian" border="0" /></a>
<a href="?hl=it"><img src="/flags/Italy.gif" alt="Italian" border="0" /></a>
<a href="?hl=ja"><img src="/flags/Japan.gif" alt="Japanese" border="0" /></a>
<a href="?hl=ko"><img src="/flags/South Korea.gif" alt="Korean" border="0" /></a>
<a href="?hl=no"><img src="/flags/Norway.gif" alt="Norwegian" border="0" /></a>
<a href="?hl=pl"><img src="/flags/Poland.gif" alt="Polish" border="0" /></a>
<a href="?hl=pt"><img src="/flags/Portugal.gif" alt="Portuguese" border="0" /></a>

<a href="?hl=ro"><img src="/flags/Romania.gif" alt="Romanian" border="0" /></a>
<a href="?hl=ru"><img src="/flags/Russian Federation.gif" alt="Russian" border="0" /></a>
<a href="?hl=sr"><img src="/flags/Serbia.gif" alt="Serbian" border="0" /></a>
<a href="?hl=sk"><img src="/flags/Slovakia.gif" alt="Slovak" border="0" /></a>
<a href="?hl=es"><img src="/flags/Spain.gif" alt="Spanish" border="0" /></a>
<a href="?hl=sv"><img src="/flags/Sweden.gif" alt="Swedish" border="0" /></a>
<a href="?hl=th"><img src="/flags/Thailand.gif" alt="Thai" border="0" /></a>
<a href="?hl=tr"><img src="/flags/Turkey.gif" alt="Turkish" border="0" /></a>
<span id="lang_text">Translate This Page</span>
</div>


</body>
</html>

nascimbeni
07-09-2009, 06:54 PM
Hi for a while I have been trying to install this mod with no success - I was getting

"The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression"

I found the solution:

Turned off gzip in the Admin CP -> vBulletin Options -> vBulletin Options -> Cookies and HTTP Header Options

I posted because I remember there was another member with the same issue.

NLP-er
07-09-2009, 07:34 PM
Thank you kindly direction to solve it.

I have two different server, MySQL and PHP version except Charset is utf-8.
As your comment, it seems to be caused by MySQL version. Accoring to mannual, that charset requres over MySQL 5.0.7 but my two server is lower than.

One of server has that

MySQL Version is 5.0.51a-log
PHP 5.2.5

and this desn't return any error messages, but when I tried other server has lower version than this, PHP 4.4.1 and MySQL 5.0.19.

In this server, it return Fatal error at mysql_set_charset; in translate.php

Well, How about this need to use cron job works in advanced before it run?
In my case, browising got stopped at last because it take too long time to translate and to stored cache table.

yours.

Glad you was able to run it afterall. In one of posts someone was giving instructions for spidering site so it will translate in background - just find it :) I also spider all pages, so now translations are very fast. And about first translation again - that is google who translates it - we just have to wait till google finish and give us translation...

NLP-er
07-09-2009, 07:43 PM
Hi for a while I have been trying to install this mod with no success - I was getting

"The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression"

I found the solution:

Turned off gzip in the Admin CP -> vBulletin Options -> vBulletin Options -> Cookies and HTTP Header Options


I posted because I remember there was another member with the same issue.

Great thanks for helping :D

1Unreal
07-09-2009, 08:00 PM
A few pages back someone asked how to set the vBSEO rewrite rules to do this site.com/en/threadname

Could someone tell me the rewrite rules please :)

gwerzal
07-09-2009, 10:26 PM
Just installed

working great

thank you very much

ShawneyJ
07-10-2009, 04:56 AM
works good but my forum is going snail pase, cant think of any other hacks causing the slowness.

Dave Hybrid
07-10-2009, 05:32 AM
works good but my forum is going snail pase, cant think of any other hacks causing the slowness.

Just disable the plugin and see if that changes, it shouldn't cause any major load but it could push you over the edge if you are already close to low server resources.

ShawneyJ
07-10-2009, 12:06 PM
Just disable the plugin and see if that changes, it shouldn't cause any major load but it could push you over the edge if you are already close to low server resources.


yeah thanks, na it was not your hack, it seems to be the arcade for some reason.
cheers,
once again, good work ;)

Sweeks
07-10-2009, 12:32 PM
Donated to https://vborg.vbsupport.ru/member.php?u=267979 :) Installing this on our new forums ;)

993ti
07-10-2009, 02:27 PM
Awesome mod, also works with 3.7.x btw ;)

LI Pets
07-10-2009, 06:28 PM
the folks over at vbseo had this to say.

We don't suggest using this mod as it breaks vBSEO's main purpose Link Consensus

Any comments?

racale
07-10-2009, 06:46 PM
I made a little jQuery thing for the flags, feel free to use it.

Demo (http://www.theflickzone.com/) - at the top

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#flags a img").hover(function(){
$("#lang_text").text($(this).attr("alt"));
})

$("#flags").mouseleave(function(){
$("#lang_text").text("Translate This Page");
})
});
</script>
</head>

<body>
<div style="margin: auto; width: 100%;" id="flags">
<a href="?hl=ar"><img src="/flags/Saudi Arabia.gif" alt="Arabic" border="0" /></a>
<a href="?hl=bg"><img src="/flags/Bulgaria.gif" alt="Bulgarian" border="0" /></a>
<a href="?hl=zh-CN"><img src="/flags/China.gif" alt="Chinese (Simplified)" border="0" /></a>

<a href="?hl=zh-TW"><img src="/flags/Taiwan.gif" alt="Chinese (Traditional)" border="0" /></a>
<a href="?hl=hr"><img src="/flags/Croatia.gif" alt="Croatian" border="0" /></a>
<a href="?hl=cs"><img src="/flags/Czech Republic.gif" alt="Czech" border="0" /></a>
<a href="?hl=da"><img src="/flags/Denmark.gif" alt="Danish" border="0" /></a>
<a href="?hl=nl"><img src="/flags/Netherlands.gif" alt="Dutch" border="0" /></a>
<a href="?hl=fi"><img src="/flags/Finland.gif" alt="Finnish" border="0" /></a>
<a href="?hl=fr"><img src="/flags/France.gif" alt="French" border="0" /></a>
<a href="?hl=de"><img src="/flags/Germany.gif" alt="German" border="0" /></a>
<a href="?hl=el"><img src="/flags/Greece.gif" alt="Greek" border="0" /></a>
<a href="?hl=iw"><img src="/flags/Israel.gif" alt="Hebrew" border="0" /></a>
<a href="?hl=hu"><img src="/flags/Hungary.gif" alt="Hungarian" border="0" /></a>
<a href="?hl=it"><img src="/flags/Italy.gif" alt="Italian" border="0" /></a>
<a href="?hl=ja"><img src="/flags/Japan.gif" alt="Japanese" border="0" /></a>
<a href="?hl=ko"><img src="/flags/South Korea.gif" alt="Korean" border="0" /></a>
<a href="?hl=no"><img src="/flags/Norway.gif" alt="Norwegian" border="0" /></a>
<a href="?hl=pl"><img src="/flags/Poland.gif" alt="Polish" border="0" /></a>
<a href="?hl=pt"><img src="/flags/Portugal.gif" alt="Portuguese" border="0" /></a>

<a href="?hl=ro"><img src="/flags/Romania.gif" alt="Romanian" border="0" /></a>
<a href="?hl=ru"><img src="/flags/Russian Federation.gif" alt="Russian" border="0" /></a>
<a href="?hl=sr"><img src="/flags/Serbia.gif" alt="Serbian" border="0" /></a>
<a href="?hl=sk"><img src="/flags/Slovakia.gif" alt="Slovak" border="0" /></a>
<a href="?hl=es"><img src="/flags/Spain.gif" alt="Spanish" border="0" /></a>
<a href="?hl=sv"><img src="/flags/Sweden.gif" alt="Swedish" border="0" /></a>
<a href="?hl=th"><img src="/flags/Thailand.gif" alt="Thai" border="0" /></a>
<a href="?hl=tr"><img src="/flags/Turkey.gif" alt="Turkish" border="0" /></a>
<span id="lang_text">Translate This Page</span>
</div>


</body>
</html>

I put this query I can now say that the pages you open, not only am I being translated

where I am wrong, help thanks:confused::confused::confused:

if someone can see my problem, so you realize apologies for not knowing write English well demo (http://forum21live.com/forum/index.php?hl=de)

tpearl5
07-10-2009, 08:05 PM
A few pages back someone asked how to set the vBSEO rewrite rules to do this site.com/en/threadname

Could someone tell me the rewrite rules please :)

I think you're referring to me, but I'd like to know the details as well. Would it be as simple as putting in some rewrite rules?

NLP-er
07-11-2009, 02:15 AM
Just want to say that I'm proud of my new and first very own mod :D

Just made today - this one will automatically tag posts according to content, title and existing tags in forum:
https://vborg.vbsupport.ru/showthread.php?t=218350

So for every one who like my support here - enjoy :D

PS.
Still support this one ;)

racale
07-11-2009, 08:33 AM
Who helps me to please not I who has to make it work where I can say I'm wrong by 4 days that I try and try but still unable to get to work through it.........

thanks thanks

punk23
07-11-2009, 09:29 AM
the folks over at vbseo had this to say.

We don't suggest using this mod as it breaks vBSEO's main purpose Link Consensus

Any comments?
hmm...this mod looks perfect for my site but I am going to wait to see how the vBSEO issue develops....

Dave Hybrid
07-11-2009, 09:33 AM
the folks over at vbseo had this to say.

We don't suggest using this mod as it breaks vBSEO's main purpose Link Consensus

Any comments?

Right, so adding normal threads in English breaks link consensus?

Adding any content does in their eyes, so should you stop altogether?

You have to break link consensus in order to grow your forum normally or via translated pages.

Pages you should avoid in order to gain link consensus are contact, about or privacy pages.

I'm not sure you or them understands the point.

Hmmmmm.

Dave Hybrid
07-11-2009, 09:35 AM
I put this query I can now say that the pages you open, not only am I being translated

where I am wrong, help thanks:confused::confused::confused:

if someone can see my problem, so you realize apologies for not knowing write English well demo (http://forum21live.com/forum/index.php?hl=de)

Use the flag code I provided, otherwise I wont support you.

LI_Pets
07-11-2009, 10:12 AM
Right, so adding normal threads in English breaks link consensus?

Adding any content does in their eyes, so should you stop altogether?

You have to break link consensus in order to grow your forum normally or via translated pages.

Pages you should avoid in order to gain link consensus are contact, about or privacy pages.

I'm not sure you or them understands the point.

Hmmmmm.

I don't understand your points???

I think what vBseo is concerned about is duplicate content, not 100% sure, but that's the only thing that comes to mind is being penalized by Google. link (http://www.vbseo.com/f4/support-multiple-languages-35168/)

Instead of getting so defensive why don't you log in there and ask them directly.

A lot of people here use their software so it's to your benefit I would think.


Don't get me wrong I like your mod a lot.


.

Dave Hybrid
07-11-2009, 10:26 AM
If you don't understand what you are posting or talking about then why post it?

First you mention link consensus and now duplicate content, with NO facts.

Stop spreading your FUD. None of these issues apply here.

Now you tell me to run along and ask them? You do it if your concerned, didn't you already? I don't have any doubts so I will pass on asking their advice thanks, they know SEO no better than anyone else.

How can translated pages be duplicate? They are original content, translated, so are still original and no different to your current content, except in various other languages, it's not rocket science.

Link consensus is the theory that by linking to junk pages you are wasting link juice, junk pages are things like tag pages, contact pages etc. Not thread pages, these are content rich and should be included in you site above anything else.

I have been doing SEO 5+ years, own vBSEO and have been using this MOD years too. I get 10,000's of visits daily from it.

Clearly you have been around 5 minutes, this idea has been used for years, there are countless wordpress versions, amongst others, from many other coders. Just because this is new to you and as a vB plugin doesn't mean it hasn't been around ages and tested to death.

Where are your facts? Where is your evidence to backup your claims?

LI_Pets
07-11-2009, 11:38 AM
Hey Dave are you always this arrogant?

You're doing your self a dis-service

Dave Hybrid
07-11-2009, 11:43 AM
Hey Dave are you always this arrogant?

You're doing your self a dis-service

So just because I don't agree with you I'm arrogant?

I'm just stating my case, you questioned my MOD and stated yours, so then it is my go no?

That's how a discussion/debate works.

Next time I suggest you research your claims before stating them, otherwise you do yourself a dis-service also, right now ppl with even the smallest amount of SEO knowledge are pointing at you, and laughing.

Kind regards.

punk23
07-11-2009, 12:21 PM
Ok, so I took the plunge and the translation is working.

I have had to disable it for now though as every translation takes 30 seconds. Great mod though :)

Dave Hybrid
07-11-2009, 12:32 PM
Ok, so I took the plunge and the translation is working.

I have had to disable it for now though as every translation takes 30 seconds. Great mod though :)

Because translation has to be sent to the Google Translate API and then stored in the MySQL DB it takes a small amount of time first time.

So second page load is fast, as your site gets cached, page load speeds become a non-issue.

CThiessen
07-11-2009, 12:33 PM
Hi,
i think this is no duplicated content, as long as you take out your own language.

So “?hl=en” should be working but if Google recommend “/en/” this might be better.
Try to work together with the Stuff of vBSEO and try to figure out how to add some rules for that Mod to meet the Google recommendations. My experiences are, that they have a really good support.
Christian

punk23
07-11-2009, 12:34 PM
Because translation has to be sent to the Google Translate API and then stored in the MySQL DB it takes a small amount of time first time.

So second page load is fast, as your site gets cached, page load speeds become a non-issue.
Ok, thanks for the explanation :)

With nearly 200,000 indexed Google pages I guess that'll take a while... lol!

Cheers.

1Unreal
07-11-2009, 12:36 PM
Hi,
i think this is no duplicated content, as long as you take out your own language.

So ??hl=en? should be working but if Google recommend ?/en/? this might be better.
Try to work together with the Stuff of vBSEO and try to figure out how to add some rules for that Mod to meet the Google recommendations. My experiences are, that they have a really good support.
Christian

I was talking on the Google message boards and they said that different languages doesn't count as duplicate content :)

Dave Hybrid
07-11-2009, 12:40 PM
This guy has a 2k alexa rank and is running the wordpress version.

Probably getting anything around 100,000 visits a day.

100,000's of indexed translated pages too.

Clearly they are not complaining.

http://www.mydigitallife.info/

Dave Hybrid
07-11-2009, 12:41 PM
Ok, thanks for the explanation :)

With nearly 200,000 indexed Google pages I guess that'll take a while... lol!

Cheers.

Right, but imagine you added 1000,000's of normal threads overnight, these would take months to index too, so it's no different.

You install the mod and leave it, it takes no work, what is there to lose exactly? :)

punk23
07-11-2009, 12:45 PM
Right, but imagine you added 1000,000's of normal threads overnight, these would take months to index too, so it's no different.

You install the mod and leave it, it takes no work, what is there to lose exactly? :)
Completely agree.

racale
07-11-2009, 12:57 PM
Use the flag code I provided, otherwise I wont support you.

sorry the code talk which are not very experienced thanks

Dave Hybrid
07-11-2009, 01:23 PM
Hi,
i think this is no duplicated content, as long as you take out your own language.
Christian

Correct. :up:

MadK
07-12-2009, 02:45 AM
Has anyone used this with vBSEO?

racale
07-12-2009, 02:48 AM
I do not know really what to do, I am here Blocked (http://forum21live.com/forum/index.php?hl=en)

please help me thanks

NLP-er
07-12-2009, 04:10 AM
Has anyone used this with vBSEO?

I'm using it with vbSEO - works fine :)

NLP-er
07-12-2009, 04:13 AM
I do not know really what to do, I am here Blocked (http://forum21live.com/forum/index.php?hl=en)

please help me thanks

Disable cache first, so you will know is this some cache issue. If after that it works then PM to me - I support cache issues in this mode. Otherwise call Dave :)

Dave Hybrid
07-12-2009, 09:50 AM
Has anyone used this with vBSEO?

100's are using this with vBSEO. Why, what is your query? :)

turbosatan
07-12-2009, 03:14 PM
Does this work with zoints?

if not can you explain what i need to do to get it to work.

if it works with VBSEO rewritten urls i dont see why it cant work with zoints.

Stingray27
07-12-2009, 05:27 PM
100's are using this with vBSEO. Why, what is your query? :)
100's ? it has an install count of 55, where does 100's come from ?

turbosatan
07-12-2009, 07:24 PM
100's ? it has an install count of 55, where does 100's come from ?

<removed>

how many people click install?? i know i never do

Dave Hybrid
07-12-2009, 08:46 PM
100's ? it has an install count of 55, where does 100's come from ?

Did you miss the download numbers?

File Type: %1$s vBGT v2.0.zip (64.7 KB, 105 downloads)
File Type: %1$s vBGT v2.2.zip (26.6 KB, 45 downloads)
File Type: %1$s vBGT v2.3.zip (26.6 KB, 70 downloads)
File Type: %1$s vBGT v2.4.zip (26.5 KB, 61 downloads)

Also v1 was in an old thread, plenty of d/l there too.

45wheelgun
07-12-2009, 08:58 PM
Getting ready to try this on Tuesday or Wednesday. I am running VB 3.8.3 with vbSEO 3.3.0.

I have a forum with 300k messages 30k threads and 50k users.

Is the software designed to handle that type of load and are there any installation tips you might suggest?

Thanks for what looks like a really cool application.

Dave Hybrid
07-12-2009, 09:02 PM
Getting ready to try this on Tuesday or Wednesday. I am running VB 3.8.3 with vbSEO 3.3.0.

I have a forum with 300k messages 30k threads and 50k users.

Is the software designed to handle that type of load and are there any installation tips you might suggest?

Thanks for what looks like a really cool application.

One of my forums is around that and it runs just fine, on a site that big I would use an if condition and just show the flags on showthread pages, that will mean only the real good content gets translated and that you DB doesn't get too big and full of tag and member pages which bring little traffic anyway. Good luck.

45wheelgun
07-12-2009, 09:49 PM
One of my forums is around that and it runs just fine, on a site that big I would use an if condition and just show the flags on showthread pages, that will mean only the real good content gets translated and that you DB doesn't get too big and full of tag and member pages which bring little traffic anyway. Good luck.

Thanks Dave, can you give me an idea as to what the syntax would be for the conditional? I am pretty sure that I can follow the installation instructions, but I am unclear the proper way to do the conditional. I was planning on putting it in the header like the example link above.

Thanks,
Dave

Dave Hybrid
07-12-2009, 09:52 PM
<if condition="(THIS_SCRIPT == 'showthread')">
<!-- vBGT Code Start-->
<div align="center">
<!-- google_ad_section_start(weight=ignore) -->
$translateflags
<!-- google_ad_section_end -->
</div>
<!-- vBGT Code End -->
</if>

Replace that with the one in the install guide.

MadK
07-12-2009, 10:24 PM
100's are using this with vBSEO. Why, what is your query? :)
I have no questions as such, but I was just thinking about the url rewrites, are they also going to be rewritten in that new language?

Dave Hybrid
07-12-2009, 10:31 PM
I have no questions as such, but I was just thinking about the url rewrites, are they also going to be rewritten in that new language?

It's pretty hard to do, no such thing as Chinese urls for example...

However translated pages have a new url, new meta tags and new content.

45wheelgun
07-12-2009, 10:51 PM
Replace that with the one in the install guide.

Thanks Dave!

lord_of_chaos
07-13-2009, 12:12 AM
I'm trying to use this great addon but can't get the links to show up. It works when I add the "?hl=XXX" string manually.

I'm using PHP 5.3 running as FastCGI. And I recognized that the mechanism to fetch the appropriate language links is a little bit odd - could some of the URL rewriting stuff you do in "translateflags.php" be broken in PHP 5.3?

Dave Hybrid
07-13-2009, 09:19 AM
I'm trying to use this great addon but can't get the links to show up. It works when I add the "?hl=XXX" string manually.

I'm using PHP 5.3 running as FastCGI. And I recognized that the mechanism to fetch the appropriate language links is a little bit odd - could some of the URL rewriting stuff you do in "translateflags.php" be broken in PHP 5.3?

The code is necessary, simply adding ?hl= doesn't work.

What is your forum URL?

lord_of_chaos
07-13-2009, 10:43 AM
Was my fault. While looking about the stuff again the third time, I realized, that I used the wrong hook for the second plugin. Sorry that I have bothered you. ;)

Dave Hybrid
07-13-2009, 11:16 AM
Was my fault. While looking about the stuff again the third time, I realized, that I used the wrong hook for the second plugin. Sorry that I have bothered you. ;)

Sorry I gave you a free product and you removed the credit link.

bjhuang
07-13-2009, 11:16 AM
is there any reason why you didn't make use of vbulletin's buildin functions and database for better integration?

Dave Hybrid
07-13-2009, 11:22 AM
is there any reason why you didn't make use of vbulletin's buildin functions and database for better integration?

Because it's more work and I don't get paid for this.

People also remove the credit link so that's it I'm afraid, don't expect anything other than bug fixes.

I'm keeping the juicy new features to myself.

vividbreeze
07-13-2009, 01:49 PM
Can you please email me at pr@truckmountforums.com , i would like to pay you to install this on my forum which is : www.truckmountforums.com

And I only want a few languages, plus all your new juicy features you have to offer for this great plugin.

Thanks boss!

imedic
07-13-2009, 02:13 PM
Great mode. Worked flawlessly from the first try. Marked install, nominated and ranked 5.
It can still have some other small stuff in, but as the man said is free so thank you :)
Link is there :)

I have VBSEO. Is there anything I need to do / add for this to work best? I have obviously chose the appropriate files.
Like something in Site map ...
Thanks again for brilliant mod. These is web 3.0: all content in all languages instantly :)

Small problem: Are the flags suppose to appear for visitors and not for users ? Mine are the opposite. I can see logged in but not as a visitor.

Dave Hybrid
07-13-2009, 02:25 PM
Great mode. Worked flawlessly from the first try. Marked install, nominated and ranked 5.
It can still have some other small stuff in, but as the man said is free so thank you :)
Link is there :)

I have VBSEO. Is there anything I need to do / add for this to work best? I have obviously chose the appropriate files.
Like something in Site map ...
Thanks again for brilliant mod. These is web 3.0: all content in all languages instantly :)

Small problem: Are the flags suppose to appear for visitors and not for users ? Mine are the opposite. I can see logged in but not as a visitor.

Thank you!

That makes a nice change to the constant negative feedback I have got here for weeks.

Thanks for leaving the credit link. It's a link for a product which gets you bucket loads of traffic. The selfishness of some people.

You could have the pages added to your sitemap. Info here > http://www.vbseo.com/f66/adding-some-additional-urls-my-sitemap-34734/

Dave Hybrid
07-13-2009, 02:27 PM
Small problem: Are the flags suppose to appear for visitors and not for users ? Mine are the opposite. I can see logged in but not as a visitor.

They will display for all by default, unless you changed the code?

If the guests cannot see them neither can the search engines.

imedic
07-13-2009, 02:49 PM
I figure it out (flags for visitors). Need to put the conditionals. Found it on page 6 or something. Maybe is good idea to update first post and add the conditionals to navbar link code.

I followed the instructions and it will show only for logged in users on all pages.
I mention for me is a clean install.

Thank you for fast support (I was coming back to delete my q but u already answer :D )

Dave Hybrid
07-13-2009, 02:52 PM
I figure it out (flags for visitors). Need to put the conditionals. Found it on page 6 or something. Maybe is good idea to update first post and add the conditionals to navbar link code.

I followed the instructions and it will show only for logged in users on all pages.
I mention for me is a clean install.

Thank you for fast support (I was coming back to delete my q but u already answer :D )

The current code in the install guide makes it show for all, no conditional. If you had to add a conditional for them to show for guests then that is an isolated case and down to you vB config. Thanks.

imedic
07-13-2009, 03:42 PM
My mistake. I saved it before and <if> and it other conditionals where involved.

I have add th below conditional. Any suggestion on how can I add translations to forum homepage and forumdisplay ?

<!-- vBGT Code Start-->

<if condition="(THIS_SCRIPT == 'showthread')">
<div align="center">
<!-- google_ad_section_start(weight=ignore) -->
$translateflags
<!-- google_ad_section_end -->
</div>
</if>

<!-- vBGT Code End -->

Dave Hybrid
07-13-2009, 03:52 PM
<if condition="in_array(THIS_SCRIPT, array('forumdisplay', 'showthread', 'index'))">

imedic
07-13-2009, 04:31 PM
Great man! I post below the complete code to rap up.
If not, if you allow posting whithout registering, the new post / thread page is not translated at all (not that you have something to translate :) ) and it will look to google duplicate content in all languages. (just tested)

Dave you save my day :)

This will show flags only on index , forums, and threads for all groups:
<!-- vBGT Code Start-->
<if condition="in_array(THIS_SCRIPT, array('forumdisplay', 'showthread', 'index'))">
<div align="center">
<!-- google_ad_section_start(weight=ignore) -->
$translateflags
<!-- google_ad_section_end -->
</div>
</if>
<!-- vBGT Code End -->


Here (http://www.vbseo.com/f66/adding-some-additional-urls-my-sitemap-34734/#post224334) you find how to edit VBSEO sitemap so it work with this mod. I have added all languages in the copy paste code except en.

racale
07-13-2009, 06:20 PM
now works at least everything seems.
and very slow slow slow!!!

in LIVE DEMO ist rapid

What should I do

Dave Hybrid
07-13-2009, 06:35 PM
now works at least everything seems.
and very slow slow slow!!!

in LIVE DEMO ist rapid

What should I do
The 1st time you load a translated page it has to be translated by the machine translation engine.

2nd and further page loads of the same page will be fast as the translation loads from cache.

NLP-er
07-13-2009, 07:48 PM
now works at least everything seems.
and very slow slow slow!!!

in LIVE DEMO ist rapid

What should I do

Make sure you have cache enabled. First translation will be slow, bacause google translates it and google is slow at this point. After that it is cached and fast :)

Gersfan
07-13-2009, 09:02 PM
Awesome,

I was about ot ask the same question, In the live demo even though it was the first time clicking it was rapid first on mine first time it takes about 20=30 seconds at least.

I don't know what cURL is and I don't know if its active but i guess it's active since the mod is working right?

Dave Hybrid
07-13-2009, 09:13 PM
Awesome,

I was about ot ask the same question, In the live demo even though it was the first time clicking it was rapid first on mine first time it takes about 20=30 seconds at least.


Right, but loads of others have clicked before you, the 1st time it was translated in real time and saved to the database and every other time it was just loaded from the database so is fast.

Same for your site, as you, your user and the search engine spiders use the flags the pages will get translated in real time and saved so will be fast for the next user. Over time the entire site gets saved so it will all be fast.

LI_Pets
07-13-2009, 11:10 PM
Thank you!

That makes a nice change to the constant negative feedback I have got here for weeks.

Thanks for leaving the credit link. It's a link for a product which gets you bucket loads of traffic. The selfishness of some people.

You could have the pages added to your sitemap. Info here > http://www.vbseo.com/f66/adding-some-additional-urls-my-sitemap-34734/

So I was knocking the mod because Vbseo said it didn't work :o now this link says you can get it work.

So Dave you are right, I'm wrong

Gersfan
07-14-2009, 01:16 PM
Right, but loads of others have clicked before you, the 1st time it was translated in real time and saved to the database and every other time it was just loaded from the database so is fast.

Same for your site, as you, your user and the search engine spiders use the flags the pages will get translated in real time and saved so will be fast for the next user. Over time the entire site gets saved so it will all be fast.

Awesome and I understand, Thanks :up:

imported_silkroad
07-14-2009, 02:02 PM
First of all, I would like to thank Dave for such an awesome mod. This mod is truly inspirational. Thank you!!

Second of all, for those who have posted in this thread and harassed Dave about this mod, I want to say, "What is wrong with you?!" Dave is a lot more patience than I would have been with the fear-mongers and nay-sayers who toss rocks at his code (which is hard work! and free!) ! I think folks who get this mod up and working, and more traffic to their site, should PayPal some serious coin his way (that includes me).

Third, translation of a page of unique content is not duplicate content. There is nothing in Google's TOS that says translation of one page of unique content is bad in any way. In fact, to translate one page of unique content to the other is a service to people all over the planet! If you have good unique content in EN, for example, it is good to make that content available in SP, or JP or CN, for example. Dave deserves a seat at the UN, for finding a way to do this :-) This is good for everyone and good for Google too.

Forth, I have a few questions because I have not installed this yet because we have about 400,000 (English) URLs in our Google sitemap. 400K * 28 is over 11 Million URLs, so I am a bit worried about server load and performance on this new install.

So I was thinking to simply only translate one language at a time, say EN to SP. From reading the posts here, this seems easy enough by commenting out all the other flags, going slow at first.

Our database is already a kinda large, nearly 180 MB Gzipped for backup, so this will grow quite big with so many languages, so I think better to start small and work our way up, based on the size of the user base. According to this link, Top 10 World Internet Languages (http://www.internetworldstats.com/stats7.htm), we should do Chinese after English, followed by Spanish and then Japanese (see attached) to reach the large "Internet Audiences". I don't think I will translate minor languages from small language-Internet populations anytime soon, and will prioritize, unless Dave advises otherwise.

Also, we use vBSEO (of course!). So thanks for all the great posts on vBSEO regarding this mod.

In closing this post, I would like to again thank Dave for coming up with a way to translate vB posts (etc) to other languages so people who are searching for information can find that content. I have a few more questions, but this post is getting too long!

Dave Hybrid
07-14-2009, 02:27 PM
First of all, I would like to thank Dave for such an awesome mod. This mod is truly inspirational. Thank you!!

Second of all, for those who have posted in this thread and harassed Dave about this mod, I want to say, "What is wrong with you?!" Dave is a lot more patience that I would have been with the fear-mongers and nay-sayers who toss rocks at his code (which is hard work! and free!) ! I think folks who get this mod up and working, and more traffic to their site, should PayPal some serious coin his way (that includes me).

Third, translation of a page of unique content is not duplicate content. There is nothing in Google's TOS that says translation of one page of unique content is bad in any way. In fact, to translate one page of unique content to the other is a service to people all over the planet! If you have good unique content in EN, for example, it is good to make that content available in SP, or JP or CN, for example. Dave deserves a seat at the UN, for finding a way to do this :-) This is good for everyone and good for Google too.

Forth, I have a few questions because I have not installed this yet because we have about 400,000 (English) URLs in our Google sitemap. 400K * 28 is over 11 Million URLs, so I am a bit worried about server load and performance on this new install.

So I was thinking to simply only translate one language at a time, say EN to SP. From reading the posts here, this seems easy enough by commenting out all the other flags, going slow at first.

Our database is already a kinda large, nearly 180 MB Gzipped for backup, so this will grow quite big with so many languages, so I think better to start small and work our way up, based on the size of the user base. According to this link, Top 10 World Internet Languages (http://www.internetworldstats.com/stats7.htm), we should do Chinese after English, followed by Spanish and then Japanese (see attached) to reach the large audience. I don't think I will translate minor languages from small language-Internet populations anytime soon, and will prioritize, unless Dave advises otherwise.

Also, we use vBSEO (of course!). So thanks for all the great posts on vBSEO regarding this mod.

In closing this post, I would like to again thank Dave for coming up with a way to translate vB posts (etc) to other languages so people who are searching for information can find that content. I have a few more questions, but this post is getting too long!

Thank you so much, kudos to you, someone who understands the project and it's goals. It's also nice to finally get some good feedback, this is truly a great mod and the single, most effective way of gaining huge amounts of traffic in a matter of weeks. Thanks again for your post, makes this feel a little more worthwhile.

imported_silkroad
07-14-2009, 03:55 PM
Thank you so much, kudos to you, someone who understands the project and it's goals. It's also nice to finally get some good feedback, this is truly a great mod and the single, most effective way of gaining huge amounts of traffic in a matter of weeks. Thanks again for your post, makes this feel a little more worthwhile.

You are welcome. I just installed it (vbseo install on 3.7.x) and it is working fine. I did not comment out any languages -- will just see how it goes.

I did notice that the URLs were not rewritten for the Flags. Is there some code to rewrite those URLs optimized for SEO?

Dave Hybrid
07-14-2009, 04:02 PM
You are welcome. I just installed it (vbseo install on 3.7.x) and it is working fine. I did not comment out any languages -- will just see how it goes.

I did notice that the URLs were not rewritten for the Flags. Is there some code to rewrite those URLs optimized for SEO?

They are rewritten, just like vbseo, they just have a query on the end...

If you want to convert them to a directory format you'll need to play with htaccess.

I didn't do this as it makes no difference seowise and making one htaccess fit 100's of users setups is impossible.

Thanks.

imported_silkroad
07-14-2009, 04:59 PM
They are rewritten, just like vbseo, they just have a query on the end...

If you want to convert them to a directory format you'll need to play with htaccess.

I didn't do this as it makes no difference seowise and making one htaccess fit 100's of users setups is impossible.

Thanks.

Oh! Thanks. I thought it made a difference to have a query (?) in the URL, but I am no SEO expert. I will defer to you, since you have been running this for so long!

I'll just leave things as the are (not change the sitemap generation either for now) and see what happens.

We're off to see the Wizard, the Wonderful Wizard of Oz....... :D

burntire
07-14-2009, 05:07 PM
Installed and thanks for the great work.

Dave Hybrid
07-14-2009, 05:13 PM
Oh! Thanks. I thought it made a difference to have a query (?) in the URL, but I am no SEO expert. I will defer to you, since you have been running this for so long!

I'll just leave things as the are (not change the sitemap generation either for now) and see what happens.

The URLs here at vb.org have ? querys, every standard vb forum has them, they make no difference at all except some say rewritten URLs look pretty, that's it, no seo value at all.

It's the long strings and pages that have multiple string for the same content you have to avoid like ww.domain.com/community/?sid=d161fcfbd7d2d99ef36fe89b5732c5ce

45wheelgun
07-14-2009, 05:42 PM
I was so excited when the flags came up, i thought I was finished. Sadly I get a "Cannot connect" error and it mentions syntax in line 4 by the ")". I figure i am doing something stupid, can you point me in the right direction?

Dave Hybrid
07-14-2009, 05:51 PM
It works on many other forums, individual issues are almost always the install not being followed properly. So go over that, again, and again. Also, without a url, I cant do anything.

45wheelgun
07-14-2009, 06:41 PM
It works on many other forums, individual issues are almost always the install not being followed properly. So go over that, again, and again. Also, without a url, I cant do anything.

I am CERTAIN this is pilot error. No question in my mind. I have PM'd you my URL

You will have to choose "Test Style" in order to see it.

I got pass the "Can't connect" message and i am to embarrassed to admit what was wrong. Now I get a URL with the "/?hl=ko" on the end of it, but a totally blank screen.

Again, I am sure it is something else I will be embarrassed about, but can you point it out to me? I have gone over the install multiple times attempted to find my error.

I just had my ISP install cURL this morning, could it be a permissions thing with cuRL? Here is the info they sent me about it:

CURL Information => libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
curl: /usr/bin/curl

Zi55
07-15-2009, 06:39 AM
Dear Dave ,
I've test your product in 4 forums , and all of them have the same problem , the flags wont be showed in the page , i try to edit the plugin and made it in this ways
ob_start();
include('./translateflags.php');
$translateflags = ob_get_contents();
ob_end_clean();

ob_start();
include('/home/mydomain/public_htrm/forum/translateflags.php');
$translateflags = ob_get_contents();
ob_end_clean();
and it won't work also , the flags appear only if i remove the ob_start and made the plugin like this
$translateflags = include('./translateflags.php');

they appear in first line you can't move them , i try this in 4 forums and 3 of them in one server and 1 in other server .
I hope you to help me urgently as i need this hack very important .
Thanks ,
Zi5

Dave Hybrid
07-15-2009, 09:58 AM
You need to use this code in the plugin;

ob_start();
include('translateflags.php');
$translateflags = ob_get_contents();
ob_end_clean();

You then add this to your template;

<!-- vBGT Code Start-->
<div align="center">
<!-- google_ad_section_start(weight=ignore) -->
$translateflags
<!-- google_ad_section_end -->
</div>
<!-- vBGT Code End -->

Make sure you upload translateflags.php to your FORUM folder.

At the end of the day the install works, you must have missed a step or not followed it correct.

Farman
07-15-2009, 11:02 AM
First of all Thank you so much for giving us such a great mod.

But on my forum it is taking too much time to load the page when I try to click on any flag. My forum is VBSeo Optimized, Is there any way to fast the page loading?

Dave Hybrid
07-15-2009, 11:11 AM
First of all Thank you so much for giving us such a great mod.

But on my forum it is taking too much time to load the page when I try to click on any flag. My forum is VBSeo Optimized, Is there any way to fast the page loading?


Note - This script runs off a database. The 1st time a translated page is loaded by a user or search bot the words need to be sent to the Google Translation service, the words are then saved into the database, this can take a varying amount of seconds depending on how heavy your pages are with content. The next time the page is requested it loads from cache and speed is instant. Over time, users and bots will cache your entire site automatically and all translated pages will load the same as normal pages. Please be patient, this is a long term MOD, Google doesn't index normal pages overnight and these translated pages are no different.

imported_silkroad
07-15-2009, 12:12 PM
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:
@curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

change it to:

@curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@curl_setopt($ch, CURLOPT_REFERER,"http://$_SERVER[SERVER_NAME]$_SERVER[VBSEO_URI]");
@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

2. Also in translate.php

Go to http://code.google.com/apis/ajaxsearch/signup.html

Get an api key for your site, copy it

find:

@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


@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));

Of course replace "COPYYOURKEYHERE" with the key you got from google.


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.

Thanks! I added this and it is working. Seems like a good idea to follow Google's requirements and use this API key.

imported_silkroad
07-15-2009, 04:10 PM
Interesting: Installed barely one day and:

3 table(s) Sum 1,823,325 Records MyISAM 338.8 MB

Sweeks
07-15-2009, 04:19 PM
Note - This script runs off a database. The 1st time a translated page is loaded by a user or search bot the words need to be sent to the Google Translation service, the words are then saved into the database, this can take a varying amount of seconds depending on how heavy your pages are with content. The next time the page is requested it loads from cache and speed is instant. Over time, users and bots will cache your entire site automatically and all translated pages will load the same as normal pages. Please be patient, this is a long term MOD, Google doesn't index normal pages overnight and these translated pages are no different.

If you watch your database for this in phpmyadmin and click the language flags on a new install if it working you can clearly see the filesizes growing each click :)

relaxiha
07-15-2009, 05:35 PM
Hi, please add your language Persian

1Unreal
07-15-2009, 05:44 PM
Hi, please add your language Persian

This mod uses the Google translation API and Google doesn't currently support Persian.

Dave Hybrid
07-15-2009, 05:52 PM
This mod uses the Google translation API and Google doesn't currently support Persian.

Actually it does support it now, just adsense isnt allowed on persian pages, and as most of run adsense i wont be adding it. Thanks.

Dave Hybrid
07-15-2009, 05:53 PM
Interesting: Installed barely one day and:

Wow, that's pretty good, mine goes up around 500k a day. You must have a large site with a lot of spider activity.

burntire
07-15-2009, 06:39 PM
This is what I have after 24 hours. Not bad

3 table(s) Sum 71,282 9.8 MiB

racale
07-15-2009, 06:45 PM
ce something wrong but I do not know what and where,now I'm trying to vbseo and does nothing to farenon

Dave Hybrid
07-15-2009, 07:05 PM
This is what I have after 24 hours. Not bad

3 table(s) Sum 71,282 9.8 MiB

Sounds spot on for your site size/popularity. :up:

Sweeks
07-15-2009, 07:49 PM
Is there a simple way to get the flags code to validate? That is the only 1 problem left with this mod I think :D

Dave Hybrid
07-15-2009, 07:50 PM
Is there a simple way to get the flags code to validate? That is the only 1 problem left with this mod I think :D

Really? The code validates just fine on my forums.

Sweeks
07-15-2009, 07:58 PM
I will show you where the errors are:

http://www.prowebforums.com/forumdisplay.php?f=2

http://www.mumslife.com/forumdisplay.php?f=83

Seems to be forumdisplay and showthread unless I am mistaken. I havent tested it on the homepage as I am using only elsewhere than the index ;)

Dave Hybrid
07-15-2009, 08:06 PM
It because the non vbseo version uses ampersands (&) in the urls. Difficult to avoid unless you rewrite them. For what it's worth seowise the engines dont give a monkeys about valid markup. But I agree it is a pain, i myself settle for nothing less than valid markup.

Sweeks
07-15-2009, 08:10 PM
It because the non vbseo version uses ampersands (&) in the urls. Difficult to avoid unless you rewrite them. For what it's worth seowise the engines dont give a monkeys about valid markup. But I agree it is a pain, i myself settle for nothing less than valid markup.

Thanks for letting me know :up: do you have any guides on htaccess rewriting for these specific URLs or a guide I could use to fix the ampersands problem? That would a great help :)

alehawk
07-15-2009, 09:13 PM
thank you very much for this mod, is usefull for non english language sites.

Dave Hybrid
07-15-2009, 09:21 PM
thank you very much for this mod, is usefull for non english language sites.

Thanks for removing the credit link, what is with some of you. :down:

burntire
07-15-2009, 11:16 PM
You get credit on my site. LOL

Dave Hybrid
07-15-2009, 11:24 PM
You get credit on my site. LOL

And i extend my thanks for that, it shows kind and keeps the project growing and developing.

It's not much to ask considering how much traffic this mod gives the end user, which makes them more in adsense.

Some people are just take, take, take.

burntire
07-16-2009, 12:10 AM
And i extend my thanks for that, it shows kind and keeps the project growing and developing.

It's not much to ask considering how much traffic this mod gives the end user, which makes them more in adsense.

Some people are just take, take, take.

Hey its that all about me generation out there.

I appreciate your hard work.

azn_romeo_4u
07-16-2009, 01:21 AM
Anyone with 2mill + post try this? This would increase my page content by millions...could cause some massive cpu/memory problems...

is there a simple way to remove them in case that happens? I would just dumb the new tables that were created right?

imported_silkroad
07-16-2009, 01:28 AM
Anyone with 2mill + post try this? This would increase my page content by millions...could cause some massive cpu/memory problems...

is there a simple way to remove them in case that happens? I would just dumb the new tables that were created right?

When you install this, you will see that your post count is not that big of a deal because pages do not get translated and stored in the database until someone, or a bot, pulls a page with the translation flag at the end.

So, there is no mass "translation" at all, if you have no bots clicking on the translations flags; and even if you have GoogleBot pulling on your site at all times, like we do, with 20 to 50 bots pulling at any time, the bots do not only pull on the translations flags, they are pulling all your content, so don't worry, this mod will not crash your site.

Cheers.

Zi55
07-16-2009, 07:19 AM
You need to use this code in the plugin;

ob_start();
include('translateflags.php');
$translateflags = ob_get_contents();
ob_end_clean();

You then add this to your template;

<!-- vBGT Code Start-->
<div align="center">
<!-- google_ad_section_start(weight=ignore) -->
$translateflags
<!-- google_ad_section_end -->
</div>
<!-- vBGT Code End -->

Make sure you upload translateflags.php to your FORUM folder.

At the end of the day the install works, you must have missed a step or not followed it correct.

Dear Dave ,
I am sure everything has done fine , maybe because of my MySQL or Php version .
I use php 5.2.10 and MySQL 5.0.83 did you wanna me to send you one of sites details , so you can check by your self ?
Thanks ,
Zi55

CThiessen
07-16-2009, 07:40 AM
So, there is no mass "translation" at all, if you have no bots clicking on the translations flags; and even if you have GoogleBot pulling on your site at all times, like we do, with 20 to 50 bots pulling at any time, the bots do not only pull on the translations flags, they are pulling all your content, so don't worry, this mod will not crash your site.

Cheers.
Hi,
well not this script will crash your server.
But you should have ever an eye on your Server load and memory.
This script needs some of that. My Server crashed after I put this script on.
So I am try to optimise my server settings without any success.

The reason (I hope) was the crawler form www brandwatch net
They didi not respect the robos.txt at all:
User-agent: magpie-crawler
Disallow: /
Dose not help.

They try to crawl my site with a speed 50 times higher than Google.
All ?normal? Search Engines donning their Job with more respect.

I goning to move server anyway but is planed for November this Year.
My current one has only 1G of memory.
So: additional needs + to high crawler activities + low memory = crash

But it?s not this script, it was the crawler. Now he find himself in the IP-Tables as ?Drop? :p
This AddOn is working very well.

Christian

imported_silkroad
07-16-2009, 06:04 PM
In appreciation of Dave's mod, I have updated a screen shot of some of our charts, where I have superimposed the timeline of when this mod was installed so you can see load avg, network load, GoogleBot hits/sec, etc.

From the charts, you can get a fairly good idea what to expect from this mod as far as performance hit and how GoogleBot starts to interact.

Mostly, you will see increased network usage based on GoogleBot hitting your flags and the translations, in and out, which will effect your load, network utilization, cpu, apache workers, etc.

It's all in the graphs... attached for reference. A picture speaks a thousand words, so they say :-)

Graph and stats discussion moved here (http://www.unix.com/web-programming-web-2-0-mashups/114718-perfornance-metrics-vb-global-translator.html).

racale
07-16-2009, 06:49 PM
evening all

I did this https://vborg.vbsupport.ru/showpost.php?p=1845065&postcount=294


I now find it on cleaner and saver this is normal



https://vborg.vbsupport.ru/external/2009/07/14.gif

also doing this and always slow

good job thanks to all

CThiessen
07-16-2009, 07:01 PM
A picture speaks a thousand words, so they say :-)

Hi,
were you get that picture from?
Looks like a pretty good chart.


Christian

imported_silkroad
07-16-2009, 07:15 PM
Hi,
were you get that picture from?
Looks like a pretty good chart.


Christian

Zabbix

imported_silkroad
07-16-2009, 07:21 PM
v2.4 Official Release

* More DB optimization, fastest ever read/write cache speed :)

Upgrade Info;

Open new translate.php file, add settings as detailed in install and disable cache, so $enablecache=false

Run the following MySQL querys one by one.

Hi Dave,

Do we need to do this on a new 2.4 install and why or why not?

Thanks!

Dave Hybrid
07-16-2009, 07:42 PM
In appreciation of Dave's mod, I have updated a screen shot of some of our charts, where I have superimposed the timeline of when this mod was installed so you can see load avg, network load, GoogleBot hits/sec, etc.

From the charts, you can get a fairly good idea what to expect from this mod as far as performance hit and how GoogleBot starts to interact.

Mostly, you will see increased network usage based on GoogleBot hitting your flags and the translations, in and out, which will effect your load, network utilization, cpu, apache workers, etc.

It's all in the graphs... attached for reference. A picture speaks a thousand words, so they say :-)

Hi, what script are you using to pull all that data mate?

Dave Hybrid
07-16-2009, 07:42 PM
Hi Dave,

Do we need to do this on a new 2.4 install and why or why not?

Thanks!

No, you originally downloaded and installed 2.4, which is the latest version.

NLP-er
07-16-2009, 11:13 PM
evening all

I did this https://vborg.vbsupport.ru/showpost.php?p=1845065&postcount=294


I now find it on cleaner and saver this is normal



https://vborg.vbsupport.ru/external/2009/07/14.gif

also doing this and always slow

good job thanks to all

Thats ok. Cleaner ans saver are only for maintenance - those are used manually when you want to delete duplicated data wrom wt_cache once a while. such duplication can happen only in this table - possible, but rare :)

NLP-er
07-16-2009, 11:14 PM
Hi Dave,

Do we need to do this on a new 2.4 install and why or why not?

Thanks!

No - this is only update instruction so it applaies when you update from previous version. In new instalation of newest release, everything is the best :D

imported_silkroad
07-17-2009, 12:03 AM
Hi, what script are you using to pull all that data mate?

Hi Dave,

We are big fans of Zabbix, which is free and open source. See, for example some, this post on extending Zabbix to monitor Apache2. Treason Uncloaked!, GoogleBot(s) and vBulletin:

Version 3: Zabbix Scripts for Monitoring Apache2 (+ vBulletin) (http://www.unix.com/web-programming-web-2-0-mashups/103922-zabbix-template-perl-script-monitoring-apache2.html)

Enjoy!

imported_silkroad
07-17-2009, 12:06 AM
No - this is only update instruction so it applaies when you update from previous version. In new instalation of newest release, everything is the best :D

Thanks! Great idea to have upgrade instructions to optimize tables!

45wheelgun
07-17-2009, 01:40 PM
I want to thank Dave for writing such a cool package, and for putting up with me. My ISP "did something" to make it work, and I am thrilled. Dave bent over backwards trying to help me get it together.

To those who are removing the ad, just remember karma is a Bit..

45wheelgun
07-17-2009, 01:42 PM
Is the language you pick supposed to be "sticky"? While I am getting the translations fine, when you click a link of the forum page rather then seeing page two in the language you picked, you are seeing it in English. Is this the way it is supposed to be or have I still got some work to do?

CThiessen
07-17-2009, 03:32 PM
HI,
I just see in Woopra that i am Number ONE in Google:

Google Results (http://www.google.co.th/search?hl=th&q=%E0%B8%84%E0%B8%B3%E0%B8%A8%E0%B8%B1%E0%B8%9E%E0 %B8%97%E0%B9%8C%E0%B8%A0%E0%B8%B2%E0%B8%A9%E0%B8%B 2%E0%B8%9A%E0%B8%A3%E0%B8%B2%E0%B8%8B%E0%B8%B4%E0% B8%A5&meta=&rlz=1R2AMSA_en&aq=f&oq=)


NO Idea in what.
Great Mod.

Christian

azn_romeo_4u
07-17-2009, 04:11 PM
Is the language you pick supposed to be "sticky"? While I am getting the translations fine, when you click a link of the forum page rather then seeing page two in the language you picked, you are seeing it in English. Is this the way it is supposed to be or have I still got some work to do?


I noticed that as well, it doesn't get stickied. Only on the page that you are on. That in itself is a pro and con though I think.

Neutral Singh
07-17-2009, 07:43 PM
Amazing Mod! Is it possible to add other languages? If yes what is simplest approach to it... i would like to have Brazilian and a few other in the list... how could i do it? Thanks again!!

cynthetiq
07-17-2009, 08:25 PM
while we have some information as to how much traffic is increased, what about the real traffic that matters which is converting this to more membership.

Can anyone correlate this increase in traffic to getting more members?

imported_silkroad
07-18-2009, 02:23 AM
while we have some information as to how much traffic is increased, what about the real traffic that matters which is converting this to more membership.

Can anyone correlate this increase in traffic to getting more members?

I think the stated goal of this mod is to increase search engine referral traffic. Converting new visits to members (active or not) is a completely different process. Any "stats" in this area would be misleading, IMHO.

imported_silkroad
07-18-2009, 02:36 AM
Thats ok. Cleaner ans saver are only for maintenance - those are used manually when you want to delete duplicated data wrom wt_cache once a while. such duplication can happen only in this table - possible, but rare :)

I have a related question.

Would it be more efficient and faster to have database tables for each translation instead of "small" and "medium" mega tables for an entire site?

We have been running this mod for just a few days, and at the current tables growth rate, our translation database will be nearly 1.2 Terrabytes in three dB tables when it is all "done and dusted" as they say, hahaha. I calculate this, perhaps incorrectly, as it seems Google has have cached around 200 pages (for each of 28 languages =~ 6000 pages) out out nearly 400Kpages, and the translation dB is currently 600MB. If we assume approximate linear growth, the full transation dB would be 400K/200 * 600 MB or 1.2 TB

I notice that our translated pages are much slower loading than the same page not in the translation dB (by quite a large factor, much slower, even though there are less MySQL queries for the translated page).

Why not put the translated pages, at least, in their own tables?

NLP-er
07-18-2009, 03:22 AM
while we have some information as to how much traffic is increased, what about the real traffic that matters which is converting this to more membership.

Can anyone correlate this increase in traffic to getting more members?

For me it's not relevant. My forum is in Polish and I don't want anyone who doesn't know Polish be user.

I simply hope for more clicks in adSense :D

NLP-er
07-18-2009, 03:27 AM
I have a related question.

Would it be more efficient and faster to have database tables for each translation instead of "small" and "medium" mega tables for an entire site?

We have been running this mod for just a few days, and at the current tables growth rate, our translation database will be nearly 1.2 Terrabytes in three dB tables when it is all "done and dusted" as they say, hahaha. I calculate this, perhaps incorrectly, as it seems Google has have cached around 200 pages (for each of 28 languages =~ 6000 pages) out out nearly 400Kpages, and the translation dB is currently 600MB. If we assume approximate linear growth, the full transation dB would be 400K/200 * 600 MB or 1.2 TB

I notice that our translated pages are much slower loading than the same page not in the translation dB (by quite a large factor, much slower, even though there are less MySQL queries for the translated page).

Why not put the translated pages, at least, in their own tables?

It wouldn't :) DB has set indexes and data access is instant and constant :)

Translated pages will ALWAYS generate slower that not translated because first is generated normal page and after that it's translated :)

imported_silkroad
07-18-2009, 04:35 AM
It wouldn't :) DB has set indexes and data access is instant and constant :)

OK, I'll put that aside and change the subject.

Let's discuss Google indexing and translateflags.php.

If we assume that Google has limited resources to index a site, and that GoogleBot does not distinguish between the various language flags, then this seems to imply that it will be more efficient, and generate more search traffic, in the beginning of the translation process, to only expose the top ten or so Internet-language flags.

The reason for this is that if Google indexes all translation languages equally, Google will index languages with very small Internet-populations with the same priority of languages with high Internet populations.

So, unless I am wrong, which I could be :) it seems to indicate that to optimize search referral results, in the first month or two, a site should expose only the top 10 or so flags (from an Internet-usage perspective) and not expose the minor languages.

Is this how you see things as well?

45wheelgun
07-18-2009, 10:19 AM
Amazing Mod! Is it possible to add other languages? If yes what is simplest approach to it... i would like to have Brazilian and a few other in the list... how could i do it? Thanks again!!

This script is only limited by what Google Translation offers. At this point it is 28 languages. As for "Brazilian", I am not sure what part of Brazil speaks Brazilian, but in most of Brazil they speak Portuguese, which Google translation already offers....:)

Dave Hybrid
07-18-2009, 11:05 AM
I think the stated goal of this mod is to increase search engine referral traffic. Converting new visits to members (active or not) is a completely different process. Any "stats" in this area would be misleading, IMHO.

Indeed, how well a site converts has more to do with the site than the traffic source imo.

Either way the traffic is organic, which is arguably the best source you can get.

Dave Hybrid
07-18-2009, 11:07 AM
This script is only limited by what Google Translation offers. At this point it is 28 languages. As for "Brazilian", I am not sure what part of Brazil speaks Brazilian, but in most of Brazil they speak Portuguese, which Google translation already offers....:)

What he said. :up:

Dave Hybrid
07-18-2009, 11:09 AM
OK, I'll put that aside and change the subject.

Let's discuss Google indexing and translateflags.php.

If we assume that Google has limited resources to index a site, and that GoogleBot does not distinguish between the various language flags, then this seems to imply that it will be more efficient, and generate more search traffic, in the beginning of the translation process, to only expose the top ten or so Internet-language flags.

The reason for this is that if Google indexes all translation languages equally, Google will index languages with very small Internet-populations with the same priority of languages with high Internet populations.

So, unless I am wrong, which I could be :) it seems to indicate that to optimize search referral results, in the first month or two, a site should expose only the top 10 or so flags (from an Internet-usage perspective) and not expose the minor languages.

Is this how you see things as well?

If you want to throttle the release of the new translated pages then do it, personally i have added the lot and just let google decide what it likes and what it doesnt like.

Dave Hybrid
07-18-2009, 11:13 AM
I have a related question.

Would it be more efficient and faster to have database tables for each translation instead of "small" and "medium" mega tables for an entire site?

We have been running this mod for just a few days, and at the current tables growth rate, our translation database will be nearly 1.2 Terrabytes in three dB tables when it is all "done and dusted" as they say, hahaha. I calculate this, perhaps incorrectly, as it seems Google has have cached around 200 pages (for each of 28 languages =~ 6000 pages) out out nearly 400Kpages, and the translation dB is currently 600MB. If we assume approximate linear growth, the full transation dB would be 400K/200 * 600 MB or 1.2 TB

I notice that our translated pages are much slower loading than the same page not in the translation dB (by quite a large factor, much slower, even though there are less MySQL queries for the translated page).

Why not put the translated pages, at least, in their own tables?

The database can only be so fast, the work has to be done behind the scenes so the translated pages will never match the non translated pages.

That said my site is not noticeable, I also checked your site and the speed was pretty identical for both types of pages.

Are you sure your not comparing a page never cached to one that is cached vs a normal page?

Note - This script runs off a database. The 1st time a translated page is loaded by a user or search bot the words need to be sent to the Google Translation service, the words are then saved into the database, this can take a varying amount of seconds depending on how heavy your pages are with content. The next time the page is requested it loads from cache and speed is instant. Over time, users and bots will cache your entire site automatically and all translated pages will load the same as normal pages. Please be patient, this is a long term MOD, Google doesn't index normal pages overnight and these translated pages are no different.

Sweeks
07-18-2009, 11:29 AM
The database can only be so fast, the work has to be done behind the scenes so the translated pages will never match the non translated pages.

That said my site is not noticeable, I also checked your site and the speed was pretty identical for both types of pages.

Are you sure your not comparing a page never cached to one that is cached vs a normal page?

Are their plans to update this mod when vb4 is out if it is needed :D

Dave Hybrid
07-18-2009, 11:38 AM
Are their plans to update this mod when vb4 is out if it is needed :D

As long as vB 4 has a plugin system it should work without any changes. But yeah, if it needs changing it will be, I use it and plan to upgrade to vb 4 on release day as i have been waiting for the CMS part for yonks.

45wheelgun
07-18-2009, 12:18 PM
Dave,

Is there any way to add the option to make the translation "sticky"? I mean so that once a user chooses to translate a page, all other pages (either per session or permanently) are translated?

I would like the option of having members who always see the forum in their native language.

Thanks again for this amazing mod....I'm loving it.

Dave Hybrid
07-18-2009, 12:26 PM
Dave,

Is there any way to add the option to make the translation "sticky"? I mean so that once a user chooses to translate a page, all other pages (either per session or permanently) are translated?

I would like the option of having members who always see the forum in their native language.

Thanks again for this amazing mod....I'm loving it.

Not currently, no.

racale
07-18-2009, 01:55 PM
done as funeral now when I click on the flags to me that this

https://vborg.vbsupport.ru/showpost.php?p=1845065&postcount=294

Alter table wt_cache_short collate utf8_bin; ALTER TABLE wt_cache_short CHANGE tl tl VARCHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL; ALTER TABLE wt_cache_short CHANGE originaltext originaltext VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL; ALTER TABLE wt_cache_short CHANGE translated translated VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL; Alter table wt_cache_medium collate utf8_bin; ALTER TABLE wt_cache_medium CHANGE tl tl VARCHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL; ALTER TABLE wt_cache_medium CHANGE originaltext originaltext VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL; ALTER TABLE wt_cache_medium CHANGE translated translated VARCHAR( 1000 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL; Alter table wt_cache collate utf8_bin; ALTER TABLE wt_cache CHANGE tl tl VARCHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL; ALTER TABLE wt_cache CHANGE translated translated TEXT CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL; ALTER TABLE wt_cache CHANGE translated translated VARCHAR( 65000 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL; CREATE TABLE saver ( id INT, tl VARCHAR(10), originaltext VARCHAR(65000) ) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE TABLE cleaner ( id INT ) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_general_ci; delete from cleaner; delete from saver; insert into saver (SELECT min(id) as id, tl, originaltext from wt_cache group by originaltext,tl having count(*) > 1); insert into cleaner (SELECT cache.id from saver, wt_cache cache where saver.originaltext=cache.originaltext and saver.tl=cache.tl and saver.id<>cache.id); DELETE FROM wt_cache USING wt_cache INNER JOIN cleaner ON wt_cache.id = cleaner.id; delete from cleaner; delete from saver; insert into saver (SELECT min(id) as id, tl, originaltext from wt_cache_short group by originaltext,tl having count(*) > 1); insert into cleaner (SELECT cache.id from saver, wt_cache_short cache where saver.originaltext=cache.originaltext and saver.tl=cache.tl and saver.id<>cache.id); DELETE FROM wt_cache_short USING wt_cache_short INNER JOIN cleaner ON wt_cache_short.id = cleaner.id; delete from cleaner; delete from saver; insert into saver (SELECT min(id) as id, tl, originaltext from wt_cache_medium group by originaltext,tl having count(*) > 1); insert into cleaner (SELECT cache.id from saver, wt_cache_medium cache where saver.originaltext=cache.originaltext and saver.tl=cache.tl and saver.id<>cache.id); DELETE FROM wt_cache_medium USING wt_cache_medium INNER JOIN cleaner ON wt_cache_medium.id = cleaner.id; OPTIMIZE TABLE wt_cache, wt_cache_medium, wt_cache_short; alter table wt_cache_short drop index originaltext; create UNIQUE INDEX originaltext on wt_cache_short (originaltext, tl); alter table wt_cache_medium drop index originaltext; create UNIQUE INDEX originaltext on wt_cache_medium (originaltext, tl);



What should I do thanks

good job at all

imported_silkroad
07-18-2009, 02:55 PM
Are you sure your not comparing a page never cached to one that is cached vs a normal page?

Yes, I am sure I am comparing cached pages, because I know how this product works (except for the developer details of the database cache design), and of course I know the difference of discussing performance of a page that is in database v. one that has not yet been translated.

I don't wish to get on your bad side, so I'll not comment further :D

Recently I worked directly with Amazon AWS on a CloudFront/S3 performance issue regarding "before" and "after" results for a website moving to Amazon AWS. We published the results.

In addition, I have a lot of experience tuning MySQL for our site, and can see numerous issues in the database performance before and after mods are installed. For example, a mod that uses blobs in the MySQL db table cannot be tmp cached to memory and must be tmp cached to disk, lowering performance .... etc etc.

As I mentioned, I want to stay on your good side, so I'll not comment further :D

Dave Hybrid
07-18-2009, 03:02 PM
Yes, I am sure I am comparing cached pages, because I know how this product works (except for the developer details of the database cache design), and of course I know the difference of discussing performance of a page that is in database v. one that has not yet been translated.

I don't wish to get on your bad side, so I'll not comment further :D

Recently I worked directly with Amazon AWS on a CloudFront/S3 performance issue regarding "before" and "after" results for a website moving to Amazon AWS. We published the results.

In addition, I have a lot of experience tuning MySQL for our site, and can see numerous issues in the database performance before and after mods are installed. For example, a mod that uses blobs in the MySQL db table cannot be cached and must be written to disk, lowering performance ;)

As I mentioned, I want to stay on your good side, so I'll not comment further :D

I certainly wasnt trying to insult you, many do not understand how it works.

If you have any code suggestions I'd be happy to test them out. Thanks.

imported_silkroad
07-18-2009, 03:16 PM
If you have any code suggestions I'd be happy to test them out. Thanks.

One of the things I noticed was that this mod uses blobs in the dB. After installing, my MySQL tuning scripts starting complaining that a high percentage of temporary tables were being written to disk v. memory. I doubled the size of both the heap and tmp table cache and it did not help giving the message (attached in the screen shot).

Note: I just rebooted MySQL, so the number of temp tables written to disk increases the longer this mod runs.

Cheers.

Dave Hybrid
07-18-2009, 03:23 PM
@NLP-er - What's your opinion on this?

@silkroad - He's the database guy ;P

imported_silkroad
07-18-2009, 04:01 PM
On a related note, I ran a number of comparisons similar to below(directly on the server where the db is located):

time curl http://URL1 > /dev/null
time curl http://URL1?hl=flag > /dev/null

(after the initlal translation of course)

My early results show that the translated files take about 40 - 50% more time to load than the untranslated files, FYI.

On average we would see around 170ms for a typical "before" time and around 240 ms for a typical "after" time.

(and the file size change did not account for the difference).

Just FYI.

imported_silkroad
07-18-2009, 04:13 PM
PS: I have not drawn any conclusions, I just was commenting that I have noticed some differences in performance (before/after), so please don't be unhappy with me. Thanks. :o

Dave Hybrid
07-18-2009, 04:14 PM
The thing is, this stuff cost money to develop and I dont see a few milliseconds as good value for money. What I'm saying is if you want to try to further the DB development then be my guest, but I am happy with it's current state and wont be myself.

Not being funny just being straight with you, I'm not a DB coder so can't comment in depth or do this myself.

imported_silkroad
07-18-2009, 05:36 PM
The thing is, this stuff cost money to develop and I dont see a few milliseconds as good value for money. What I'm saying is if you want to try to further the DB development then be my guest, but I am happy with it's current state and wont be myself.

Not being funny just being straight with you, I'm not a DB coder so can't comment in depth or do this myself.

Hi Dave!

I agree, the most important performance stat, of course, is the increase of search engine referral traffic over time. We are completely "wired" to record any changes, so I am looking forward to reporting the results with some nice graphs :-)

NLP-er
07-18-2009, 06:15 PM
OK, I'll put that aside and change the subject.

Let's discuss Google indexing and translateflags.php.

If we assume that Google has limited resources to index a site, and that GoogleBot does not distinguish between the various language flags, then this seems to imply that it will be more efficient, and generate more search traffic, in the beginning of the translation process, to only expose the top ten or so Internet-language flags.

The reason for this is that if Google indexes all translation languages equally, Google will index languages with very small Internet-populations with the same priority of languages with high Internet populations.

So, unless I am wrong, which I could be :) it seems to indicate that to optimize search referral results, in the first month or two, a site should expose only the top 10 or so flags (from an Internet-usage perspective) and not expose the minor languages.

Is this how you see things as well?

I don't know google spiders algorithms, but if you will not expose some languages google definitively will not visit it ;)

NLP-er
07-18-2009, 06:18 PM
This script is only limited by what Google Translation offers. At this point it is 28 languages. As for "Brazilian", I am not sure what part of Brazil speaks Brazilian, but in most of Brazil they speak Portuguese, which Google translation already offers....:)

Google offers over 40 languages :) I use them all :p

NLP-er
07-18-2009, 06:26 PM
done as funeral now when I click on the flags to me that this

https://vborg.vbsupport.ru/showpost.php?p=1845065&postcount=294

Alter table wt_cache_short collate utf8_bin; ALTER TABLE wt_cache_short CHANGE tl tl VARCHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL; ALTER TABLE wt_cache_short CHANGE originaltext originaltext VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL; ALTER TABLE wt_cache_short CHANGE translated translated VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL; Alter table wt_cache_medium collate utf8_bin; ALTER TABLE wt_cache_medium CHANGE tl tl VARCHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL; ALTER TABLE wt_cache_medium CHANGE originaltext originaltext VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL; ALTER TABLE wt_cache_medium CHANGE translated translated VARCHAR( 1000 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL; Alter table wt_cache collate utf8_bin; ALTER TABLE wt_cache CHANGE tl tl VARCHAR( 10 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL; ALTER TABLE wt_cache CHANGE translated translated TEXT CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL; ALTER TABLE wt_cache CHANGE translated translated VARCHAR( 65000 ) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL; CREATE TABLE saver ( id INT, tl VARCHAR(10), originaltext VARCHAR(65000) ) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE TABLE cleaner ( id INT ) ENGINE = MYISAM, CHARACTER SET utf8 COLLATE utf8_general_ci; delete from cleaner; delete from saver; insert into saver (SELECT min(id) as id, tl, originaltext from wt_cache group by originaltext,tl having count(*) > 1); insert into cleaner (SELECT cache.id from saver, wt_cache cache where saver.originaltext=cache.originaltext and saver.tl=cache.tl and saver.id<>cache.id); DELETE FROM wt_cache USING wt_cache INNER JOIN cleaner ON wt_cache.id = cleaner.id; delete from cleaner; delete from saver; insert into saver (SELECT min(id) as id, tl, originaltext from wt_cache_short group by originaltext,tl having count(*) > 1); insert into cleaner (SELECT cache.id from saver, wt_cache_short cache where saver.originaltext=cache.originaltext and saver.tl=cache.tl and saver.id<>cache.id); DELETE FROM wt_cache_short USING wt_cache_short INNER JOIN cleaner ON wt_cache_short.id = cleaner.id; delete from cleaner; delete from saver; insert into saver (SELECT min(id) as id, tl, originaltext from wt_cache_medium group by originaltext,tl having count(*) > 1); insert into cleaner (SELECT cache.id from saver, wt_cache_medium cache where saver.originaltext=cache.originaltext and saver.tl=cache.tl and saver.id<>cache.id); DELETE FROM wt_cache_medium USING wt_cache_medium INNER JOIN cleaner ON wt_cache_medium.id = cleaner.id; OPTIMIZE TABLE wt_cache, wt_cache_medium, wt_cache_short; alter table wt_cache_short drop index originaltext; create UNIQUE INDEX originaltext on wt_cache_short (originaltext, tl); alter table wt_cache_medium drop index originaltext; create UNIQUE INDEX originaltext on wt_cache_medium (originaltext, tl);



What should I do thanks

good job at all

I don't understand what you are asking about... :confused:

NLP-er
07-18-2009, 06:30 PM
In addition, I have a lot of experience tuning MySQL for our site, and can see numerous issues in the database performance before and after mods are installed. For example, a mod that uses blobs in the MySQL db table cannot be tmp cached to memory and must be tmp cached to disk, lowering performance .... etc etc.

That's why I splitted cache to 3 tables :)

NLP-er
07-18-2009, 06:45 PM
One of the things I noticed was that this mod uses blobs in the dB. After installing, my MySQL tuning scripts starting complaining that a high percentage of temporary tables were being written to disk v. memory. I doubled the size of both the heap and tmp table cache and it did not help giving the message (attached in the screen shot).

Note: I just rebooted MySQL, so the number of temp tables written to disk increases the longer this mod runs.

Cheers.

It does use blobs and it have to :) Any other solution for storing really long strings?...

NLP-er
07-18-2009, 06:48 PM
@NLP-er - What's your opinion on this?

@silkroad - He's the database guy ;P

My opinion is - silkroad is telling us what we use - I made it so I know what we use :D
Let him try to find out better solution if he thinks that it's possible :)

@silkroad - do you have any suggestions for better solution or just like to talk?... :)

NLP-er
07-18-2009, 06:57 PM
PS: I have not drawn any conclusions, I just was commenting that I have noticed some differences in performance (before/after), so please don't be unhappy with me. Thanks. :o

As I already wrote - translated page will always generate slower, because first normal page is generated and then it is translated. So to normal time you have to add translation time which is greater than 0 - even if cached (time of taking translation from cache is also greater than 0) :) I'm suprised that you expected somesthing else :)

Thanks for your note - we are aware of this :)

Also note that mod don't affect time of normal page generation, because it does nothing then :)

Manoel J?nior
07-18-2009, 09:56 PM
There appears to me the pictures .. It is as if the variable $translateflags was not working.

I changed the following sentences, but not resolved:

Hook Location: global_complete, changed to:
require_once ( "forum/translate.php");

Hook Location: global_start, changed to:
include ( 'forum/translateflags.php');

If I am at my site:

www.example.com/forum/translateflags.php images appear correctly.

What can be? Why is not the images in my forum?

PSA.: It is the path of the images, as you can see I already checked. This seems more a problem of the call variable.

PSB.: I came in contact with my host and the role of CURL is enabled.

Dave Hybrid
07-18-2009, 10:02 PM
As per the install instructions you do not have forums in the path despite uploading the files there.

Hook Location: global_complete, changed to:
require_once ( "translate.php");

Hook Location: global_start, changed to:
include ( 'translateflags.php');

Manoel J?nior
07-18-2009, 10:33 PM
Even so, did this change because the first failed.

What can I do?

imported_silkroad
07-19-2009, 10:47 AM
As I already wrote - translated page will always generate slower, because first normal page is generated and then it is translated. So to normal time you have to add translation time which is greater than 0 - even if cached (time of taking translation from cache is also greater than 0) :) I'm suprised that you expected somesthing else :)

Thanks for your note - we are aware of this :)

Also note that mod don't affect time of normal page generation, because it does nothing then :)

Yes, agreed. That is what you say in this thread, and that is what we observe, but that is not what is said in the description of the mod ;) ;)

(wink, wink)

Dave Hybrid
07-19-2009, 10:52 AM
Yes, agreed. That is what you say in this thread, and that is what we observe, but that is not what is said in the description of the mod ;) ;)

(wink, wink)

Where in the mod description does it say translated pages are identical speed to normal pages. :confused:

imported_silkroad
07-19-2009, 11:04 AM
I don't know google spiders algorithms, but if you will not expose some languages google definitively will not visit it ;)

After running this great mod for around 4-5 days, I can advise that, for big boards with hundreds of thousands of posts, this mod will use a lot of disk space. Please keep in mind, there is a huge difference in translating 400K pages compared to 20K as far as storage requirements.

We have nearly 400K pages indexed by Google, and based on the current G index of newly translated pages compared to the size of the database, we will would use over 1 TB of disk space to store translations for all 28 flags in the database.

We don't have 1 TB of storage available for translations at this time ;) , so until we have a new storage configuration that can store over a TB of data, we will only expose the Top 10 Internet-population languages.

We will monitor this for another week, and if the database continues to grow, we will have to cut back to the Top 5 because we can't allocate 100s of GB to translations. We did not size our server that large :D . FWIW: I am thinking to move the translation dB to Amazon EC2 and redirect translated pages to EC2 in the future.

It would be great to hear from others running this mod for many months to post how many posts and threads they have in vB, the number of translated links indexed by Google, and the size of their translated dB. Please post, thanks!

Thanks again for a great mod.

Also, I look forward to report back on search engine referral traffic increases in the coming months :D

imported_silkroad
07-19-2009, 11:06 AM
Where in the mod description does it say translated pages are identical speed to normal pages. :confused:

Right here ;)

Over time, users and bots will cache your entire site automatically and all translated pages will load the same as normal pages.

For me, and I am sure others, "load the same"... means "load the same"...... :D

Dave Hybrid
07-19-2009, 11:14 AM
After running this great mod for around 4-5 days, I can advise that, for big boards with hundreds of thousands of posts, this mod will use a lot of disk space. Please keep in mind, there is a huge difference in translating 400K pages compared to 20K as far as storage requirements.

We have nearly 400K pages indexed by Google, and based on the current G index of newly translated pages compared to the size of the database, we will would use over 1 TB of disk space to store translations for all 28 flags in the database.

We don't have 1 TB of storage available for translations at this time ;) , so until we have a new storage configuration that can store over a TB of data, we will only expose the Top 10 Internet-population languages.

We will monitor this for another week, and if the database continues to grow, we will have to cut back to the Top 5 because we can't allocate 100s of GB to translations. We did not size our server that large :D . FWIW: I am thinking to move the translation dB to Amazon EC2 and redirect translated pages to EC2 in the future.

It would be great to hear from others running this mod for many months to post how many posts and threads they have in vB, the number of translated links indexed by Google, and the size of their translated dB. Please post, thanks!

Thanks again for a great mod.

Also, I look forward to report back on search engine referral traffic increases in the coming months :D

Right, because 500,000 x28 = 14 million pages.

If you added 14 million normal pages you'd need a similar amount of space...

Dave Hybrid
07-19-2009, 11:16 AM
Right here ;)



For me, and I am sure others, "load the same"... means "load the same"...... :D

The difference is milliseconds, hardly a big deal. Jeez.

imported_silkroad
07-19-2009, 11:30 AM
The difference is milliseconds, hardly a big deal. Jeez.

Hi Dave,

I don't understand you and why you get defensive.

First of all, I mentioned before that I did not want to post and get on your bad side, because I have read your defensive replies before, and I like you.

Then, you invited me to post performance topics.

Then, I post facts, which are important to me, a person who have a fairly large board, and you then get defensive again.

Milliseconds matter to many people (. Just because they don't matter to you is no reason to be defensive with me. I am not your enemy. In fact, it works out that the translated pages take about 40 to 50% longer to load in our server. No big deal, but it is certainly not "the same". 40 to 50% longer to load is not "the same"... why not be technically accurate?

I suggest you reword you mod description to say something like:

Over time, users and bots will cache your entire site automatically and all translated pages will load almost the same as normal pages.

Or better yet (more accurate, IMHO):

Over time, users and bots will cache your entire site automatically and all translated pages will load similar to normal pages, perhaps 40 to 50% slower.

Also, what is the point of trying to help (and improve the mod) you if you are going to be defensive about things which do not matter to you, but might be important to others? I like this mod and just happen to think performance details are important to people with large boards.

Advice: Don't beat up on your friends!

PS: If you are going to beat up on me when I post some performance stats, I better not post anymore stats! I am not posting performance stats for my benefit. I was posting for the benefit of users and to "give back" to you for such a great mod. Why beat me up over it? I think I will not post anymore stats, it is better, since you are so sensitive about it!!

Dave Hybrid
07-19-2009, 11:44 AM
For me, and I am sure others, "load the same"... means "load the same"......

How is that helping, being pedantic over the wording of the install instructions? I said i cannot change a thing, i'm not a db coder and I dont have the time and money to invest right now for marginal differences if at all. I then said if you wanted to suggest actual code changes i would be happy test them. I'm not being defensive or whatever, but just like if you released a mod you would tire of the negativity at some point. Not one person has posted index stats, referral stats, it's all doom and gloom. As I said before if you want to change it, then be my guest, but all this talk is not improving a thing imo without actually editing it and testing it. Also i am not trying to offend you, please take my posts in a non offensive way if that's how you are interpreting them. Thanks.

imported_silkroad
07-19-2009, 11:54 AM
How is that helping, being pedantic over the wording of the install instructions? I said i cannot change a thing, i'm not a db coder and I dont have the time and money to invest right now for marginal differences if at all. I then said if you wanted to suggest actual code changes i would be happy test them. I'm not being defensive or whatever, but just like if you released a mod you would tire of the negativity at some point. Not one person has posted index stats, referral stats, it's all doom and gloom. As I said before if you want to change it, then be my guest, but all this talk is not improving a thing imo without actually editing it and testing it. Also i am not trying to offend you, please take my posts in a non offensive way if that's how you are interpreting them. Thanks.

Posting performance details are not negative Dave. You are the person taking it that way because you are so sensitive.

Like I said before, I am not going to post anymore performance stats, because it upsets you so much to learn how your mod performs. I don't want to get on your bad side.

NO MORE STATS... Happy now??

imported_silkroad
07-19-2009, 03:17 PM
After thinking about this a bit more, I want close on this:

(1) Before we can recommend code changes, database modifications, etc. we should have good performance statistics. For this reason, I think recommendations based on solid statistics are more important than recommendations based on opinions. (It is kinda like having a doctor write a prescription without examining the patient first...) On our site, we run over 350 MySQL stats and tune the dB based on analysis of charts, graphs, etc. over hours, days, weeks, months and more. We look a spider hits per minute, server load, table opens, cache, memory, network load, many more than 600 individual statistics. We look at Apache workers, MySQL threads... I think we look at nearly 600 stats, but normally we can get a good idea at what is going on by a review of about 8 to 10 charts in a dashboard.

(2) This mod is resource intensive for big boards. Saying this is not "doom and gloom" (as someone has complained), it is a fact. When a process is resource intensive, we should understand it, especially people who have big boards, and its impact. We should know the impact so we can plan, provision, size, adjust, etc. Just the GoogleBot load alone increases our load average and network utlization considerably. We need to know what that is because "knowledge is important", not because we are being "negative". It is not "doom and gloom" to say this - this is called "performance facts for planning."

(3) For some odd reason, emotions run high in this mod about performance statistics; so we will not publish them here any more, but will publish them on another site (because we need stats - it is called "situational knowledge"). We were publishing these stats to help people using this mod, but instead, we have been met with an unapologetic "why are you doing this?" and "jeezz, why do you care about this or that." Why should we publish statistics if statistics lead to emotional replies? Emotions are not interesting, Performance is. I am a Vulcan, not a Klingon :-)

(4) If anyone wants access to our statistics, please send me a PM. I'll provide you the link to a private forum where we can publish and discuss performance issues openly and technically, without stimulating unapologetic emotional replies and question on our motives. I have no interest in emotions when it comes to web server performance. "Just the facts, Maam", as they say.

(5) I want to close by thanking Dave for this great mod. We use it. We like it. We are tracking it's performance. In accordance with Dave's wishes, since it is his mod, we will refrain from posting any more performance related stats, graphs, etc. here. I can't deal with the emotions that stats seem to invoke anyway. It is against my Vulcan nature :-)

Keep up the great work! I cannot make code recommendations for improving performance without solid statistics :-) Sorry!

imported_silkroad
07-20-2009, 07:39 PM
Hey Guys!

(No stats, I promise!)

Hope all is well.

Question: Does your mod parse the "notranslate" tag and pass it to Google when it does the translation?

<span class="notranslate">Code not to translate</span>

Google says (http://www.google.com/intl/en/help/faq_translation.html) to use this tag when you don't want something translated.

I wrapped it around $code in the bbcode_code template, but it did not seem to work.

Cheers.

Dave Hybrid
07-20-2009, 07:41 PM
..........

The point is this MOD is complex silkroad, optimizing it further is a very specialized job that many have failed on. No one said you shouldn't test before making code changes, it's just i believe you will find it hard to make these changes afterwards. I work with many coders and they believe they have taken this as far as it can go speed wise. Like I said, i would love to hear actual solutions when you have done your research.

Dave Hybrid
07-20-2009, 07:47 PM
Hey Guys!

(No stats, I promise!)

Hope all is well.

Question: Does your mod parse the "notranslate" tag and pass it to Google when it does the translation?

<span class="notranslate">Code not to translate</span>

Google says (http://www.google.com/intl/en/help/faq_translation.html) to use this tag when you don't want something translated.

I wrapped it around $code in the bbcode_code template, but it did not seem to work.

Cheers.

No it doesn't seem to work when i tested. Sorry.

imported_silkroad
07-20-2009, 08:11 PM
No it doesn't seem to work when i tested. Sorry.

Hi Dave!

Thanks. I searched the mod code after posting and did not find any reference to "notranslate". I agree, it is not supported. Maybe in a future release?

imported_silkroad
07-20-2009, 08:15 PM
The point is this MOD is complex silkroad, optimizing it further is a very specialized job that many have failed on. No one said you shouldn't test before making code changes, it's just i believe you will find it hard to make these changes afterwards. I work with many coders and they believe they have taken this as far as it can go speed wise. Like I said, i would love to hear actual solutions when you have done your research.

I agree. The code is complex with all the parsing etc.

Also, thanks for letting me know you feel the code cannot be further optimized. That is very helpful to know!

Again, thanks for this mod. Much appreciated! We are tracking the indexing process closely and look forward to results!

Dave Hybrid
07-20-2009, 08:45 PM
Hi Dave!

Thanks. I searched the mod code after posting and did not find any reference to "notranslate". I agree, it is not supported. Maybe in a future release?

I believe someone posted a way to exclude text somewhere in this thread, we may include it in the main release on the next update.

Bounce
07-20-2009, 08:46 PM
Dave,

Where have I went wrong, just upgraded to v2.4

When I click on a flag it just loads the page in english :confused:

I've commented out "en" and even ran the queries here...
https://vborg.vbsupport.ru/showpost.php?p=1845065&postcount=294

Dave Hybrid
07-20-2009, 08:47 PM
I agree. The code is complex with all the parsing etc.

Also, thanks for letting me know you feel the code cannot be further optimized. That is very helpful to know!

Again, thanks for this mod. Much appreciated! We are tracking the indexing process closely and look forward to results!

Cool, thank you.

Dave Hybrid
07-20-2009, 08:53 PM
Dave,

Where have I went wrong, just upgraded to v2.4

When I click on a flag it just loads the page in english :confused:

I've commented out "en" and even ran the queries here...
https://vborg.vbsupport.ru/showpost.php?p=1845065&postcount=294

I guess you did something wrong or didn't wait for a step to finish.

Did you backup before?

Might be easiest to start with a fresh DB using the install instructions tbh.

Bounce
07-20-2009, 09:00 PM
I guess you did something wrong or didn't wait for a step to finish.

Did you backup before?

Might be easiest to start with a fresh DB using the install instructions tbh.

yea, prob did, daft Q, is the instructions still the same as per post 1 ?

Where do the cleaner and saver get installed if theres no code in post 1 to run a query for them ?

I shall start over and report back sir, thanks :up:

EDIT: ++++in ++++ I am, I saved the first plugin as global_start not global_complete LOL.. DOH!!!!!!!!!

Dave Hybrid
07-20-2009, 09:11 PM
yea, prob did, daft Q, is the instructions still the same as per post 1 ?

Where do the cleaner and saver get installed if theres no code in post 1 to run a query for them ?

I shall start over and report back sir, thanks :up:

EDIT: ++++in ++++ I am, I saved the first plugin as global_start not global_complete LOL.. DOH!!!!!!!!!
Great.:up:

tpearl5
07-20-2009, 11:05 PM
I'm curious if anyone has seen google index all their new pages. If so have you started to see hits from this?

Dave Hybrid
07-20-2009, 11:12 PM
I'm curious if anyone has seen google index all their new pages. If so have you started to see hits from this?

I have around 40k of them indexed and around 2k more daily uniques on a forum i installed this on a month ago.

NLP-er
07-21-2009, 04:00 AM
It would be great to hear from others running this mod for many months to post how many posts and threads they have in vB, the number of translated links indexed by Google, and the size of their translated dB. Please post, thanks!

I wrote my own spider and translated all my pages in 40 languages. According to vbSEO sitemap generator - somesthing between 50-60K pages (don't remember exactlly) including oryginal not translated pages. DB stats:
TABLE ROWS SIZE
wt_cache 168 930 166,0 MB
wt_cache_medium 490 901 144,7 MB
wt_cache_short 812 496 66,0 MB

LI_Pets
07-21-2009, 10:12 AM
Hi Dave,

I don't understand you and why you get defensive.


I suggest you reword you mod description to say something like:

Or better yet (more accurate, IMHO):

Also, what is the point of trying to help (and improve the mod) you if you are going to be defensive about things which do not matter to you, but might be important to others? I like this mod and just happen to think performance details are important to people with large boards.

Advice: Don't beat up on your friends!

Very true, Dave your people skills and communication need some optimization:D


.

Dave Hybrid
07-21-2009, 11:01 AM
Very true, Dave your people skills and communication need some optimization:D


.

As do your SEO skills. :D

Xencored
07-21-2009, 12:51 PM
Installed Works great mate cheers :up:

tpearl5
07-21-2009, 04:40 PM
I finally installed this!

One little problem I'm having... Most pages are taking greater than 2 min to translate. My wait_timeout is set to 2 min. For some reason though, it's failing on the "UPDATE session SET lastactivity" query to the main database. Anyone know why?

Dave Hybrid
07-21-2009, 04:42 PM
I finally installed this!

One little problem I'm having... Most pages are taking greater than 2 min to translate. My wait_timeout is set to 2 min. For some reason though, it's failing on the "UPDATE session SET lastactivity" query to the main database. Anyone know why?

No support for credit link removers, sorry. :down:

tpearl5
07-21-2009, 04:55 PM
No support for credit link removers, sorry. :down:

My next question was where can I donate?

Dave Hybrid
07-21-2009, 04:57 PM
My next question was where can I donate?

I would like to give special thanks to NLP-er for his help and support taking this MOD a step closer to its goal, the new database coding credits all go to him. If you want to show your appreciation contact him for all donations including donations for credit removal.

As per the install instructions please forward donations to > https://vborg.vbsupport.ru/member.php?u=267979

He'll let me know when you have done so, thanks.