SMF2 ไม่ได้ใส่ keyword ในเว็บ เมื่อ generate (อาจจะเป็นบางธีมก็ได้) และ ถ้ามีก็จะยาวไปตามหัวข้อกระทู้ ซึ่งถ้ายาวก็ไม่ใช่ keyword
code ต่อไปนี้ทำให้ SMF มี keyword และ จะมีเครื่องหมาย , คั่นให้อัตโนมัติ
เช่น
<meta name="keywords" content="how,to,use,webmail,(squirrelmail,roundcube),การใช้งานเว็บเมล์">
2.x
index.template.php
หา
', !empty($context['meta_keywords']) ? ' <meta name="keywords" content="' . $context['meta_keywords'] . '" />' : '', '
แทนด้วย
';
if (!empty($context['current_topic'])){
$keystring = str_replace(' ', ',', trim($context['page_title_html_safe']));
echo '<meta name="keywords" content="', $keystring, '" />';
}
elseif (!empty($context['current_board'])){
$keystring = str_replace(' ', ',', trim($context['page_title_html_safe']));
echo '<meta name="keywords" content="', $keystring, '" />';
}
else
{
echo '<meta name="keywords" content="', $context['meta_keywords'], '" />';
}
echo '1.x
หา
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
แทนด้วย
';
$keystring = str_replace(' ', ',', trim($context['page_title']));
echo '<meta name="keywords" content="', $keystring, '" />';
echo 'กรณีของ 1.x ไม่มีการ genaerate keyword ให้เลยมีเป็น fix ค่านั้นมาให้
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />