vb.org Archive

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

Dave Hybrid 06-28-2009 07:47 PM

Ask your host to turn on php error message in the browser, it should output an error.

99% of install problems are because of your server config or the install wasn't followed correct, check everything thoroughly.

Bounce 06-28-2009 08:44 PM

WHOOOO!!! I thought this was a goner :)

THANK YOU DAVE!!!! :up::up::up:

Dave Hybrid 06-28-2009 08:48 PM

Quote:

Originally Posted by hIBEES (Post 1839106)
WHOOOO!!! I thought this was a goner :)

THANK YOU DAVE!!!! :up::up::up:

You're welcome!

Make sure you install and test it because your current setup isnt translating a thing, not sure if you are aware.

Bounce 06-28-2009 09:02 PM

Quote:

Originally Posted by Dave Hybrid (Post 1839107)
You're welcome!

Make sure you install and test it because your current setup isnt translating a thing, not sure if you are aware.

Just installed just now, yes when I click on a flag its all still in english? How is that?

Dave Hybrid 06-28-2009 09:07 PM

Quote:

Originally Posted by hIBEES (Post 1839112)
Just installed just now, yes when I click on a flag its all still in english? How is that?

No idea tbh, i can tell you've skipped parts of the install, so i would advise following the upgrade and new install instructions to the T.

Bounce 06-28-2009 09:09 PM

Ah never deleted the old plugins and overload text, sorry was in a hurry as was all excited LOL :)

Dave Hybrid 06-28-2009 09:10 PM

Doesn't feel right mate, see my previous post, you need to fresh install, new flags files, complete new database, everything, delete everything, start fresh and do not skip parts and it will work much better.

Dave Hybrid 06-28-2009 09:10 PM

LOL, ok. :)

jaryx 06-28-2009 09:14 PM

A small note to the flags.
English language (EN) is... english from England, not the U.S.
When Sir Thomas Wyatt wrote his poems, then the Americans running the prairie for the bizons. ;)

ps.
My english is bad english, but english. ;)

Dave Hybrid 06-28-2009 09:22 PM

Ok, well, en code is the only one Google Translate offers. I used US flag as there are more US Internet users than UK. Trying to cater for the larger audience lol. :)

Bounce 06-28-2009 09:27 PM

Quote:

Originally Posted by Dave Hybrid (Post 1839117)
Doesn't feel right mate, see my previous post, you need to fresh install, new flags files, complete new database, everything, delete everything, start fresh and do not skip parts and it will work much better.

I still does not no, right off to delete it all and start again closely following the instructions, I'm a bit confused (not hard LOL) by this...

Quote:

Now change $originalEncoding variable to match your forum base encoding. The default is english (iso-8859-2).
Dumb that I am I presume I don't change that as my forums english?

BE right back LOL :)

puertoblack2003 06-28-2009 09:30 PM

thank you :up: installed so far no issue to report.

Dave Hybrid 06-28-2009 09:35 PM

Quote:

Originally Posted by puertoblack2003 (Post 1839126)
thank you :up: installed so far no issue to report.

Looks great on your site and very fast, nice one!

Bounce 06-28-2009 09:35 PM

Can't I drop the tables in the DB or it needs to be brand new ?

Dave Hybrid 06-28-2009 09:36 PM

Brand new dude. Everything is new. All files, all code, database format and tables. Fresh install it.

GoTTi 06-28-2009 09:52 PM

testing this on a different site on a different server i am getting this error when i click the flags:

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

puertoblack2003 06-28-2009 09:53 PM

Quote:

Originally Posted by Dave Hybrid (Post 1839130)
Looks great on your site and very fast, nice one!

thanks


on this instruction

Quote:

You need to comment out the flag for your base language otherwise you can cause duplicate URLs for those pages and this can be bad for SEO.

All the flags are on separate lines in alpha order, find your language and add <!-- to the start and --> to the end of the line.

eg; <!-- language flag code -->

Upload both files to your forum root, if your forums are in a /forums/ folder, subdomain or similar upload the files there. Upload the flags folder to your domain root, thats the domain root.


I want to make sure that i follow you so it should be like this


Code:

<a href="<?php $xbit = (count($_GET)>1) ? "&" : "?"; echo (strstr($_SERVER["REQUEST_URI"],'hl='.@$_GET['hl'])) ? str_replace($xbit.'hl='.@$_GET['hl'], '', $_SERVER["REQUEST_URI"]) . $xbit . 'hl=en' : str_replace($xbit.'hl='.@$_GET['hl'], '', $_SERVER["REQUEST_URI"]) . $xbit . "hl=en"; ?>"><img src="/flags/United States.gif" alt="English" border="0" /></a>
<!-- to the start and -->


Dave Hybrid 06-28-2009 09:55 PM

Code:

<!-- <a href="<?php $xbit = (count($_GET)>1) ? "&" : "?"; echo (strstr($_SERVER["REQUEST_URI"],'hl='.@$_GET['hl'])) ? str_replace($xbit.'hl='.@$_GET['hl'], '', $_SERVER["REQUEST_URI"]) . $xbit . 'hl=en' : str_replace($xbit.'hl='.@$_GET['hl'], '', $_SERVER["REQUEST_URI"]) . $xbit . "hl=en"; ?>"><img src="/flags/United States.gif" alt="English" border="0" /></a> -->
There.

It will stop that flag showing, so it should disappear.

GoTTi 06-28-2009 09:58 PM

wt_cache_medium
wt_cache_short

these 2 tables on the db have lines in it now. the short has 20 and the medium has 3. but the text still isnt converting over to other languages. this is on the site i sent u on the PM.

the other error i am having is on another site different server

puertoblack2003 06-28-2009 10:03 PM

Quote:

Originally Posted by Dave Hybrid (Post 1839144)
Code:

<!-- <a href="<?php $xbit = (count($_GET)>1) ? "&" : "?"; echo (strstr($_SERVER["REQUEST_URI"],'hl='.@$_GET['hl'])) ? str_replace($xbit.'hl='.@$_GET['hl'], '', $_SERVER["REQUEST_URI"]) . $xbit . 'hl=en' : str_replace($xbit.'hl='.@$_GET['hl'], '', $_SERVER["REQUEST_URI"]) . $xbit . "hl=en"; ?>"><img src="/flags/United States.gif" alt="English" border="0" /></a> -->
There.

It will stop that flag showing, so it should disappear.


gotcha thanks :up:

NLP-er 06-28-2009 10:07 PM

Quote:

Originally Posted by GoTTi (Post 1839139)
testing this on a different site on a different server i am getting this error when i click the flags:

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

Wrong version of PHP. From manual about mysql_set_charset() This function requires MySQL 5.0.7 or later

Bounce 06-28-2009 10:09 PM

arghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh lol :D

I've installed this (I THINK) as per the instructions, even created new database and sql user for it, on clicking a flag I get

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in [path]/translate.php on line 148

then the database error,

Quote:

Invalid SQL:

UPDATE session
SET lastactivity = 1246230400, location = '/forum/?hl=ja', inforum = 0, inthread = 0, incalendar = 0, badlocation = 0, useragent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)'
WHERE sessionhash = '726fe064a7efc501fc5f743000592a85';

MySQL Error : MySQL server has gone away
Must have fooked up the install somewhere but fooked if I can figure out where LOL

No data is being "written" into the database either, LOL the joys

NLP-er 06-28-2009 10:13 PM

Quote:

Originally Posted by GoTTi (Post 1839149)
wt_cache_medium
wt_cache_short

these 2 tables on the db have lines in it now. the short has 20 and the medium has 3. but the text still isnt converting over to other languages. this is on the site i sent u on the PM.

the other error i am having is on another site different server

For the first translation of some page to some language you have to be very patient. A lot of things to translate by google... And It is not possible to skip this time - it have to be translated. But after that having this page translated again to this language if very fast, because google isn’t asked for that anymore - just taken from DB.

Give it a chance and just wait till page is translated.

NLP-er 06-28-2009 10:17 PM

Quote:

Originally Posted by hIBEES (Post 1839158)
arghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh lol :D

I've installed this (I THINK) as per the instructions, even created new database and sql user for it, on clicking a flag I get

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in [path]/translate.php on line 148

then the database error,



Must have fooked up the install somewhere but fooked if I can figure out where LOL

No data is being "written" into the database either, LOL the joys

On line 148 there is no mysql_fetch_array() call - probably you have old version. Please update it :)

puertoblack2003 06-28-2009 10:18 PM

Quote:

Originally Posted by hIBEES (Post 1839158)
arghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh lol :D

I've installed this (I THINK) as per the instructions, even created new database and sql user for it, on clicking a flag I get

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in [path]/translate.php on line 148

then the database error,



Must have fooked up the install somewhere but fooked if I can figure out where LOL

No data is being "written" into the database either, LOL the joys



your issue is right here brotha
Code:

MySQL Error : MySQL server has gone away
timing out issue ...i clocked my to 60 second before it translate then after that it's quick

Dave Hybrid 06-28-2009 10:19 PM

Some large pages can take a few minutes, test it on pages will low text. It's not a big deal as the search bots will hit large pages a few times to translate them in the background. Next time the load from cache and are fast.

