Thread: Forum Display Enhancements - vB Enterprise Translator
View Single Post
  #183  
Old 17 Aug 2009, 20:04
Sweeks's Avatar
Sweeks Sweeks is offline
 
Join Date: Jul 2008
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


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


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


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Add this code right after it:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

make sure its before:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

If you notice there is an array in the code that looks like this
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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