SMF Thailand.

SMF Support => Administration and Functionality => ข้อความที่เริ่มโดย: special ที่ 30/09/05, 00:13:59

หัวข้อ: แก้ไขปุ่มเมนูยังไง ?
เริ่มหัวข้อโดย: special ที่ 30/09/05, 00:13:59

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

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

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


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



ขอบคุณมากคร้าบบบ
หัวข้อ: Re: แก้ไขปุ่มเมนูยังไง ?
เริ่มหัวข้อโดย: HackPro ที่ 30/09/05, 20:51:46
ในไฟล์ 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=to3il9eo1tcna451740rdjrtp1&">&#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 อ่ะนะครับ (เอาในแบบไปใช้)

ป.ล. อย่าลืมหารูปปุ่มไปใส่นะ แก้ชื่อไฟล์ให้ถูกด้วย
หัวข้อ: Re: แก้ไขปุ่มเมนูยังไง ?
เริ่มหัวข้อโดย: special ที่ 1/10/05, 03:42:43
ขอบคุณคร้าบ ;)