*หัดอ่านบ้าง สมาชิกที่มาโปรโมทเว็บ หรือ บริการ กรุณาตั้งกระทู้ให้ถูกหมวดด้วย ไม่ต้องเนียน เว็บบอร์ดมีคนดูแล ห้าม เว็บการพนัน ลบอย่างเดียว



ผู้เขียน หัวข้อ: วิธีการสร้างคีย์เวิร์คให้กับ SMF โดยอัตโนมัติ  (อ่าน 6355 ครั้ง)

0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้

กุมภาพันธ์ 28, 2016, 18:35:57
อ่าน 6355 ครั้ง

CoolhostPlus

  • *****
  • Information ออฟไลน์
  • เริ่มโตขึ้น
  • เจ้าของเว็บ
  • กระทู้: 106
  • คะแนน : 10001
    • ดูรายละเอียด
    • www.coolhostplus.net
สำหรับ SMF 2.0.x
เปิดไฟล์ index.template.php สำหรับธีมที่ใช้

หาโค้ด

โค๊ด: [Select]
', !empty($context['meta_keywords']) ? '
<meta name="keywords" content="' . $context['meta_keywords'] . '" />' : '', '

แทนที่หา

โค๊ด: [Select]
';
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 '