Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vB Enterprise Translator Details »»
vB Enterprise Translator
Version: 2.3.15, by NLP-er NLP-er is offline
Developer Last Online: Jan 2019 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.8.x Rating:
Released: 08-13-2009 Last Update: 08-27-2015 Installs: 424
DB Changes Uses Plugins Auto-Templates
Additional Files  
No support by the author.

2.3.15 RELEASED - TRANSLATIONS NEVER WERE SO FAST!!!

Great thanks to all who nominate vBET and allow us to win MOTM :up:

This mod translates your forum using FREE translations for over 30 languages from Yandex API. It is 100% FREE in version described here (2.x).
Note: using this mod (vBET 2.x) is free and bound by license agreement (see below)

Yandex translation gives you 1 000 000 FREE characters per DAY to translate. Please note that Yandex do not supports all language pairs, but vBET detects automatically which are supported for your forum language.

Version for vBulletin 4.0 is here: vBET 2.4.x for vBulletin 4.0

vBET 3.x released!
Please note that vBET 3.x is developed as separate product line and it is available here: vBET 3.x. Full version is paid, it supports 53 languages each to each translation, using: Google, Microsoft, Apertium, Yandex, SDL BeGlobal and DetectLanguage. It has lot of optimizations for booth performance and translations costs.

LIVE DEMO - note that demo shows functionality of full version (3.x/4.x), which has more features than 2.x
See also screen shots below, for configuration options

Features:
- Translation by Yandex (in PRO version supports 53 languages using several translation providers)
- Optimized cache, algorhitms and more performance options - PRO version only
- Translates URLs and RSS - PRO version only
- Supports multi language communities (allows to write in different languages) - PRO version only
- Links appropriate for SEO consensus (configurable) - even without any SEO mod
- Long texts are translated no matter how big those are
- Translation cache (after first translation results are cached and next page generation is much faster)
- Doesn't translate BB codes for code, php and html (must refresh post cache to see effect on existing posts Admin CP -> Maintenance -> Update Counters -> Rebuild Post Cache)
- Easy installation - just upload files and import product file
- Highly configurable and easy configuration - by Admin CP (see screenschots)
- Configurable place for flags - simply select in options where you want to have translation flags. NO MANUAL TEMPLATE MODIFICATION. Supported: Footer-Bottom, Footer-Top, Navbar-Bottom, Navbar-Top, Custom
- Possible custom place for flags - in such case just edit template which you want and add $vbenterprisetranslatorflags
- Translates also archive pages
- Reverse page direction for Arabic, Hebrew and Persian languages
- Not translated save areas - if you need something to be not translated simply edit appropriate template and put it between
<!--START vBET NOT TRANSLATED AREA--> and <!--END vBET NOT TRANSLATED AREA--> (note: you cannot use any mod which removes comments to use this functionality)

Installation:
1. Download zip package (last release - see index at the end of file name)
2. Upload to your forum directory on server everything inside upload directory
3. Import in vB Admin CP -> Plugins & Products -> Manage Products -> Add/Import Product -> Choose product file, set Allow Overwrite to yes and click Import
4. Click here: "Mark as Installed" Thanks!
5. Configure in AdminCP -> vBulletin Options -> vBulletin Options -> vB Enterprise Translator
You MUST configure at least Forum language and Yandex Translation API key. NOTE that there are some other important options - especially if your forum is in subdirectory or if you use vbSEO.

For MORE INFO and troubleshooting please read first post There is FAQ. So save your time for writing questions which are already answered and get your solution faster

Known issues:
- link for page on which you are doesn't track translation, cause it has same URL as flag for forum default language

ENJOY! :up:

And thanks for nominations

Already donated (great thanks:up:
PossumX, adwade, roymogg, zipperty, CoZmicShReddeR, RedHacker, john devost, mandingo, chris, smnoel, Audax666, Damas, TurkeySub, nectons, Scalemotorcars, TheWite, Cybershaolin, burlesque, Ransy72560, chick, jaryx, linuxututs, cormee, dai-kun x2 :up:, imported_silkroad, Megatr0n, KrisP, CareyCrew, ghisirds, vitoreis, cyc, mosz, CThiessen, actolearn, jaconi, andie215, yahoooh, bollie

LICENSE AGREEMENT - using this mod you agree for those conditions:
- you are NOT allowed to remove credit link under any conditions
- removing credit link means BREAKING LICENSE AGREEMENT and you lose your rights to use this mod
- using it after that is illegal, it is software PIRACY and it will be notified in vBulletin community and other places, including appropriate government/police units in your country
- author of this mod reserves the right to change the terms of this license agreement at any time. Failure to receive notification of a change does not make those changes invalid. A current copy of this license is and will be available here.

Please note that in full vBET version there is possibility to buy branding free license. There is no such possibility in free version included here.

Version history:
2.3.15 Changes:
- Fixed canonical link
- Fixed issue with SSL verification
2.3.14 Changes:
- Added 48 new languages pairs
- Updated link to Yandex in configuration
- When translation limit is reached now we show original text instead of empty message
2.3.13 Updated link to Yandex API key
2.3.12 Google changed to Yandex translations
2.3.11 Added "Affiliate Program" parameter
2.3.10 Footer bug corrected
2.3.9 userip added to Google translation request + small bug fixed
2.3.8 Small bug fixed - now all supported languages can be chosen as forum default language
2.3.7 Bugs fixed:
- weird redirections with vbet_lang
- double language in URL
- changing text direction for specific languages
Added support for:
- usernames not translated in who is online
- supported URL replacements for canonical URL
2.3.6 Important fix! - there was issue with sending referrer header which is necessary by Google conditions. This one was fixed + issue with # in translation links
2.3.5 Important change - According to Google conditions referrer header must be added to each translation query - otherwise you can be banned by Google. Install this version to avoid any troubles.
Changes:
- Added referrer header for Google translation queries
- Corrected bug for returning to forum main page from translated page
Also according to actual Google conditions your "Powered by Google" information should have Google logo. So please change text for flags in your vBET configuration to something like this:
Code:
Automatic Translations (Powered by <span style="vertical-align:sub;"><img src="http://www.google.com/uds/css/small-logo.png" alt="Powered by Google" border="0"/></span>):
You can customize it but "Powered by Google" should stay.
2.3.4 Important bug fixed! Corrected translation of meta keywords and description
2.3.3 Important bug fixed! And also some other bugs fixed
- Fixed bug with shifted results caching
- Fixed bug for URLs to javascript functions
- Fixed bug for not translating usernames in postbit
- Little cosmetic changes
2.3.2 Really little changes.
- Changed default value of "Links title" attribute, to be more accurate for Google conditions
- Little template changed for flags, so "Link title" font will be smaller (just like vB info in footer)
- Small bug fixed
2.3.1 Some little bug fixes. Confirmed working with vbSEO 3.3.1 and confirmed working SEO links on forums with vbSEO and subdirectory in URL
2.3.0 Great news for those without vbSEO
- Supports translation SEO links even without vbSEO
- Translate Google Maps (configurable)
- Little optimizations (i.e. included only necessary things for not translated pages)
- Supports several cache cleaning strategies (optimization for really big forums) and automatically disables cache for cleaning time to avoid read/write conflicts
2.2.1 Small bug fixed with returning to default language for main page and SEO links (happens only for specific vbSEO configuration, so you don't need to update if 2.2.0 is working for you)
2.2.0 Translation tracking is working even when redirection by some mod occures (configurable reaction time)
2.1.0 9 new translation languages added! Also:
- Redirect to user language functionality - configurable (disabled, forced, after asking user does he want to be redirected).
- Fixed bug for SEO links with forums acting like directories by id.
- Corrected several flags
Update note: if you use SEO links you must change .htaccess file according to description in first post. If you changed any vbseo.php rules ? un-change those.
2.0.3 Quick bug fixing (issue with bitfields in options panel)
2.0.2 Added option to set your forum main domain for tracking URL's in subdomains
2.0.1 Small bug fixed and added direction changing suport also for Hebrew
2.0.0 Some small or medium changes and one big - for vbSEO users now SEO consensus links available.
What's new:
- Links appropriate for SEO consensus (configurable)
- Persian support added
- Doesn't translate BB codes for code, php and html (must refresh post cache to see effect on existing posts Admin CP -> Maintenance -> Update Counters -> Rebuild Post Cache)
- Reverse page direction for Arabic and Persian languages
- Option to set forum directory if not linked to domain
- Few bugs fixed
1.1.1 Some little changes and bugs fixed
- Re-encode not translated parts, so there is no strange signs in scripts, images title etc.
- Corrected flag for Sweden
- Few harmless bug fixed in translation tracking and cache disabling
- Respecting Google conditions default flags title have link to Google (configurable)
1.1.0 Lot of new features and no longer in beta stage
- Long texts are translated no matter how big those are
- Cache is working for chosen languages (you simply select for each language does translations should be cached)
- Option to add Google Translate API key for translation requests
- Configurable cache time to live and scheduled task which automatically remove old cache.
- Option to show flags only for guests
- Option to easily remove flags border (without any style changing)
- Option to not translate usernames
- During translation changes param lang in html tag
- Option to translate messages changed by vBSEO to JavaScript (it has such functionality for SEO purposes)
1.0.5 Flags showing correctly for forums in subdirectory + corrected returning to base language
1.0.4 Bug fixed with translation of '0' string. Also added little feature - if some parts of your forum uses vbSEO and some are not then now flags will have appropriate URL's everywhere
1.0.3 Big bug fixed Mod doesn't mess in template anymore (it did in some specific cases)
1.0.2 Small bug fixed - error with array merge solved
1.0.1 Small bug fixed - now choosing supported languages in options works fine
1.0.0 Great mod released

Download Now

File Type: zip vBET233.zip (47.0 KB, 527 views)
File Type: zip vBET235.zip (47.4 KB, 388 views)
File Type: zip vBET2310.zip (47.6 KB, 807 views)
File Type: zip vBET2315.zip (50.1 KB, 58 views)

Screenshots

File Type: jpg vbenterprisetranslator-flags.jpg (11.3 KB, 0 views)
File Type: jpg vbenterprisetranslator-options1.jpg (114.3 KB, 0 views)
File Type: jpg vbenterprisetranslator-options2.jpg (120.1 KB, 0 views)
File Type: jpg vbenterprisetranslator-options3.jpg (89.8 KB, 0 views)
File Type: jpg vbenterprisetranslator-options4.jpg (120.9 KB, 0 views)
File Type: jpg vbenterprisetranslator-options5.jpg (107.2 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
3 благодарности(ей) от:
awssar, Ig@r, m7sen

Comments
  #182  
Old 08-17-2009, 05:44 PM
T2x T2x is offline
 
Join Date: May 2006
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey guys, I decided to do some work and make this mod comply with vBSEO's link consensus idea.

What this will do is change all of the translation likes like so:

For example if a page.html is translated into danish, the url will normally be:

www.website.com/page.html?language=da

This will change the format to

www.website.com/da/page.html

This is much better for SEO so I am sure all of you with vBSEO will like this.

WARNING: this will only work properly if your forum is installed at the BASE of your domain, so something like www.website.com/index.php, if your forums are installed at www.website.com/forums/index.php some parts of my code will not work properly for you!!

All you need to do is open up your vbseo.php and add this code right BELOW error_reporting(0);

Make sure it is ABOVE the includes

Code:
if(isset($_GET['vbseourl']))
{
	$processuri = 0;
	if(preg_match('/^..(\/|$)/',$_GET['vbseourl']))
	{
		$processuri = 1;
		$_GET['language'] = substr($_GET['vbseourl'],0,2);
		$_GET['vbseourl'] = substr($_GET['vbseourl'],3);
	}
	else if(preg_match('/^\/..(\/|$)/',$_GET['vbseourl']))
	{
		$processuri = 1;
		$_GET['language'] = substr($_GET['vbseourl'],1,2);
		$_GET['vbseourl'] = substr($_GET['vbseourl'],3);
	}
	else if(substr($_GET['vbseourl'],0,5) == "zh-CN" || substr($_GET['vbseourl'],0,5) == "zh-TW")
	{
		$processuri = 1;
		$_GET['language'] = substr($_GET['vbseourl'],0,5);
		$_GET['vbseourl'] = substr($_GET['vbseourl'],6);
	}
	else if(substr($_GET['vbseourl'],1,5) == "zh-CN" || substr($_GET['vbseourl'],1,5) == "zh-TW")
	{
		$processuri = 1;
		$_GET['language'] = substr($_GET['vbseourl'],1,5);
		$_GET['vbseourl'] = substr($_GET['vbseourl'],6);
	}

	if($processuri == 1)
	{
		if(substr($_SERVER['REQUEST_URI'],0,2)=='//')
			$_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'],1);
		$tempuri = isset($_SERVER['HTTP_X_REWRITE_URL']) ? $_SERVER['HTTP_X_REWRITE_URL'] :
		(isset($_SERVER['HTTP_X_ORIGINAL_URL']) ? $_SERVER['HTTP_X_ORIGINAL_URL'] :
		(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] :
		(isset($_ENV['REQUEST_URI']) ? $_ENV['REQUEST_URI'] : $_SERVER['SCRIPT_NAME']))
		);
		if (strstr($tempuri, 'vbseo.php') && $_GET['vbseourl'])
			$tempuri = preg_replace('#vbseo\.php.*#', $_GET['vbseourl'] . ($_SERVER['QUERY_STRING']?'?'.$_SERVER['QUERY_STRING']:''), $tempuri);
		$tempuri = preg_replace('#\#.*$#', '', $tempuri);
		$_SERVER['REQUEST_URI'] = $tempuri;
		if(preg_match('/^\/..(\/|$)/',$_SERVER['REQUEST_URI']))
			$_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'],3);
		else if(substr($_SERVER['REQUEST_URI'],1,5) == "zh-CN" || substr($_SERVER['REQUEST_URI'],1,5) == "zh-TW")
			$_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'],6);
		$_SERVER['HTTP_X_REWRITE_URL'] = $_SERVER['REQUEST_URI'];
	}
}
else
{
	$processuri = 0;
	if(substr($_SERVER['REQUEST_URI'],0,2)=='//')
		$_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'],1);
	$tempuri = isset($_SERVER['HTTP_X_REWRITE_URL']) ? $_SERVER['HTTP_X_REWRITE_URL'] :
	(isset($_SERVER['HTTP_X_ORIGINAL_URL']) ? $_SERVER['HTTP_X_ORIGINAL_URL'] :
	(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] :
	(isset($_ENV['REQUEST_URI']) ? $_ENV['REQUEST_URI'] : $_SERVER['SCRIPT_NAME']))
	);
	$tempuri = preg_replace('#\#.*$#', '', $tempuri);

	if(preg_match('/^..(\/|$)/',$tempuri))
	{
		$processuri = 1;
		$_GET['language'] = substr($tempuri,0,2);
	}
	else if(preg_match('/^\/..(\/|$)/',$tempuri))
	{
		$processuri = 1;
		$_GET['language'] = substr($tempuri,1,2);
	}
	else if(substr($tempuri,0,5) == "zh-CN" || substr($tempuri,0,5) == "zh-TW")
	{
		$processuri = 1;
		$_GET['language'] = substr($tempuri,0,5);
	}
	else if(substr($tempuri,1,5) == "zh-CN" || substr($tempuri,1,5) == "zh-TW")
	{
		$processuri = 1;
		$_GET['language'] = substr($tempuri,1,5);
	}

	if($processuri == 1)
	{
		$_SERVER['REQUEST_URI'] = $tempuri;
		if(preg_match('/^\/..(\/|$)/',$_SERVER['REQUEST_URI']))
			$_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'],3);
		else if(substr($_SERVER['REQUEST_URI'],1,5) == "zh-CN" || substr($_SERVER['REQUEST_URI'],1,5) == "zh-TW")
			$_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'],6);
		$_SERVER['HTTP_X_REWRITE_URL'] = $_SERVER['REQUEST_URI'];
	}
}

If you want to 301 all of your old pages to the new link format, you can put this in your .htaccess above all of your existing rules

Code:
RewriteCond %{QUERY_STRING} (hl=|language=)(zh-TW|zh-CN|..)
RewriteRule ^(.*)$ http://%{HTTP_HOST}/%2/$1? [L,R=301]
Please note that this code assumes you are running vBSEO.

This code will fix translation for the base of your website if you want the following format. www.website.com/de or www.website.com/de/ . this only applies to your main page.

Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/?((zh-CN|zh-TW|..))/?$ vbseo.php?vbseourl=$1/index.php [L,QSA]
If you want to generate proper sitemaps with all of your new language urls, all you need to do is open up your vbseo_sitemap_functions.php in your vbseo_sitemap directory then:

find this code

Code:
}else
    		    	$freq = $vboptions['vbseo_sm_freq_t'];
    		    	     
            	vbseo_log_entry("[showthread] forum_id: $forumid, thread_id: $threadrow[threadid], total posts: $totalposts, pages: $totalpages, views: $threadrow[views] $prior");

    			for($p=1; $p<=$totalpages; $p++)
    			{
Add this code right after it:

Code:
$alanguages = array('ar', 'bg', 'zh-CN', 'zh-TW', 'hr', 'cs', 'da', 'nl', 'fi', 'fr', 'de', 'el', 'iw', 'hu', 'it', 'ja', 'ko', 'no', 'pl', 'pt', 'ro', 'ru', 'sr', 'sk', 'es', 'sv', 'th', 'tr');
					if(!$archived)
					foreach($alanguages as $hl) {
					$vbseo_stat['t']++; 
					$currentthreadurl = vbseo_url_thread($threadrow, $p, $archived);
					$strlenhost = strlen($vbseo_vars['bburl']."/");
					vbseo_add_url(substr($currentthreadurl,0,$strlenhost).$hl."/".substr($currentthreadurl,$strlenhost), 0.3, $threadrow['lastpost'], $freq);
					}
make sure its before:

Code:
$vbseo_stat[$archived?'at':'t'] += vbseo_add_2urls(
    				vbseo_url_thread($threadrow, $p, $archived),
    				vbseo_url_thread($threadrow, $p, $archived, true),
    				$prior,
    				$threadrow['lastpost'],
					$freq
    			);
				
				}

    			if($showpost)
    			{

            	$getposts = $db->query("
If you notice there is an array in the code that looks like this
Code:
$alanguages = array('ar', 'bg', 'zh-CN', 'zh-TW', 'hr', 'cs', 'da', 'nl', 'fi', 'fr', 'de', 'el', 'iw', 'hu', 'it', 'ja', 'ko', 'no', 'pl', 'pt', 'ro', 'ru', 'sr', 'sk', 'es', 'sv', 'th', 'tr');
You should put the code of every language that you want added to your sitemap file in this array. Mine may differ from the languages you support so make sure you check it against your installation.


Just a note of caution: My fixes assume you are running a standard installation of apache with vBSEO. They may not work properly on some systems due to differences in the way that vBSEO handles some server variables. I recommend that you back up any files before editting them that way if you encounter problems you can restore your old versions.

I will be working on this code more so if any of you have issues please let me know and I will work on them.

If NLP-er would like he can provide a modified version of his flags in order to work with the new format or I will write up the code later today. This is necessary so that the flags show the proper links.

Anyway enjoy guys
Reply With Quote
  #183  
Old 08-17-2009, 05:50 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 imported_silkroad View Post
The Google TOS, strictly interpreted, says translated pages cannot be cached for over 15 days.

However, if you modify them (fix bad translations), etc. I don't think you should necessarily dump them.

Also, the intent of the TOS is to "Do No Harm" to Google, Google's customers, and The World. If you are keeping a cache longer than 15 days and are not doing any harm, then I don't think your are violating the spirit of the TOS.

For example, if you are running Google Adsense and your translations are generating a lot of traffic for Google, and good revenue for Google, I don't think Google will be unhappy with you, but of course they cannot publish such a policy.

On the other hand, if you are caching translations and using them to drive traffic to Google's big competition, then Google might care.

So, if you want to be on the safe side, just drop all translations in the database that are older than 15 days, and you will be in compliance with the most strict interpretation of the TOS.

Don't Worry. Be Happy. Do No Harm.
That's why default value of cache time to live is 15. Every night mod automatically removes old cache. Everybody is happy
Reply With Quote
  #184  
Old 08-17-2009, 06:04 PM
Sweeks Sweeks is offline
 
Join Date: Jul 2008
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by T2x View Post
Hey guys, I decided to do some work and make this mod comply with vBSEO's link consensus idea.

What this will do is change all of the translation likes like so:

For example if a page.html is translated into danish, the url will normally be:

www.website.com/page.html?language=da

This will change the format to

www.website.com/da/page.html

This is much better for SEO so I am sure all of you with vBSEO will like this.

All you need to do is open up your vbseo.php and add this code right BELOW error_reporting(0);

Make sure it is ABOVE the includes

Code:
if(isset($_GET['vbseourl']))
{
	if(preg_match('/^..\//',$_GET['vbseourl']))
	{
		$_GET['language'] = substr($_GET['vbseourl'],0,2);
		$_GET['vbseourl'] = substr($_GET['vbseourl'],3);
	}
	else if(substr($_GET['vbseourl'],0,5) == "zh-CN" || substr($_GET['vbseourl'],0,5) == "zh-TW")
	{
		$_GET['language'] = substr($_GET['vbseourl'],0,5);
		$_GET['vbseourl'] = substr($_GET['vbseourl'],6);
	}

	if(preg_match('/^\/..\//',$_SERVER['REQUEST_URI']))
		$_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'],3);
	else if(substr($_SERVER['REQUEST_URI'],1,5) == "zh-CN" || substr($_SERVER['REQUEST_URI'],1,5) == "zh-TW")
		$_SERVER['REQUEST_URI'] = substr($_SERVER['REQUEST_URI'],6);

}

If you want to 301 all of your old pages to the new link format, you can put this in your .htaccess above all of your existing rules

Code:
RewriteCond %{QUERY_STRING} (language=)(..|zh-TW|zh-CN)$
RewriteRule ^(.*)$ http://www.YOURWEBSITEHERE.com/%2/$1? [L,R=301]
Just make sure to put the domain of your website instead of YOURWEBSITEHERE. Please note that this code assumes you are running vBSEO.

If you want to generate proper sitemaps with all of your new language urls, all you need to do is open up your vbseo_sitemap_functions.php in your vbseo_sitemap directory then:

find this code

Code:
}else
    		    	$freq = $vboptions['vbseo_sm_freq_t'];
    		    	     
            	vbseo_log_entry("[showthread] forum_id: $forumid, thread_id: $threadrow[threadid], total posts: $totalposts, pages: $totalpages, views: $threadrow[views] $prior");

    			for($p=1; $p<=$totalpages; $p++)
    			{
Add this code right after it:

Code:
$alanguages = array('ar', 'bg', 'zh-CN', 'zh-TW', 'hr', 'cs', 'da', 'nl', 'fi', 'fr', 'de', 'el', 'iw', 'hu', 'it', 'ja', 'ko', 'no', 'pl', 'pt', 'ro', 'ru', 'sr', 'sk', 'es', 'sv', 'th', 'tr');
					if(!$archived)
					foreach($alanguages as $hl) {
					$vbseo_stat['t']++; 
					$currentthreadurl = vbseo_url_thread($threadrow, $p, $archived);
					$strlenhost = strlen($vbseo_vars['bburl']."/");
					vbseo_add_url(substr($currentthreadurl,0,$strlenhost).$hl."/".substr($currentthreadurl,$strlenhost), 0.3, $threadrow['lastpost'], $freq);
					}
make sure its before:

Code:
$vbseo_stat[$archived?'at':'t'] += vbseo_add_2urls(
    				vbseo_url_thread($threadrow, $p, $archived),
    				vbseo_url_thread($threadrow, $p, $archived, true),
    				$prior,
    				$threadrow['lastpost'],
					$freq
    			);
				
				}

    			if($showpost)
    			{

            	$getposts = $db->query("
If you notice there is an array in the code that looks like this
Code:
$alanguages = array('ar', 'bg', 'zh-CN', 'zh-TW', 'hr', 'cs', 'da', 'nl', 'fi', 'fr', 'de', 'el', 'iw', 'hu', 'it', 'ja', 'ko', 'no', 'pl', 'pt', 'ro', 'ru', 'sr', 'sk', 'es', 'sv', 'th', 'tr');
You should put the code of every language that you want added to your sitemap file in this array. Mine may differ from the languages you support so make sure you check it against your installation.


Just a note of caution: My fixes assume you are running a standard installation of apache with vBSEO. They may not work properly on some systems due to differences in the way that vBSEO handles some server variables. I recommend that you back up any files before editting them that way if you encounter problems you can restore your old versions.

I will be working on this code more so if any of you have issues please let me know and I will work on them.

If NLP-er would like he can provide a modified version of his flags in order to work with the new format or I will write up the code later today. This is necessary so that the flags show the proper links.

Anyway enjoy guys
It isnt working for us:

Teen Forums

Any ideas?
Reply With Quote
  #185  
Old 08-17-2009, 06: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

New in faq:

1. I have indexed pages from old translator (with hl=) - what to do?
Thanks for solution to T2x
Just set rewrite rule in .htaccess - google will know that page have new place and will reindex it withaout any loss
Code:
RewriteCond %{QUERY_STRING} (hl=)(..|zh-TW|zh-CN)$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1\?language=%2 [L,R=301]
Reply With Quote
  #186  
Old 08-17-2009, 06:14 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 Sweeks View Post
It isnt working for us:

Teen Forums

Any ideas?
Also dont works on my forum - Page not found.

But thanks anyway - for now I have solition for redirect translations from old translator with hl= to new ones - see FAQ
Reply With Quote
  #187  
Old 08-17-2009, 06:15 PM
Sweeks Sweeks is offline
 
Join Date: Jul 2008
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was getting this:

/a/

Invalid Forum specified. If you followed a valid link, please notify the administrator
Reply With Quote
  #188  
Old 08-17-2009, 06:53 PM
jaconi jaconi is offline
 
Join Date: Jun 2009
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NLP-er View Post
1.1.0 RELEASED
Thanks man :up:

just did the update and usernames where not translated :up: :up:
Reply With Quote
  #189  
Old 08-17-2009, 09:28 PM
t.uzuner t.uzuner is offline
 
Join Date: Oct 2007
Location: ankara/t?rkiye
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi;
i am not using vbseo but
1)click flag open same page example english
2) click another link page automatically web site original language. how is this.

www.okulonceciyiz.biz
Reply With Quote
  #190  
Old 08-17-2009, 09:44 PM
Sweeks Sweeks is offline
 
Join Date: Jul 2008
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by t.uzuner View Post
hi;
i am not using vbseo but
1)click flag open same page example english
2) click another link page automatically web site original language. how is this.

www.okulonceciyiz.biz
Use the tracking option in this mods options
Reply With Quote
  #191  
Old 08-17-2009, 10:44 PM
Aclikyano Aclikyano is offline
 
Join Date: Apr 2006
Posts: 481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NLP-er View Post
Strange. vbet_translateHTML is called only twice and in booth places there are 3 parametes (you can check it looking for vbet_translateHTML in includes/vbenterprisetranslator_functions.php and product file). Also I have other vB version cause my functions.php have empty line 5737. SO it is hard for me to help you.

1. Upload all files again.
2. If still happens give me code around line 5737 in your includes/functions.php
// parse PHP include ##################
($hook = vBulletinHook::fetch_hook('global_complete')) ? eval($hook) : false;


AFTER # signs starts line 5737
did what you said still got the errors...
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 03:24 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06873 seconds
  • Memory Usage 2,421KB
  • Queries Executed 26 (?)
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
  • (15)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
  • (4)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (3)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_attachment
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete