PhpBB3 SEO Title

Mixed forum with code snippets, guides and styles
Forum rules
Everything in this forum is for everybody
But support only for Donators!
Post Reply
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

PhpBB3 SEO Title

Post by Stoker »

Title: PhpBB3 SEO Title
Version: 1.0.0 RC
PhpBB Version: 3.0.5 & 3.0.6 & 3.0.7
Demo: This board
Author: Greenweaver Revison by Stoker
Description: This mod is based on the Page Title Number MOD by Greenweaver (for pagination of titles) This will prevent search engines to see topics with several pages as dublicate content. It will also make the titles much more userfriendly.
How ever I feel that some improvements easily can be done.

This mod does two things. We are taking out the sitename in the titles and paginating topics and forums with page numbers.
Both are great for SEO.

Before doing this mod our titles will look like this:
Viewing a forum: PhpBB3 BBCodes · View forum - Announcements & News
Viewing a topic: PhpBB3 BBCodes · View forum - SEO Simple

After doing this mod our titles will look like this:
Viewing a forum: Announcements & News (if multiple pages: Page 2)
Viewing a topic: SEO Simple · snippets (if multiple pages: Page 2)

We dont want the "Site name" of the board, or the "View forum -" and "View topic -" to appear in the titles.
They dont have anything to do there.


Open language/en/common.php
Find:

Code: Select all

'INDEX'						=> 'Index page',
Replace with:

Code: Select all

'INDEX'			=> 'Name of your board',
Notes: Replace "Name of your board" with the name of your board. In my case it is PhpBB3 BBCodes.

Find:

Code: Select all

?>
Before add:

Code: Select all

// Page Title Number MOD
$lang = array_merge($lang, array(
	'TITLE_PAGE_NUMBER'	=> 'Page %s',
));
Open viewforum.php
Find:

Code: Select all

page_header($user->lang['VIEW_FORUM'] . ' - ' . $forum_data['forum_name'], true, $forum_id);
Replace with:

Code: Select all

page_header($forum_data['forum_name'] . ($start ? ' - ' . sprintf($user->lang['TITLE_PAGE_NUMBER'], floor($start / $config['topics_per_page']) + 1) : ''), true, $forum_id);
Open viewtopic.php
Find:

Code: Select all

page_header($user->lang['VIEW_TOPIC'] . ' - ' . $topic_data['topic_title'], true, $forum_id);
Replace with:

Code: Select all

page_header($topic_data['topic_title'] . ($start ? ' - ' . sprintf($user->lang['TITLE_PAGE_NUMBER'], floor($start / $config['posts_per_page']) + 1) : ''), true, $forum_id);
Open styles/your_style/template/overall_header.html
Note: This is the same for both prosilver and subsilver2
Find:

Code: Select all

<title>{SITENAME} &bull; <!-- IF S_IN_MCP -->{L_MCP} &bull; <!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; <!-- ENDIF -->{PAGE_TITLE}</title>
Replace with:

Code: Select all

<title><!-- IF S_IN_MCP -->{L_MCP} &bull; {PAGE_TITLE}<!-- ELSEIF S_IN_UCP -->{L_UCP} &bull; {PAGE_TITLE}<!-- ELSEIF SCRIPT_NAME == "viewtopic" -->{PAGE_TITLE} - {FORUM_NAME}<!-- ELSEIF SCRIPT_NAME == "viewforum" -->{FORUM_NAME}<!-- ELSE -->{PAGE_TITLE}<!-- ENDIF --></title>
Purge cache and refresh templates.
Board rules! No PM support
User avatar
Blackwolf
BBCoder IV
BBCoder IV
Posts: 272
Joined: 04 Dec 2010, 12:36
BBCodes: 101
Favourite BBCode: Dropcap
Favourite MOD: mchat
Location: Melbourne Australia

PhpBB3 SEO Title

Post by Blackwolf »

Will doing the overall_header tweaks mess up the tweaks done in the Topic SEO description and keywords mod :-?
Ultimate Edition, Ultimate Edition Oz, Oz Unity

“We are Anonymous. We are Legion. We do not forgive. We do not forget. Expect us.”
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

PhpBB3 SEO Title

Post by Stoker »

Yes, the edits will conflict.
Board rules! No PM support
User avatar
Blackwolf
BBCoder IV
BBCoder IV
Posts: 272
Joined: 04 Dec 2010, 12:36
BBCodes: 101
Favourite BBCode: Dropcap
Favourite MOD: mchat
Location: Melbourne Australia

PhpBB3 SEO Title

Post by Blackwolf »

Stoker wrote:Yes, the edits will conflict.
Thanks... :thumb:

The other edits will be okay though?
Ultimate Edition, Ultimate Edition Oz, Oz Unity

“We are Anonymous. We are Legion. We do not forgive. We do not forget. Expect us.”
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

PhpBB3 SEO Title

Post by Stoker »

Shoul be, but you have to test it.
I dont use the topoc seo mod.
Board rules! No PM support
Post Reply