[First post - excellent script, Rickard, Paul + anyone else responsible ]
Surprised to see no meta tags in default install - pretty essential for SEO.
I'm working on my first PunBB and started on SEO for it:
* header.php, after
<title><?php echo $page_title ?></title>
add
<meta name="description" content="<?php echo $page_title ?>." />
<meta name="keywords" content="keyword1 keyword2 <?php echo $page_title ?>" />
It's not a 'perfect' solution but at least gets keywords in the right place. One improvement would be to output "description" with $page_title and a few characters from opening post (if viewtopic).
* to prevent indexing of unnecessary content, includes/functions.php add 'rel="nofollow"':
if ($pun_config['o_rules'] == '1')
$links[] = '<li id="navrules"><a href="misc.php?action=rules" rel="nofollow">'.$lang_common['Rules'].'</a>';
if ($pun_user['is_guest'])
{
if ($pun_user['g_search'] == '1')
$links[] = '<li id="navsearch"><a href="search.php" rel="nofollow">'.$lang_common['Search'].'</a>';
$links[] = '<li id="navregister"><a href="register.php" rel="nofollow">'.$lang_common['Register'].'</a>';
$links[] = '<li id="navlogin"><a href="login.php" rel="nofollow">'.$lang_common['Login'].'</a>';
* to prevent indexing of unnecessary content, index.php add 'rel="nofollow"':
<dd><?php echo $lang_index['Newest user'] ?>: <a href="profile.php?id=<?php echo $stats['last_user']['id'] ?>" rel="nofollow"><?php echo pun_htmlspecialchars($stats['last_user']['username']) ?></a></dd>
* to prevent indexing of unnecessary content, footer.php add 'rel="nofollow"':
if ($pun_user['g_search'] == '1')
{
echo "\n\t\t\t".'<dl id="searchlinks" class="conl">'."\n\t\t\t\t".'<dt><strong>'.$lang_common['Search links'].'</strong></dt><dd><a href="search.php?action=show_24h" rel="nofollow">'.$lang_common['Show recent posts'].'</a></dd>'."\n";
echo "\t\t\t\t".'<dd><a href="search.php?action=show_unanswered" rel="nofollow">'.$lang_common['Show unanswered posts'].'</a></dd>'."\n\t\t\t".'</dl>'."\n";
}
* move 'board title' to end of <title> in viewforum.php and viewtopic.php (keywords in title should be placed first for SEO + I think it's nicer for users):
viewforum.php:
$page_title = pun_htmlspecialchars($cur_forum['forum_name'].' - '.$pun_config['o_board_title']);
viewtopic.php:
$page_title = pun_htmlspecialchars($cur_topic['subject'].' - '.$pun_config['o_board_title']);
All we need now are clean URLs!
"The invisible and the non-existent look very similar."