SMF Support > Administration and Functionality

แก้ไขปุ่มเมนูยังไง ?

(1/1)

special:

ตรงใต้ข้อมูลผู้ใช้ จะมี ปุ่ม ที่อยากจะใช้งาน แต่ไม่รู้จะเซ็ทยังไง.. อะครับ

คือปุ่ม ช่วยเหลือ กับปุ่ม หน้าแรก...

ตอนนี้ บอร์ดเป็นแค่ ส่วนนึงของเวป.. แต่อยากให้กดปุ่มหน้าแรก แล้วไปที่ หน้าแรก ของเวปจริงๆ ไม่ใช่หน้าแรกของบอร์ด..


ส่วนปุ่มช่วยเหลือ กดไป ก็ the page cannot be found.. จะชี้ไปหน้า FAQ ที่ทำเตรียมไว้ให้ยังไงอะครับ ?



ขอบคุณมากคร้าบบบ

HackPro:
ในไฟล์ index.template.php ในธีมที่คุณใช้อยู่

เปิดไปท้าย ๆ ของไฟล์ หาบรรทัดประมาณว่า

// Show the [home] and [help] buttons.

(ใน SMF 1.0.5 ธีมมาตราฐาน จะอยู่บรรทัดที่ 425)

แล้วแทรก Code ประมาณนี้นะครับ

แก้ไขเอาตามความเหมาะสมนะครับ


--- โค้ด: ---<?php

// Show the [home] and [help] buttons.
echo &#39;
<a href="/index.php?PHPSESSID=51rr6i489slfdcb9fbpkir0jv3&">&#39;, ($settings[&#39;use_image_buttons&#39;] ? &#39;<img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/&#39; . $context[&#39;user&#39;][&#39;language&#39;] . &#39;/mainsite.gif" alt="&#39; . $txt[&#39;mainsite&#39;] . &#39;" style="margin: 2px 0;" border="0" />&#39; : $txt[&#39;mainsite&#39;]), &#39;</a>&#39;, $context[&#39;menu_separator&#39;], &#39;
<a href="&#39;, $scripturl, &#39;">&#39;, ($settings[&#39;use_image_buttons&#39;] ? &#39;<img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/&#39; . $context[&#39;user&#39;][&#39;language&#39;] . &#39;/forum.gif" alt="&#39; . $txt[&#39;webboard&#39;] . &#39;" style="margin: 2px 0;" border="0" />&#39; : $txt[&#39;webboard&#39;]), &#39;</a>&#39;, $context[&#39;menu_separator&#39;], &#39;
        <a href="/faq.php">&#39;, ($settings[&#39;use_image_buttons&#39;] ? &#39;<img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/&#39; . $context[&#39;user&#39;][&#39;language&#39;] . &#39;/faq.gif" alt="&#39; . $txt[&#39;faq&#39;] . &#39;" style="margin: 2px 0;" border="0" />&#39; : $txt[&#39;faq&#39;]), &#39;</a>&#39;, $context[&#39;menu_separator&#39;];

?>

--- ปิดโค้ด ---

แล้วไปแก้ไฟล์ Modifications.thai.php ด้วยนะครับ โดยเพิ่ม


--- โค้ด: ---$txt['mainsite'] = 'หน้าเว็บหลัก';
$txt['faq'] = 'คำถามที่มักถามกันบ่อย ๆ';

--- ปิดโค้ด ---

ในกรณีที่ไม่ได้แก้ไขชื่อของตัวแปร $txt อ่ะนะครับ (เอาในแบบไปใช้)

ป.ล. อย่าลืมหารูปปุ่มไปใส่นะ แก้ชื่อไฟล์ให้ถูกด้วย

special:
ขอบคุณคร้าบ ;)

นำร่อง

[0] ดัชนีข้อความ

ไปที่เวอร์ชันเต็ม