Back to vBulletin 3.8 Template Modifications

Get multi-lingual forums indexed in Google.
Mod Version: 1.00, by Alfa1

vB Version: 3.8.0 Rating: (0 vote - 0 average) Installs: 14
Released: 19 Jan 2009 Last Update: Never Downloads: 0
Not Supported Template Edits Code Changes Re-usable Code Translations  

If you have a site with subforums in different languages, then you will likely have encountered a problem with getting these forums indexed in the appropiate Google index. For example, if you have English set as your board language in vbulletin options, then your German sub-forum will not do well in google.de

To solve this I have written a simple conditional, that changes the lang=X html code on a per forum basis. The example below is for two languages besides the default language. You can add more languages, by repeating the code.

In SHOWTHREAD and in FORUMDISPLAY template, find:
PHP Code:
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]lang="$stylevar[languagecode]"
Replace with:
PHP Code:
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]<if condition="in_array($foruminfo['forumid'], array(1, 2, 3, 4, 5))">lang="X"><else />

<if 
condition="in_array($foruminfo['forumid'], array(6, 7, 8, 9, 10))">lang="Y"><else />lang="$stylevar[languagecode]"></if> </if> 
Do not forget to replace the forumID numbers with your forumID numbers.
To find your forumID's go to the forums that you want search engines to perceive as a different language and note down which number comes after /forumdisplay.php?f=

Do not forget to replace X and Y with the proper language codes. Here is an overview:
http://xml.coverpages.org/iso639a.html

Download

No files for download.


vblts.ru supports vBulletin®, 2022-2024