1
aproape
SEO hack for CBB v3.08
  • 2007/11/2 17:03

  • aproape

  • Just popping in

  • Posts: 19

  • Since: 2007/2/19


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.08

Step 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

2
nachenko
Re: SEO hack for CBB v3.08
  • 2007/11/2 17:15

  • nachenko

  • Quite a regular

  • Posts: 356

  • Since: 2005/1/18


Great!

3
suico
Re: SEO hack for CBB v3.08
  • 2007/11/2 19:19

  • suico

  • Friend of XOOPS

  • Posts: 374

  • Since: 2003/7/24


Great job, have you submitted it as a patch in sourceforge.net for the cbb developers to include this feature in their next release?

Thanks for sharing!
Yogurt Social Network Service
Visit: http://www.marcellobrandao.eti.br/

4
aproape
Re: SEO hack for CBB v3.08
  • 2007/11/2 19:36

  • aproape

  • Just popping in

  • Posts: 19

  • Since: 2007/2/19


Heya suico,

Quote:

suico wrote:
Great job, have you submitted it as a patch in sourceforge.net for the cbb developers to include this feature in their next release?



Err - nope! I wasn't aware of that being in existence actually - and.. I will look into it. *smile*


Quote:

Thanks for sharing!


You're welcome!

I'd like to hear if anyone else has implemented it successfully and, by the way - I put there v3.08 however I am sure it can be back-ported to other versions as well - I just didn't tested with anything else.


Here,
aproape

5
mesol
Re: SEO hack for CBB v3.08
  • 2007/11/3 0:41

  • mesol

  • Not too shy to talk

  • Posts: 168

  • Since: 2006/4/19


With some modification, I think this hack can also be implemented in News module. If I have Simplified URs hack activate in my site, do I have to inactivate it first (by commenting require simplified.php; in mainfile.php) ?

by the way, i try for my newbb butthe url become like this

http://www.mydomain.com/forum/t/266//&forum=42

6
aproape
Re: SEO hack for CBB v3.08
  • 2007/11/3 2:53

  • aproape

  • Just popping in

  • Posts: 19

  • Since: 2007/2/19


Hi there mesol!

Quote:

mesol wrote:
With some modification, I think this hack can also be implemented in News module.


Correct. We are not using News atm - only SmartSection - but the attached hack is pretty easy to adapt to other modules as well [most likely you have to re-write the .htaccess rules as well as the header.php [or equivalent] in the module itself and the list of files that are used to serve the content].

Quote:

If I have Simplified URs hack activate in my site, do I have to inactivate it first (by commenting require simplified.php; in mainfile.php) ?


My apologies - I forgot to mention that if you have simplified URLs - 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] [I will add this to the original post and archive - just in case].

Quote:

by the way, i try for my newbb butthe url become like this

http://www.mydomain.com/forum/t/266//&forum=42


Try the above..

also - make sure ALL modifications are made - from the first post [you shouldn't have that empty string between /266//


Here,
aproape

7
yared
Re: SEO hack for CBB v3.08
  • 2007/11/3 3:36

  • yared

  • Just popping in

  • Posts: 14

  • Since: 2003/2/13


oh oh I =

Quote:
by the way, i try for my newbb butthe url become like this
http://www.mydomain.com/forum/t/266//&forum=42


.(

8
riceking
Re: SEO hack for CBB v3.08
  • 2007/11/3 4:54

  • riceking

  • Just popping in

  • Posts: 16

  • Since: 2007/9/21


Maybe what you did is something creative.

But I don't understand why the hack is better than "Simplied URL", as you said.

Does google search engine prefer to get a '.htm' static page under a site's root path directly, or prefer to explode a site's layers to get a dynamic page?

9
aproape
Re: SEO hack for CBB v3.08
  • 2007/11/3 8:17

  • aproape

  • Just popping in

  • Posts: 19

  • Since: 2007/2/19


Hi there riceking,

Quote:

riceking wrote:
Maybe what you did is something creative.

But I don't understand why the hack is better than "Simplied URL", as you said.

Does google search engine prefer to get a '.htm' static page under a site's root path directly, or prefer to explode a site's layers to get a dynamic page?


The main reason is the URL itself.

With Simplified URLs hack you get the /forum+topic+id.. etc

With the one we implemented - you no longer have the '+'s [which are a bit annoying by the way] and, most importantly, you have the topic title in the url which in turn does help with SEO.


Here,
aproape

10
riceking
Re: SEO hack for CBB v3.08
  • 2007/11/3 9:35

  • riceking

  • Just popping in

  • Posts: 16

  • Since: 2007/9/21


Hello, aproape, thanks to your reply!
Quote:

most importantly, you have the topic title in the url which in turn does help with SEO.


However, I have 3 doubts:

1)Does the topic title in the url help with SEO?

2)If the topic title in the url helps with SEO, but the topic title is non-english(Chinese, for example), can it be written in URL?

3)If the CBB URL does not support non-english, is the hack still SEO?

Login

Who's Online

228 user(s) are online (95 user(s) are browsing Support Forums)


Members: 0


Guests: 228


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits