Good morning everyone!
We have implemented a better SEO for newbb and thought anyone else might benefit for this change.
It's working [for us at least] much better than using just the Simplified URL's mapping - and it looks much nicer
The results:
http://www.yourwebsite.com/SEO_forums_name/t/xx/topic_title/IMPORTANT: You need apache + mod_rewrite installed in order for this hack to work.
Also, if you have suin's Simplified URLs hack - you have to cancel the forums module by using the $cancel_module variable in simplified_url.php file.
$cancel_module = "newbb";
[unless you have other modules already canceled, at which point you use $cancel_module = "other_module | newbb | etc"].
Now, to be a bit more descriptive:
1. SEO_forums_name => you define it. Can be anything, really.
2. /t/xx/ => identifier for the topic id. It will be created automatically by CBB when you make a new topic [/t/23/, /t/42/ and so on].
3. topic_title => the exact title of the topic - with dashes.
To give a real example, this particular topic [I am writing], would be:
https://xoops.org/forums/t/61568/seo-hack-for-cbb-v3.08/We have used part of the SEO generation code from SmartSection - to make things more portable and easier.
Currently we are running XOOPS v2.0.16 with simplified URLs hack - and this new one for CBB v3.08 - all running very smoothly
Installation:
Download the archive from:
SEO for CBB v3.08Step 1:
Put the following two lines in .htaccess in the root of your XOOPS installation [BEFORE the simplified URLs lines!]
RewriteRule ^SEO_forums_name/([a-z]+)/([0-9]+)(/(.+))? modules/newbb/seo.php?seoOp=$1&seoArg=$2&seoOther=$4&%{QUERY_STRING} [L]
RewriteRule ^SEO_forums_name(/)? modules/newbb/?%{QUERY_STRING} [L]
[make sure you replace SEO_forums_name with anything else you want for your URL => forums, forum, veryniceforums, etc!]
[I included these two lines already in a text file in the archive - considering these forums are breaking up the lines].
The same variable name needs to be replaced inside the seo_url.php file => [look for SEO_MODULE_NAME on line 7].
Step 2:
Add seo.php and seo_url.php from the archive into /modules/newbb/ directory - where you installed CBB
Step 3:
Replace header.php with the one from the archive - inside /modules/newbb/ directory.
[make sure that any changes you did to header.php - if any - are still valid or moved to the new file].
I hope this hack will help more people and sites and.. who knows - maybe we will see the new CBB version with SEO fully enabled! *smile*
Here,
aproape