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 07-02-2009 05:10 PM

v2.3 should be fully tested soon. False database error emails gone, finally. So far so good.

Dave Hybrid 07-02-2009 05:11 PM

Quote:

Originally Posted by 1Unreal (Post 1841416)
It was ok I worked it out. I set the hook as global complete not global start :p

You should make it into a product to help us simpletons out :p

Agreed, it's on the to do list. Thanks.

merkaz 07-02-2009 05:16 PM

For those who has a blank page .

After 3 days working with NLP-er ..

This maybe becuase :

Firewall blocked google IP .

Curl functions disable on " disable_functions " On PHP ..
This functions must be enabled : curl_exec and curl_init

Thanks Dave ...
Thanks NLP-er ...

my best regards

merkaz 07-02-2009 05:23 PM

One more suggestion for this mod ..

for example :
In arabic , pages direction is rtl
In english its ltr

it's nice if the mod make the page direction Based on the langauge .

Sorry about my poor english :$ .

NLP-er 07-02-2009 08:46 PM

Quote:

Originally Posted by merkaz (Post 1841532)
One more suggestion for this mod ..

for example :
In arabic , pages direction is rtl
In english its ltr

it's nice if the mod make the page direction Based on the langauge .

Sorry about my poor english :$ .

Right now if you want somesthing to stay not translated at all it is easiest to set 2 lines of code in vb Global Translator hook. First:
Code:

$output = str_replace("NOT_TRANSLATED_TEXT", "<NOT_TRANSLATED_TEXT>", $output);
just before:
Code:

$output=callback($output);
and:
Code:

$output = str_replace("<NOT_TRANSLATED_TEXT>", "NOT_TRANSLATED_TEXT", $output);
just after it. Of course have to change NOT_TRANSLATED_TEXT to somesthing real. Dave is working on making it product right now, so hope it will be configurable soon :)

NLP-er 07-02-2009 10:58 PM

Still making fun with cache by improving it so get new issue here :)

During spidering my site I realized, that sometimes google translation returns just empty result. And right now those empty results are included in cache, so If once filled - used forever...

To avoid this you must do 3 things.

1. Made change described under link - approptiate handling of non breaking spaces (not sure does necessary but I'm already working on correted code, and it works this way)
https://vborg.vbsupport.ru/showpost....&postcount=189

2. In translate.php change:
Code:

/* Save to cache */
if ($enablecache) {

to:
Code:

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

So even if ocassionally google will joke with you, you will not cache it and just ask again during next page generation hoping this time result will be included and cached :)

Dave - it would be good to include it in new release :)

3. get rid of already cached dummy content by executing those queries:
Code:

delete from wt_cache where translated='' or translated is null;
delete from wt_cache_medium where translated='' or translated is null;
delete from wt_cache_short where translated='' or translated is null;


Note that I'm still working improving cache so future changes are possible :) Who don't like to mess in code - just wait till Dave made new official release with changes included :) For others - installing this will give me feedback about possible issues which I don't have on my forum.

Also - Dave I noted you was asking to wrote changes proposals as PM - I prefere this way because I have a chance that someone will use it and maybe discover some additional issues before official release.

GoTTi 07-03-2009 02:09 AM

the 2 tables medium and short are increasing, but nothing is in the translated fields of the tables....its just empty on my end. the site isnt translating. ill be uninstalling this i guess untill a later date.

Dave Hybrid 07-03-2009 10:21 AM

v2.3 Official Release

* More change to database optimization.

To Upgrade

Upload the new translate.php and run the following MySQL query on your DB.

Code:

delete from wt_cache where translated='' or translated is null;
delete from wt_cache_medium where translated='' or translated is null;
delete from wt_cache_short where translated='' or translated is null;


Dave Hybrid 07-03-2009 10:38 AM

Quote:

Originally Posted by NLP-er (Post 1841684)
Still making fun with cache by improving it so get new issue here :)
.......................................

Thanks for the DB update again, this one seems to improve speed even further and data size reduced, thanks a bunch! :up:

I'm still trying to sort the few remaining DB errors, it's a PITA to fix, I can get rid of them but the DB has to be opened and closed twice to avoid timeout so it makes everything slow... Grrrr. Ha. I'll keep trying. :)

merkaz 07-03-2009 11:37 AM

Quote:

Originally Posted by GoTTi (Post 1841775)
the 2 tables medium and short are increasing, but nothing is in the translated fields of the tables....its just empty on my end. the site isnt translating. ill be uninstalling this i guess untill a later date.

This maybe becuase :

Firewall blocked google IP .

Curl functions disable on " disable_functions " On PHP ..
This functions must be enabled : curl_exec and curl_init


All times are GMT. The time now is 10:21 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.01593 seconds
  • Memory Usage 1,746KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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