You can simply integrate vBET with vBSEO Sitemap Generator (it is free) to include links to translated pages and cms into generated sitemap.
If you have had your files already edited , please upload original version
Please note that instructions below will allow you to add into your sitemap links for threads translated pages. Because of performance reason those links will not be translated - there will be only added language code. Google will find real page anyway since you will get 301 redirect. Please note that it is not best approach - Google prefers to have final links in sitemap not redirecting one, but forcing translation of thousands links in all languages in the same time could kill your server or be threated by Google as attack (if links are not cached yet).
At first you have to find your vbseo_sitemap_functions_vbseo.php file in
forum root -> vbseo_sitemap -> vbseo_sitemap_functions_vbseo.php
Open and edit it with any text-editing program
On the very begining find this line:
PHP Code:
global $vbulletin, $vbseo_vars, $vbseo_stat, $vboptions, $db, $forumcache, $bbuserinfo;
And put after it, this:
PHP Code:
require_once(DIR. '/includes/vbenterprisetranslator_functions_vbseo.php'); $alanguages = array ('af','sq','ar','be','bg','ca','zh-CN','hr','cs','da','nl','pl','et','tl','fi','fr','gl','de','el', 'en','iw','hi','hu','is','id','ga','it','ja','ko','lv','lt','mk','ms','mt','no','fa','pt','ro','ru','sr','sk','sl','es','sw','sv','zh-TW','th','tr','uk','vi','cy','yi');
NOTE: REMOVE YOUR DEFAULT LANGUAGE CODE from $alanguages
Also if you disabled some languages in option panel you have to delete its codes too.
And find this line:
PHP Code:
vbseo_log_entry("[showthread] forum_id: $forumid, thread_id: $threadrow[threadid], total posts: $totalposts, pages: $totalpages, views: $threadrow[views] $prior");
for integrating translated threads
and if you're using SEO links i.e. put after it:
PHP Code:
if(!$archived) { $strlenhost = strlen($vbseo_vars['bburl']."/");
$currenturl = vbseo_url_thread($threadrow, 1, $archived);
$currenturl_before = substr($currenturl,0,$strlenhost);
$currenturl_after = "/".substr($currenturl,$strlenhost);
$lastpost =& $threadrow['lastpost'];
global $alanguages;
foreach($alanguages as $language) {
vbseo_add_url($currenturl_before.$language.$currenturl_after, $prior, $lastpost, $freq); } }
or in case you are NOT using SEO links i.e. :
PHP Code:
if(!$archived) {
global $alanguages;
$currentthreadurl = vbseo_url_thread($threadrow, 1, $archived) . '&language=';
$vbseo_stat['t'] += sizeof($alanguages);
$lastpost =& $threadrow['lastpost'];
foreach($alanguages as $language) {
vbseo_add_url($currentthreadurl.$language, $prior, $lastpost, $freq);
}
}
Do not use both of them!
****This part of solution is only for vBulletin Publishing Suite users****
Then, you have to find these two lines
PHP Code:
$prior = vbseo_sm_priority($vboptions['vbseo_sm_priority_cmssec'], $relp2);
PHP Code:
$prior = vbseo_sm_priority($vboptions['vbseo_sm_priority_cmsent'], $relp2);
and if you're using SEO links i.e. put after both of them:
PHP Code:
global $alanguages;
$strlenhost = strlen($vbseo_vars['bburl']."/");
$currenturl = vbseo_url_cms($drow);
$currenturl_before = substr($currenturl,0,$strlenhost);
$currenturl_after = "/".substr($currenturl,$strlenhost);
foreach($alanguages as $language) { $added_urls += vbseo_add_url($currenturl_before.$language.$currenturl_after, $prior, $drow['lastupdated'], $vboptions['vbseo_sm_freq_cms']); }
or in case you are NOT using SEO links i.e. place after each of them:
PHP Code:
global $alanguages;
$strlenhost = strlen($vbseo_vars['bburl']."/");
$currentthreadurl = vbseo_url_cms($drow) . '?language=';
foreach($alanguages as $language) {
$added_urls += vbseo_add_url($currentthreadurl.$language, $prior, $drow['lastupdated'], $vboptions['vbseo_sm_freq_cms']); }
Do not use both of them(with and without seo link)!
End editing and enjoy it!
Good luck!