Phpbb is an open source software widely used for forums. The main reason is its minimal cost. Another reason for the open source lovers (like me) is the fact that it is one of the most successful free & open projects.
Unfortunately compared to other commercial boards it has less or not at all SEO orientation.
One of the things that needs to be fixed are the titles.
They are arranged in a not so good way. For SEO reasons it is preferable to show first the forum/topic title and then the board details & domain name.
Another thing that needs to be taken into consideration is the user friendly appearance.
We often have to balance between a user friendly website and a SEO friendly website but it is no so hard this time. In this case the users want to see the domain name in index title first, but then, when they start exploring the forums and topics they are more interested in topic’s/forum’s title.
So, we have to show the topic/forum title first on all pages except from the index page.
Time to mess with code:
In phpbb normally we find something like this, in overall_header.html (/<forum_root>/styles/<template_name>/template/overall_header.html):
<title>{SITENAME} - <!-- IF S_IN_MCP -->{L_MCP} -
<!-- ELSEIF S_IN_UCP -->{L_UCP} - <!-- ENDIF -->{PAGE_TITLE}</title>
We have to change this line into:
<title><!-- IF SCRIPT_NAME eq 'index' --> {SITENAME} - <!-- IF S_IN_MCP -->
{L_MCP} - <!-- ELSEIF S_IN_UCP -->{L_UCP} - <!-- ENDIF -->{PAGE_TITLE}
<!-- ELSE -->{PAGE_TITLE} - <!-- IF S_IN_MCP -->{L_MCP} -
<!-- ELSEIF S_IN_UCP -->{L_UCP} - <!-- ENDIF -->{SITENAME}<!-- ENDIF --></title>
Some explanations on the code:
The basic structure is of if/elseif/else/endif in phpbb templates is:
<!-- IF --> <!-- ELSEIF --> <!-- ELSE --> <!-- ENDIF -->
The way to check if we are on index.php is:
SCRIPT_NAME eq 'index'
If you want to replace index with another page simply change ‘index’ with the webpage name without the “.php”.
Regards,
Vasilis Mavroudis