(REMOVED, WRONG CODE, PLEASE SEE BELOW FOR CORRECT CODE)
Last edited by basketmen; 09-09-10 at 08:03.
No. You add our code once. I just updated the description so now it describes clearly that additional code is added in other place (not 2nd time). If you have any suggestions how we can improve this description to be easier please write - we will gladly made it more user friendly
i think only need the second code, because all forum have more than 1 thread pages, and i believe 99% people want as much as possible they links in the sitemap so get more traffic
so we just only need do this, For SEO links?
Find:
And place BEFORE it...PHP Code:
$vbseo_stat[$archived?'at':'t'] += vbseo_add_2urls(
For SEO links
NOTE: REMOVE YOUR DEFAULT LANGUAGE CODE from $alanguagesPHP Code:
//additional code
$alanguages = array ('af','sq','ar','be','bg','ca','zh-CN','hr','cs','da','nl','en','pl','et','tl','fi','fr','gl','de','el','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');
if(!$archived) {
- $strlenhost = strlen($vbseo_vars['bburl']."/");
$currentthreadurl = vbseo_url_thread($threadrow, $p, $archived);
$currentthreadurl_before = substr($currentthreadurl,0,$strlenhost);
$currentthreadurl_after = "/".substr($currentthreadurl,$strlenhost);
$lastpost =& $threadrow['lastpost'];
$vbseo_stat['t'] += sizeof($alanguages);
foreach($alanguages as $language) {
vbseo_add_url($currentthreadurl_before.$language.$currentthreadurl_after, $prior, $lastpost, $freq);
}
}
//end additional code
Also if you disabled some languages in option panel you have to delete its codes too.
Please note that some of our clients have really huuge forums. So huge that generation of normal sitemap takes very long. So it takes longer when additional links are generted there. In such case most important is to generate it faster. That is why instructions tells how to do it for first thread pages. Also please note that Google will index other thread pages anyway - it will find links on your forum pages. So it is not necessary to put everything into sitemap.
ok Michał, so above post already correct For SEO links more than 1 thread pages?
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).
btw it is better the already translated links in the sitemap, not the original one link only with added language code
if the problem because can kill server resource, maybe it can be overcome by settings in admincp --> VBSEO --> vBSEO Sitemap Settings --> Delay Execution After Each Sitemap File, we can set it to like 30, 60 seconds or more so not the server can handle it. And we can set Max URLs in Sitemap Files to lower number like 5000 per sitemap
please consider it, i get many the original one link only with added language code indexed by google, only little with the already translated links
We completely agree that it is better to have already translated URLs in sitemap. Still there is a reason why we didn't made it already - performance. At this moment generation of 52 times more links for threads can consume lot of time for large forums. Translation of all of those in same time could made it really, really time consuming and generate lot of queries to database. At this moment we have lot of plans how to improve vBET. This issue has low priority, because it is not urgent. Still we keep it in mind.