Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vB Global Translator - Multiply your indexed pages & put search traffic on autopilot Details »»
vB Global Translator - Multiply your indexed pages & put search traffic on autopilot
Version: 2.4, by Dave Hybrid Dave Hybrid is offline
Developer Last Online: Dec 2013 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.8.x Rating:
Released: 06-27-2009 Last Update: 07-07-2009 Installs: 67
Uses Plugins Template Edits
Additional Files  
No support by the author.

**Text Removed**

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #142  
Old 06-30-2009, 10:24 PM
Geraldm Geraldm is offline
 
Join Date: Dec 2006
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dave Hybrid View Post
I managed to find your old PM, it looks fine to me mate.
Ahh it was only translating the keywords and not the description ...... I re-read your instructions and noticed I missed the bit about changing the execution order I've now changed it to 50 and yes it's now translating the keywords and desc.... Great stuff!

Thank you!
Reply With Quote
  #143  
Old 06-30-2009, 10:36 PM
Dave Hybrid's Avatar
Dave Hybrid Dave Hybrid is offline
 
Join Date: Mar 2007
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great, you're welcome. :up:
Reply With Quote
  #144  
Old 06-30-2009, 11:16 PM
GoTTi GoTTi is offline
 
Join Date: Jun 2002
Posts: 1,346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NLP-er View Post
You can always set $enablecache = false; in translate.php - then you will know does your page translates at all. I'm quite sure that cache is not an issue here and we can be sure by temporary disabling it.
its doing the same thing. i put false on the .php and reuploaded, reloaded the pages, and clicked a flag and all its doing is loading, then it stops.
Reply With Quote
  #145  
Old 06-30-2009, 11:35 PM
GoTTi GoTTi is offline
 
Join Date: Jun 2002
Posts: 1,346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i just installed a testboard, clean, no mods on it and only installed this mod here, made a post, clicked a flag and nothing is happening. what could possibly be causing this to not work?
Reply With Quote
  #146  
Old 06-30-2009, 11:57 PM
NLP-er's Avatar
NLP-er NLP-er is offline
 
Join Date: Aug 2008
Location: Wrocław
Posts: 1,353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Since some installations still have problems using cache and we are working on that, for those who has running vb global translator I have some optimizations

1. Query optimization - change in template.php code between /* Check cache for translation */ and /* -- if not found, proceed with Google Translate */ to:
Code:
/* 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 */
Unnecessary data was taken from DB. Hope Dave will make new release quickly and include this change

2. Index changes. Since for someone DB was growing fast I made some tests. It is enough to change indexes.

For installed products run those queries:
Code:
alter table wt_cache_short drop index tl;
create index originaltext on wt_cache_short (originaltext, tl);

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

alter table wt_cache drop index tl;
create index originaltext on wt_cache (originaltext(50), tl);
For new installations it will be:
Code:
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_general_ci;

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;
Hope Dave will change installation manual to this one.

I realized that column tl has only 28 possible values (or less if you don’t use all flags) and that is not too good for indexes. Only by changing order from (tl, originaltext) to (originaltext, tl) my database size changed from 51MB to 44,3MB without any performance lost and even with improvement. Changing it only to (originaltext) have worst results that (originaltext, tl).

Here are some results of my tests (I have weak internet connection so don't look on times but on differences between performance in different configurations):
WITH index (tl,originaltext) DB size=51MB TESTS RESULTS:
MIN: 4484 MAX: 13266 AVG: 7823
MIN: 3188 MAX: 9703 AVG: 5848
MIN: 3797 MAX: 9594 AVG: 5683
TOTAL AVG: 6451

WITH index (originaltext,tl) DB size=44,3MB TESTS RESULTS:
MIN: 2859 MAX: 10172 AVG: 6232
MIN: 2890 MAX: 9094 AVG: 6109
MIN: 3468 MAX: 9500 AVG: 5813
TOTAL AVG: 6051

WITH index (originaltext) DB size=43,2MB TESTS RESULTS:
MIN: 4454 MAX: 10406 AVG: 5998
MIN: 3703 MAX: 13922 AVG: 6341
MIN: 2922 MAX: 14578 AVG: 6888
TOTAL AVG: 6409

Times are in ms. In each test 20 different cached translated pages was generated. For each setting 3 tests series at row was executed.
Reply With Quote
  #147  
Old 06-30-2009, 11:58 PM
NLP-er's Avatar
NLP-er NLP-er is offline
 
Join Date: Aug 2008
Location: Wrocław
Posts: 1,353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For those who have problems with using cache at all - right now I suspect that there is problem with making connection to DB. Even when all settings are ok - It seems that script is waiting for connection and DB holds it. Is someone with this problem has a clue what to change (maybe some number of connections limit) It would be good if share solution with others. As long as I'm not able to reproduce this on my side, or someone will give me access to his forum, I'm not even sure does this is a problem - and it is only a suspicion.
Reply With Quote
  #148  
Old 07-01-2009, 12:11 AM
NLP-er's Avatar
NLP-er NLP-er is offline
 
Join Date: Aug 2008
Location: Wrocław
Posts: 1,353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by GoTTi View Post
i just installed a testboard, clean, no mods on it and only installed this mod here, made a post, clicked a flag and nothing is happening. what could possibly be causing this to not work?
If it is clean, I think you could PM me access data to your adminCP and FTP. Then I can check what is going on Right now I can only tell that somesthing wrong
Reply With Quote
  #149  
Old 07-01-2009, 12:14 AM
alqloob alsahya alqloob alsahya is offline
 
Join Date: Dec 2006
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice

Excellent subject of very beautiful

Thank you
Reply With Quote
  #150  
Old 07-01-2009, 03:30 AM
GoTTi GoTTi is offline
 
Join Date: Jun 2002
Posts: 1,346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

my site is blocked from google adsense, would that matter in this situation?
Reply With Quote
  #151  
Old 07-01-2009, 03:33 AM
GoTTi GoTTi is offline
 
Join Date: Jun 2002
Posts: 1,346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NLP-er View Post
If it is clean, I think you could PM me access data to your adminCP and FTP. Then I can check what is going on Right now I can only tell that somesthing wrong
ive sent u a PM with the login.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:07 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.10652 seconds
  • Memory Usage 2,320KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete