Improve your phpbb page titles by ordering the title by the active page | topic name, forum name then site name

Optimise your phpbb page titles

To help optimise your phpbb forum titles throughout  your forum site and Google you should think about making  the following changes. This will remove the “index page” title that ends or starts at the begging of your phpbb forum site. It will also make the topic or forum titles show first before the site title.

This tweak requires you to have a re-write mod installed. The best MOD out there by far is the one by http://www.php-seo.com called Ultimate SEO URL

Edit – viewforum.php

Find:-

page_header($user->lang[‘VIEW_FORUM’] . ‘ – ‘ . $forum_data[‘forum_name’], true, $forum_id);

Replace with:–

page_header($forum_data[‘forum_name’] . $extra_title, true, $forum_id);

Edit:– viewtopic.php

Find:-

page_header($user->lang[‘VIEW_TOPIC’] . ‘ – ‘ . $topic_data[‘topic_title’], true, $forum_id);

Replace with:–

$extra_title = ($start > 0) ? ‘ – ‘ . $user->lang[‘Page’] . ( floor( ($start / $config[‘posts_per_page’]) ) + 1 ) : ”;

page_header($topic_data[‘topic_title’] . ‘ : ‘ .  $topic_data[‘forum_name’] . $extra_title, true, $forum_id);

Edit –  theme overall_header.html

Find:-

<title>{SITENAME} &bull; <!– IF S_IN_MCP –>{L_MCP} &bull; <!– ELSEIF S_IN_UCP –>{L_UCP} &bull; <!– ENDIF –>{PAGE_TITLE}</title>

Replace with:–

<title>{PAGE_TITLE} &bull; {SITENAME} &bull; <!– IF S_IN_MCP –>{L_MCP} &bull; <!– ELSEIF S_IN_UCP –>{L_UCP} &bull; <!– ENDIF –></title>


Leave a Reply