หัวใจออนทัวร์
แนะนำ ถามให้หายข้องใจ => ประสปการณ์คนทำเวป => Topic started by: Phoenix on July 28, 2011, 02:04:42 PM
-
เทคนิคการ เพิ่มปุ่ม Home ฉบับลูกทุ่งๆ ..
เนื่องจาก ตอนทำครั้งแรกนั้น Search หาวิธีแล้ว มีแต่คนเขียนไว้สำหรับ SMF 1.x แต่เอามาใช้กับ บอร์ดรุ่นใหม่ที่โหลดมาไม่เป็น จึงต้อง Mod กันนิดหน่อย
-
วิธีการทำ อ้างอิง Themes defaults ตามบอร์ดที่ผมใช้นะครับ
เปิดไฟล์ defaults/index.template.php
ค้นหา ข้อความ
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
-------------------------------------------------------------------------
แทรก code ต่อท้าย
echo '
<div id="main_menu">
<ul class="dropmenu" id="menu_nav">';
echo' <li id="button_index">
<a class="firstlevel" href="http://www.jaikonjaunt.com/index.php">
<span class="firstlevel">home</span>
</a>
</li>';
-
code หลังจากการแก้ไข
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<div id="main_menu">
<ul class="dropmenu" id="menu_nav">';
echo' <li id="button_index">
<a class="firstlevel" href="http://www.jaikonjaunt.com/index.php">
<span class="firstlevel">home</span>
</a>
</li>';
-
อีก Themes ครับ (ตอนนี้ไม่ได้ใช้ ทำลองเฉย)
code เดิม
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
</td></tr>
</table>';
-------------------------------------------------------------------------------------------
code ใหม่่ หลังจากแทรก
function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;
echo '
<div id="main_menu">
<ul class="dropmenu" id="menu_nav">';
echo' <li id="button_index">
<a class="firstlevel" href="http://www.jaikonjaunt.com/index.php">
<span class="firstlevel">home</span>
</a>
</li>';
echo '
</td></tr>
</table>';