puertoblack2003 06-28-2009 10:30 PM

One more question i have a friend that is from Germany.The only thing he noticed that for each page you have to click on the flag.Is that how it works?

Dave Hybrid 06-28-2009 10:41 PM

Quote:

Originally Posted by puertoblack2003 (Post 1839175)
One more question i have a friend that is from Germany.The only thing he noticed that for each page you have to click on the flag.Is that how it works?

Yep, that is correct.

Bounce 06-28-2009 11:08 PM

Quote:

Originally Posted by NLP-er (Post 1839165)
On line 148 there is no mysql_fetch_array() call - probably you have old version. Please update it :)

thanks, think I did doh lol

weird now i'm getting the error..

Quote:

Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'dbname_trans' (1) in [path]/translate.php on line 33

Warning: Cannot modify header information - headers already sent by (output started at [path]/includes/class_core.php:3277) in [path]/includes/functions.php(5721) : eval()'d code on line 5
but its translating the pages ....

http://www.hibeesbounce.com/forum/sh...?t=86933&hl=ja

Is it just a case of waiting or have I got something else wrong lol

yea I did LOL

$dbusername = "bdname";
$dbpassword = "me";
$mysqlserver = "localhost"; > had this as the db name pmsl :)
$dbname = "dbname";

THAT link now translates :):)

Still get myqsl server has gone away on forumhome thou, patience needed?

GoTTi 06-28-2009 11:10 PM

Quote:

Originally Posted by NLP-er (Post 1839157)
Wrong version of PHP. From manual about mysql_set_charset() This function requires MySQL 5.0.7 or later

PHP Version 5.1.4


??

Dave Hybrid 06-28-2009 11:12 PM

Quote:

Originally Posted by hIBEES (Post 1839195)
thanks, think I did doh lol

weird now i'm getting the error..



but its translating the pages ....

http://www.hibeesbounce.com/forum/sh...?t=86933&hl=ja

Is it just a case of waiting or have I got something else wrong lol

Double check your MySQL data you entered is correct ;)

GoTTi 06-28-2009 11:29 PM

Quote:

Originally Posted by NLP-er (Post 1839161)
For the first translation of some page to some language you have to be very patient. A lot of things to translate by google... And It is not possible to skip this time - it have to be translated. But after that having this page translated again to this language if very fast, because google isn?t asked for that anymore - just taken from DB.

Give it a chance and just wait till page is translated.

how long are we to wait for the site to be translated? a few hours went by and nothing happend so far.

NLP-er 06-28-2009 11:32 PM

Quote:

Originally Posted by GoTTi (Post 1839196)
PHP Version 5.1.4


??

http://us3.php.net/manual/en/functio...et-charset.php

I know that first question can look silly, but have to be sure - no other ideas :p
- Are you sure you check PHP version on server where script is intalled?
- Are you sure php was properly installed? In PHP 5+ MySQL is not enabled by default (In order to have these functions available, you must compile PHP with MySQL support - http://us3.php.net/manual/en/mysql.requirements.php) If not here you have PHP installation instructions: http://us3.php.net/manual/en/mysql.installation.php

NLP-er 06-28-2009 11:37 PM

Quote:

Originally Posted by GoTTi (Post 1839207)
how long are we to wait for the site to be translated? a few hours went by and nothing happend so far.

Definitively not that long ;) 30 seconds, maybe 1minute if there is lot of text or lot of short words (i.e. tag cloud). On my forum I sometimes have such behavior that it translates, and translates, and... And after reload it is already translated. I assume that those are some browser sever issues because of long download time, and after reload it is already cached and goes fast.

So if reload gives you also nothing and you see that number of rows in cache tables is same - definitively it's something wrong. Need more info to be able to say what... some error logs?

GoTTi 06-28-2009 11:55 PM

nlp - only 2 tables are doing "something" on 1 of the sites. the medium and short tables are writing something in there. the cache isnt writing anything....what could be causing the cache not to write?

NLP-er 06-29-2009 02:14 AM

Quote:

Originally Posted by GoTTi (Post 1839220)
nlp - only 2 tables are doing "something" on 1 of the sites. the medium and short tables are writing something in there. the cache isnt writing anything....what could be causing the cache not to write?

those tables are to separate short, medium and long translations. Most forums have lot of short translations, then some medium and sometimes long. So it is ok.

I just wrote my own spider which goes to every page generated by vbSEO sitemap generator (must done little change in their code to automatically add all translations to sitemap) and also add rest languages available in google (over 40).

Now I have in sitemap 56 000 addresses. Spider will work for long time, and I will give you all some image about DB cache size.

