It aims to correct the page titles in phpBB to be more search engine friendly and bookmark friendly.
• When viewing forums, forum names come first, followed by the site name: Current Forum - My Site Name
• When viewing topics, topic titles come first, followed by the site name: Current Topic - My Site Name
• The 'View Forum' and 'View Topic' text is omitted from the title.
• This will also add Page Numbering to paginated forums and topics, (this idea/code inspired from a MOD by Greenweaver and Evil<3): Current Topic - Page 3 - My Site Name.
• The use of bullets are replaced by hyphens, so there are always only hyphens between title subjects
• All other pages like UCP, MCP, etc will display the page title the way phpBB has in the past, except using hyphens instead of bullets
Open: viewforum.php
FIND:
Code: Select all
// Dump out the page header and load viewforum template
page_header($user->lang['VIEW_FORUM'] . ' - ' . $forum_data['forum_name'], true, $forum_id);
Code: Select all
// Dump out the page header and load viewforum template
page_header($forum_data['forum_name'] . ($start ? ' - ' . sprintf($user->lang['PAGE_TITLE_NUMBER'], floor($start / $config['topics_per_page']) + 1) : ''), true, $forum_id);
FIND:
Code: Select all
// Output the page
page_header($user->lang['VIEW_TOPIC'] . ' - ' . $topic_data['topic_title'], true, $forum_id);
Code: Select all
// Output the page
page_header($topic_data['topic_title'] . ($start ? ' - ' . sprintf($user->lang['PAGE_TITLE_NUMBER'], floor($start / $config['posts_per_page']) + 1) : ''), true, $forum_id);
FIND:
Code: Select all
'PAGE_OF' => 'Page <strong>%1$d</strong> of <strong>%2$d</strong>',
Code: Select all
'PAGE_TITLE_NUMBER' => 'Page %s',
FIND:
Code: Select all
<title>{SITENAME} • <!-- IF S_IN_MCP -->{L_MCP} • <!-- ELSEIF S_IN_UCP -->{L_UCP} • <!-- ENDIF -->{PAGE_TITLE}</title>
Code: Select all
<title><!-- IF not S_VIEWTOPIC and not S_VIEWFORUM -->{SITENAME} - <!-- ENDIF --><!-- IF S_IN_MCP -->{L_MCP} - <!-- ELSEIF S_IN_UCP -->{L_UCP} - <!-- ENDIF -->{PAGE_TITLE}<!-- IF S_VIEWTOPIC or S_VIEWFORUM --> - {SITENAME}<!-- ENDIF --></title>