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)

jaryx 07-01-2009 03:27 PM

Quote:

Originally Posted by NLP-er (Post 1840744)
Note that some IP can suffer penalties for google and translation is terribly slow then (1 known case with domain banned in AdSense). During that our connection was passing out. So this update will reestablish connection even if goole gives you really long time to wait. It allows you to fululfill cache, so after that You will not need google anymore (only for new content).

Świetna robota bracie Polaku! Bez Ciebie ten zajebisty mod chyba szybko by upadł.
I nie muszę zmieniać serwera :rolleyes: Wcześniej pisałeś coś o dodawaniu do sitemapy vbseo i o własnym pajączku. Udostępnisz?

Good work. It is too early to issue a verdict, but unless your amendment, the entire operation takes a little longer?

Dave Hybrid 07-01-2009 04:04 PM

Quote:

Originally Posted by NLP-er (Post 1840771)
Those who didn't made update yet will have only one...

No offense but might be an idea to PM me your updates as releasing them in the thread might be confusing some people...

NLP-er 07-01-2009 05:19 PM

Quote:

Originally Posted by jaryx (Post 1840811)
Świetna robota bracie Polaku! Bez Ciebie ten zajebisty mod chyba szybko by upadł.
I nie muszę zmieniać serwera :rolleyes: Wcześniej pisałeś coś o dodawaniu do sitemapy vbseo i o własnym pajączku. Udostępnisz?

Good work. It is too early to issue a verdict, but unless your amendment, the entire operation takes a little longer?

Dzięki :D Co do vbSEO Sitemap genratora, to w kt?rymś z post?w jest link do tego jak to zrobić - ja ciągle zmieniam swoją wersje, więc lepiej jak to zrobisz na bazowej, a pestka bo tam jest jasno opisane co gdzie wkleić. Niestety nie pamiętam linku, więc albo spytaj Dave, albo przeglądnij dyskusje. Co do robocika - ja to napisałem w javie, więc musiałbyś umieć jeszcze odpalić... Jakby co to PM.

Thanks for appreciate :)

jaryx 07-01-2009 06:25 PM

Dave.
How do I can add the translated pages to the vbseo sitemap? I can't find how. :erm:

floggerss 07-01-2009 06:41 PM

Hello, im form argentina. I dont understand the part of the translateflag.php... My forum is in spanish.. i have to put Spain.. but i dont understand if i only have to add the code at the end of the correct line. Explain more.

Dave Hybrid 07-01-2009 06:51 PM

Quote:

Originally Posted by floggerss (Post 1840918)
Hello, im form argentina. I dont understand the part of the translateflag.php... My forum is in spanish.. i have to put Spain.. but i dont understand if i only have to add the code at the end of the correct line. Explain more.

You can just delete the spanish flag, either way the flag disappears and then you wont cause duplicate urls for your base language.

Dave Hybrid 07-01-2009 06:53 PM

Quote:

Originally Posted by jaryx (Post 1840908)
Dave.
How do I can add the translated pages to the vbseo sitemap? I can't find how. :erm:

http://www.vbseo.com/f66/adding-some...sitemap-34734/

That is my thread at vbseo. It will add showthread pages in the languages you enter in the code.

For other pages ask in my thread, im sure the vbseo guys will help out again.

Dave Hybrid 07-01-2009 06:54 PM

$alanguages = array('ar', 'bg', 'next', 'etc');
if(!$archived)
foreach($alanguages as $hl) {
$vbseo_stat['t']++;
vbseo_add_url(vbseo_url_thread($threadrow, $p, $archived).'?hl='.$hl, $prior, $threadrow['lastpost'], $freq);
}

Dave Hybrid 07-01-2009 06:59 PM

FYI I'm just testing a new version that should sort the db error emails once and for all, thanks.

floggerss 07-01-2009 07:07 PM

I done everything but i have this error


Parse error: syntax error, unexpected $end in /home/reinodra/public_html/includes/functions.php(5721) : eval()'d code on line 59

Mi site:
www.floggerss.com.ar

Sweeks 07-01-2009 07:22 PM

Quote:

Originally Posted by floggerss (Post 1840935)
I done everything but i have this error


Parse error: syntax error, unexpected $end in /home/reinodra/public_html/includes/functions.php(5721) : eval()'d code on line 59

Mi site:
www.floggerss.com.ar

It is meant to be the vbseo functions file within the vbseo folder not your forums functions.php :)

I just tried this our Dave and it has really crazy results on the amounts of new urls generated, ours is still running and it has already made 7 sitemaps from what was only two I think, is this normal? Not sure if it should be making this many lol

9 sitemaps total, changes listed are: +234,909 URLS, that is staggering!

floggerss 07-01-2009 07:25 PM

Quote:

Originally Posted by Sweeks (Post 1840945)
It is meant to be the vbseo functions file within the vbseo folder not your forums functions.php :)

g!

mmm And what can i do?

Sweeks 07-01-2009 07:28 PM

I would reupload the default vb functions file you edited, you should always back up before editing your files :) that should fix it providing you never altered the original before this time ;)

floggerss 07-01-2009 07:30 PM

Okei, but this only happen if i enable the plugings, if i turn it off, the forum works okei... if its on.. it shows you that error, in the header and if you want to translate the forum

NLP-er 07-01-2009 09:05 PM

Quote:

Originally Posted by Dave Hybrid (Post 1840746)
Ok, cool,

IT IS IMPORTANT TO NOTE THE USER BANNED FROM THE TRANSLATE IP WAS ALREADY BANNED IN ADSENSE, THIS SCRIPT DID NOT CAUSE THE BAN!

Exactly - the men was already banned in AdSense, and punishment was also working in translations by very long response time. The lesson - don't piss of google :D

NLP-er 07-01-2009 09:19 PM

Quote:

Originally Posted by Dave Hybrid (Post 1840927)
http://www.vbseo.com/f66/adding-some...sitemap-34734/

That is my thread at vbseo. It will add showthread pages in the languages you enter in the code.

For other pages ask in my thread, im sure the vbseo guys will help out again.

Can be helpfull to add this info in mod description - we have long conversaiton here and not anyone want o read it all ;)

Dave Hybrid 07-01-2009 10:40 PM

Quote:

Originally Posted by Sweeks (Post 1840945)
It is meant to be the vbseo functions file within the vbseo folder not your forums functions.php :)

I just tried this our Dave and it has really crazy results on the amounts of new urls generated, ours is still running and it has already made 7 sitemaps from what was only two I think, is this normal? Not sure if it should be making this many lol

9 sitemaps total, changes listed are: +234,909 URLS, that is staggering!

I said this script is powerful, i have 1 million urls in my sitemap... ;p

Normal URLs x28 :)

Dave Hybrid 07-01-2009 10:41 PM

It clearly states in the vbseo thread that you edit the vbseo_functions file, please pay attention.

If you edited the standard vb functions file than i would re-download the original from vb.com

Saviour 07-01-2009 11:01 PM

Dave...

Can you go to this page, please: http://glitchpc.com/forums/showthread.php?t=942

I have this installed and the page translates, but I get MySQL connection errors.

Can you please advise as soon as possible? Thank you.

Dave Hybrid 07-01-2009 11:08 PM

Quote:

Originally Posted by Saviour (Post 1841058)
Dave...

Can you go to this page, please: http://glitchpc.com/forums/showthread.php?t=942

I have this installed and the page translates, but I get MySQL connection errors.

Can you please advise as soon as possible? Thank you.

It's a mysql config issue, send your hosting support a mail and explain the error, they should then fix it.

Saviour 07-01-2009 11:45 PM

Thanks, Dave...

Fixed! It was an issue with the $mysqlserver = "localhost"; edit.

Just had to change that to the database server for the MySQL database.

floggerss 07-02-2009 12:07 AM

Quote:

Originally Posted by Dave Hybrid (Post 1841036)
It clearly states in the vbseo thread that you edit the vbseo_functions file, please pay attention.

If you edited the standard vb functions file than i would re-download the original from vb.com


I didnt edit anything, i only follow the instructions... i re upload the file.,. but the same error.

floggerss 07-02-2009 01:21 AM

wait, i use the same database... is the same?? i config that in the translate.php

1Unreal 07-02-2009 03:58 AM

Brilliant mod. Can't seem to get the flag bit to work though lol. Not sure why.

Voted 5 stars and nominated :)

Dave Hybrid 07-02-2009 10:12 AM

Quote:

Originally Posted by 1Unreal (Post 1841162)
Brilliant mod. Can't seem to get the flag bit to work though lol. Not sure why.

Voted 5 stars and nominated :)

Thanks, if you need any help, PM me your URL and ill take a quick look.

pericolosogr 07-02-2009 12:01 PM

Every time i hit a flag to translate i get a blank page!
All steps done, i have a standard vbulletin forum without vbSeo!

Any solutions?

Dave Hybrid 07-02-2009 12:13 PM

Quote:

Originally Posted by pericolosogr (Post 1841374)
Every time i hit a flag to translate i get a blank page!
All steps done, i have a standard vbulletin forum without vbSeo!

Any solutions?

Without an error message it is hard to say. If you dont get one try asking your host to turn on php errors on in the browser or ask them for your php error logs. Thanks.

pericolosogr 07-02-2009 12:17 PM

Nevermind i just saw the update!
It would be cool if you'd update immediately, just to save time to those who are experiencing this kind of problem!

NLP-er 07-02-2009 12:34 PM

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

1Unreal 07-02-2009 01:43 PM

Quote:

Originally Posted by Dave Hybrid (Post 1841317)
Thanks, if you need any help, PM me your URL and ill take a quick look.

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

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 04:11 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.01825 seconds
  • Memory Usage 1,845KB
  • 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
  • (9)bbcode_code_printable
  • (19)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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