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
  #212  
Old 07-03-2009, 05:13 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

Quote:
Originally Posted by NLP-er View Post
Hello right now google translates non braking spaces to normal spaces what can damage some layouts. To change this behaviour edit vb Global Translator hook

and replace:
Code:
require_once("translate.php");
$output=callback($output);
to:
Code:
$output = str_replace("&nbsp;", "<&nbsp;>", $output);
require_once("translate.php");
$output=callback($output);
$output = str_replace("<&nbsp;>", "&nbsp;", $output);
Thanks
Because it was not included in official release once again I strongly reccomend to made this change and also execute those queries on DB:
Code:
delete from wt_cache_short where originaltext like '%&nbsp;%';
delete from wt_cache_medium where originaltext like '%&nbsp;%';
delete from wt_cache where originaltext like '%&nbsp;%';
Other wise it is possible that your cache will be populated by data like
&nbsp;X
&nbsp;&nbsp;X
&nbsp;&nbsp;&nbsp;X

So for same X translation you can have many data in DB. Making mentioned change makes it works faster, and DB is smaller. Also executing those queries on DB will remove all data like listed above and bellow, X will be translated again and after that work without dummy DB filling, and unnecessary querying google for translations. Also indexes should be smaller and faster because there is less common prefixes in originaltext.

Also in my forum many sites have translations like:
Posts: X &nbsp;Y

So now you have translations like i.e.
Posts: 1 &nbsp;213
Posts: 1 &nbsp;6
Posts: 2 &nbsp;213
Posts: 2 &nbsp;6
Posts: 1 &nbsp;100
Posts: 2 &nbsp;100
Posts: 3 &nbsp;100
Posts: 3 &nbsp;213
Posts: 3 &nbsp;6

After my changes you will have less translations. For mentioned examples it will be only:
Posts: 1
Posts: 2
Posts: 3
213
100
6

Once again - I advice those changes
Reply With Quote
  #213  
Old 07-03-2009, 06:51 PM
CThiessen CThiessen is offline
 
Join Date: May 2007
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi;
works pretty good:
Googel.de
Quote:
Ergebnisse 1 - 10 von ungef?hr 7.530 aus brasil-web.de f?r inurl:?hl=
Googel.com
Quote:
Ergebnisse 1 - 10 von ungef?hr 8.070 aus brasil-web.de f?r inurl:?hl=
And most of them are from the time before I add sitemap and "<if condition="(THIS_SCRIPT == 'showthread')">" to the page so Google follow the Links on its own.

Christian
Reply With Quote
  #214  
Old 07-03-2009, 07:57 PM
motorola motorola is offline
 
Join Date: May 2009
Location: Romania
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NLP-er View Post
Just open any page on your forum, on any browser go to page source and find:

<meta http-equiv="Content-Type" content="text/html; charset=THIS-IS-YOUR-ORIGINALENCODING" />
Ok,thanks.

And what I should add here.. from here,I dont understand,I know,noob question maybe

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 -->

<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>
Reply With Quote
  #215  
Old 07-03-2009, 08:08 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

I notice that for some data cache is not used, translation is made again and again cache is populated. So there can be data duplication in DB. It is rare and didn't find out why yet (1 clue - working on that).

If you would like to check do you have data duplication in your cache execute those queries. 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):
Code:
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;

select count(*) counter, originaltext, tl from wt_cache group by originaltext, tl having count(*) > 1 order by counter desc;
If someone will find out some rule in those duplicated data it would be great


So till it will be solved you can just clear data duplications. I can share my queries to do that, but be aware that those can evaluating for some time and I had to connect by some mysql client on my comp, because by www client server was passing away before query finished it's job.

So if you want to delete data duplication first need to create 2 tables for temporary data:
Code:
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 quereies - note those will leave first translation in your database and only remove next translatioss for same text and language:
Code:
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 id from wt_cache_short where (originaltext, tl) in (SELECT originaltext, tl from saver) and id not in (SELECT id from saver));
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 id from wt_cache_medium where (originaltext, tl) in (SELECT originaltext, tl from saver) and id not in (SELECT id from saver));
DELETE FROM wt_cache_medium USING wt_cache_medium INNER JOIN cleaner ON wt_cache_medium.id = cleaner.id;

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 id from wt_cache where (originaltext, tl) in (SELECT originaltext, tl from saver) and id not in (SELECT id from saver));
DELETE FROM wt_cache USING wt_cache INNER JOIN cleaner ON wt_cache.id = cleaner.id;
Reply With Quote
  #216  
Old 07-03-2009, 08:12 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

Quote:
Originally Posted by motorola View Post
Ok,thanks.

And what I should add here.. from here,I dont understand,I know,noob question maybe

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 -->

<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>
Just remove whole line with your language flag. Same result.
Reply With Quote
  #217  
Old 07-03-2009, 08:40 PM
motorola motorola is offline
 
Join Date: May 2009
Location: Romania
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My forum dont load now,I see just a blank page,what happens?

LE: I found if I upload file translateflags.php forum doesnt load anymore,if I delete the file from the server it works.
Reply With Quote
  #218  
Old 07-04-2009, 12:14 AM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dave Hybrid View Post
Exactly, would you delete normal posts because your DB got a big big?

No, you'd keep them and upgrade the server if needed, so what's the difference... lol.

People worried about gaining too much content, that's a new one he he.
Not really, I help so many you would be surprised now think about all the ways this can sneak up on someone besides a post saying be careful of what might happen never hurts and is always rather helpful to those who are not even as far along in regards to vB as you are . You don't have to like what I say or agree with it based on your knowledge of vB but I have ran into many occasions where this would have made a difference and not for the positive so as long as others are aware IF they don't take the time to know then they might learn soon enough you see why I posted now?

Thanks!

S-MAN
Reply With Quote
  #219  
Old 07-04-2009, 10:44 AM
Dave Hybrid's Avatar
Dave Hybrid Dave Hybrid is offline
 
Join Date: Mar 2007
Posts: 463
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

v2.3a Official Release

* Small fix to avoid translation of non braking spaces to normal spaces

To upgrade;

find in Global Translator Plugin:
Code:
require_once("translate.php");
$output=callback($output);
replace:
Code:
$output = str_replace("&nbsp;", "<&nbsp;>", $output);
require_once("translate.php");
$output=callback($output);
$output = str_replace("<&nbsp;>", "&nbsp;", $output);
Run this DB query:

Code:
delete from wt_cache_short where originaltext like '%&nbsp;%';
delete from wt_cache_medium where originaltext like '%&nbsp;%';
delete from wt_cache where originaltext like '%&nbsp;%';
Then optimize all 3 tables to remove overhead.
Reply With Quote
  #220  
Old 07-04-2009, 12:23 PM
LI_Pets LI_Pets is offline
 
Join Date: Jun 2009
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Been watching this develop, so just one tweak is needed for vBseo?

How many languages will be used all 28?

Or do I chose them?
Reply With Quote
  #221  
Old 07-04-2009, 01:06 PM
da_judge's Avatar
da_judge da_judge is offline
 
Join Date: Jan 2006
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great addition, but im getting this problem

Installed yesterday... and i understand its got loads pages to translate...

If i translate home page... works fine... but if i try a forum or forum page all i get is

(French One)

Forum spécifié non valide. Si vous avez suivi un lien valide, s'il vous plaît aviser le administrateur

Translates into

Not valid specified forum. If you followed a link validates, please to notify the administrator

Is it a case of just waiting or is there a problem.... its been installed near 20 hours so far

Cheers
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 10:56 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.08007 seconds
  • Memory Usage 2,328KB
  • 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
  • (9)bbcode_code
  • (6)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
  • (2)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