![]() |
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'])) 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|..) 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 find this code Code:
}else 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'); Code:
$vbseo_stat[$archived?'at':'t'] += vbseo_add_2urls( 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'); 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 :D |
Quote:
|
Quote:
Teen Forums Any ideas? |
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)$ |
Quote:
But thanks anyway - for now I have solition for redirect translations from old translator with hl= to new ones - see FAQ :) |
I was getting this:
/a/ Invalid Forum specified. If you followed a valid link, please notify the administrator |
Quote:
just did the update and usernames where not translated :up: :up: |
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 |
Quote:
|
Quote:
($hook = vBulletinHook::fetch_hook('global_complete')) ? eval($hook) : false; AFTER # signs starts line 5737 did what you said still got the errors... |
All times are GMT. The time now is 09:12 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|