Right now it just started only 100 pages done (not counting those which was clicked by users or other spiders), but it will already give you some proportions (keep in mind that I have over 40 languages not 28).

wt_cache_short 70 000 entries
wt_cache_medium 11 000 entries
wt_cache 5 000 entries

So it is ok that your wt_cache don't have to mutch data.

Also you can heck does wt_cache was appropriately created during installation. You need MySQL 5.0.3 or higher to be able to have it works, because I used varchar(65000) and in previous mysql versions varchar could have max size 255. If you have lower version - you can still use it. Just change VARCHAR(65000) to TEXT for column oryginalText drop table and create again from changed code.

When I finish my spidering ;) I will made some automatic performance tests. Also change some other solutions (different indexes sizes, other order of filtering in SQL WHERE clause...). So it is possible that it will be even faster :)

Also good news is that when my spider makes translations all the time it doesn't affects speed of normal site generation (all lags are because of google translation server). So you can be calm - even if you wait long time for translation other users don’t feel it at all being on forum :)

ShawneyJ 06-29-2009 04:31 AM

Quote:

You need to comment out the flag for your base language otherwise you can cause duplicate URLs for those pages and this can be bad for SEO.

All the flags are on separate lines in alpha order, find your language and add <!-- to the start and --> to the end of the line.

eg; <!-- language flag code -->

i dont need to worrie about this part if im using english correct?
thx.

if i do have to worry about this step, can i ask the code i have to put around this line plz???

PHP Code:

<a rel="novbseo"href="<?php echo (strstr($_SERVER["VBSEO_URI"],'?hl='.@$_GET['hl'])) ? str_replace('?hl='.@$_GET['hl'], ''$_SERVER["VBSEO_URI"]) . '?hl=en' str_replace('?hl='.@$_GET['hl'], ''$_SERVER["VBSEO_URI"]) . "?hl=en"?>"><img src="/flags/United States.gif" alt="English" border="0" /></a>

if im completely not making sense please explain thanks m8.

Sweeks 06-29-2009 05:25 AM

PHP Code:

<!-- <a rel="novbseo"href="<?php echo (strstr($_SERVER["VBSEO_URI"],'?hl='.@$_GET['hl'])) ? str_replace('?hl='.@$_GET['hl'], ''$_SERVER["VBSEO_URI"]) . '?hl=en' str_replace('?hl='.@$_GET['hl'], ''$_SERVER["VBSEO_URI"]) . "?hl=en"?>"><img src="/flags/United States.gif" alt="English" border="0" /></a> -->


Dave Hybrid 06-29-2009 09:56 AM

Quote:

Originally Posted by NLP-er (Post 1839253)
those tables are to separate short, medium and long translations. Most forums have lot of short translations, then some medium and sometimes long. So it is ok.

I just wrote my own spider which goes to every page generated by vbSEO sitemap generator (must done little change in their code to automatically add all translations to sitemap) and also add rest languages available in google (over 40).

Now I have in sitemap 56 000 addresses. Spider will work for long time, and I will give you all some image about DB cache size.

Right now it just started only 100 pages done (not counting those which was clicked by users or other spiders), but it will already give you some proportions (keep in mind that I have over 40 languages not 28).

wt_cache_short 70 000 entries
wt_cache_medium 11 000 entries
wt_cache 5 000 entries

So it is ok that your wt_cache don't have to mutch data.

Also you can heck does wt_cache was appropriately created during installation. You need MySQL 5.0.3 or higher to be able to have it works, because I used varchar(65000) and in previous mysql versions varchar could have max size 255. If you have lower version - you can still use it. Just change VARCHAR(65000) to TEXT for column oryginalText drop table and create again from changed code.

When I finish my spidering ;) I will made some automatic performance tests. Also change some other solutions (different indexes sizes, other order of filtering in SQL WHERE clause...). So it is possible that it will be even faster :)

Also good news is that when my spider makes translations all the time it doesn't affects speed of normal site generation (all lags are because of google translation server). So you can be calm - even if you wait long time for translation other users don’t feel it at all being on forum :)

I just use Googlebot lol, I have 500,000 total entrys after 24hrs. :eek:

Also no slow down at all, pages still fast as usual. DB size is 100MB so far.

Calash 06-29-2009 11:43 AM

Well I am still getting the database errors I quoted from the previous version, however the database is being populated and I actually finally got a page to show up in another language.

I will let this run for a bit now and see if I get more translated pages. Great job with this mod :)


All times are GMT. The time now is 01:28 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01750 seconds
  • Memory Usage 1,873KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (25)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete