ใส่รูปหัวข้อบอร์ดย่อยยังไงครับ smf

เริ่มโดย ekzakizm, 03 เมษายน 2011, 17:56:24

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

ekzakizm

ใส่รูปหัวข้อบอร์ดย่อยยังไงครับ smf
คือบอร์ดหลักผมใส่ได้แล้ว
แต่บอร์ดย่อยไม่ทราบว่าใส่ยังไงครับ

http://www.baccarat-club.com/forum/index.php/board,7.0.html

ใช้ smf 2.0 rc 5 คับ

ganginwpop

#1
ท่านจะเอาใส่ตำแหน่งไหนละครับ



ก่อนอื่นหา
id="messageindex"

ถ้าจะเอามาแทน #1 ก็
<td class="icon1 windowbg"><img ... /></td>
ถ้าจะเอามาแทน #2 ก็
<td class="icon2 windowbg"><img ... /></td>

แทรกเองก็เพิ่ม <td></td> ต่อ #2 ไปก็ได้ครับแล้วแต่ท่านเลย

ผมไม่มี Theme นี้นะครับ
แต่จากที่ เดาน่าจะมี if statement แถวนั้นด้วย
ยังไงท่านก็ลองๆดูละกันครับ

ลืมบอก ไฟล์ Messageindex.template.php ครับ
รับโม ปรับแต่ง ติดตั้ง แก้ไข [direct=http://www.simpleyoursite.com]บอร์ด SMF[/direct] ผลงาน [direct=http://www.simpleyoursite.com/portfolio.html]คลิกที่นี่[/direct]

อ่านการ์ตูนออนไลน์ ที่ MangaOnlines.com
Auto Pic Post to SMF from Mthai DEMO : MangaOnlines.com

[direct=http://www.simpleyoursite.com]รับทำเว็บไซต์เชียงใหม่[/direct] | [direct=http://www.simpleyoursite.com]รับทำเว็บไซต์[/direct]

ekzakizm

#2


ผมต้องการตรง เด็กผีแมนยูอะครับ ท่าน  :wanwan011:

ของผมเป็นทีม default เลยอะคับ
ต้องแก้ตรงไหนครับ

ganginwpop

<td class="icon1 windowbg"><img ... /></td>

แถวนี้แหละท่าน ^^
ตอนเข้าไปดูไม่ได้เป็นสมาชิกเลยไม่เห็น

ลงทุนสมัครเข้าไปดูเลยทีเดียว
:P
รับโม ปรับแต่ง ติดตั้ง แก้ไข [direct=http://www.simpleyoursite.com]บอร์ด SMF[/direct] ผลงาน [direct=http://www.simpleyoursite.com/portfolio.html]คลิกที่นี่[/direct]

อ่านการ์ตูนออนไลน์ ที่ MangaOnlines.com
Auto Pic Post to SMF from Mthai DEMO : MangaOnlines.com

[direct=http://www.simpleyoursite.com]รับทำเว็บไซต์เชียงใหม่[/direct] | [direct=http://www.simpleyoursite.com]รับทำเว็บไซต์[/direct]


ganginwpop

รับโม ปรับแต่ง ติดตั้ง แก้ไข [direct=http://www.simpleyoursite.com]บอร์ด SMF[/direct] ผลงาน [direct=http://www.simpleyoursite.com/portfolio.html]คลิกที่นี่[/direct]

อ่านการ์ตูนออนไลน์ ที่ MangaOnlines.com
Auto Pic Post to SMF from Mthai DEMO : MangaOnlines.com

[direct=http://www.simpleyoursite.com]รับทำเว็บไซต์เชียงใหม่[/direct] | [direct=http://www.simpleyoursite.com]รับทำเว็บไซต์[/direct]

ekzakizm

  <div class="tborder topic_table" id="messageindex">
      <table class="table_grid" cellspacing="0">
         <thead>
            <tr class="catbg">';


ใช่ตรงนี้รึปล่าวครับ
หรือว่าตรงนี้
   echo '
            <tr id="board_', $board['id'], '" class="windowbg2">
               <td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
                  <a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';


พอดีไม่ค่อยเข้าใจ php อะคับ

ganginwpop

ตรงนี้เลยท่าน
echo '
            <tr id="board_', $board['id'], '" class="windowbg2">
               <td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
                  <a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';


แต่เอ .... <img มันหายไปไหนว่า ต่อจากนี้ป่าวครับ
ถ้าไม่ได้จริงๆ PM FTP มาครับเดียวแก้ให้
:wanwan017:
รับโม ปรับแต่ง ติดตั้ง แก้ไข [direct=http://www.simpleyoursite.com]บอร์ด SMF[/direct] ผลงาน [direct=http://www.simpleyoursite.com/portfolio.html]คลิกที่นี่[/direct]

อ่านการ์ตูนออนไลน์ ที่ MangaOnlines.com
Auto Pic Post to SMF from Mthai DEMO : MangaOnlines.com

[direct=http://www.simpleyoursite.com]รับทำเว็บไซต์เชียงใหม่[/direct] | [direct=http://www.simpleyoursite.com]รับทำเว็บไซต์[/direct]

MaMa.Killer

บอร์ดหลักไฟล์ BoardIndex.template.php

บอร์ดย่อยไฟล์ MessageIndex.template.php

วิธีแก้เหมือนกัน

หา

// If the board is new, show a strong indicator.
if ($board['new'])
echo '<img src="', $settings['images_url'], '/on.gif" alt="', $txt[333]
, '" title="', $txt[333], '" />';
// This board doesn't have new posts, but its children do.
elseif ($board['children_new'])
echo '<img src="', $settings['images_url'], '/on2.gif" alt="', $txt[333]
, '" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off.gif" alt="', $txt[334]
, '" title="', $txt[334], '" />';

แทน

if ($board['new'])
echo '<img src="', $settings['images_url'], '/on_', $board['id'], '.gif" alt="', $txt[333],
'" title="', $txt[333], '" />';
// This board doesn't have new posts, but its children do.
elseif ($board['children_new'])
echo '<img src="', $settings['images_url'], '/on2_', $board['id'], '.gif" alt="', $txt[333],
'" title="', $txt[333], '" />';
// No new posts at all! The agony!!
else
echo '<img src="', $settings['images_url'], '/off_', $board['id'], '.gif" alt="', $txt[334],
'" title="', $txt[334], '" />';
รับโมฯ & แก้ไข และสร้าง Theme SMF, Wordpress และงานออกแบบ
Add Line Id : sodeclub

ekzakizm

เจอส่วนที่คล้ายแล้วคับน่าจะใช่
เมื่อกี้ลองแก้รอบนึง กดเข้าไปเข้าบอร์ดย่อยไม่ได้เลย
แต่จากโค้ด ผมแค่เข้าใจว่า icon1 รูปดั้งเดิม ถูกเก็บไว้ใน topic และเป็น .gif
ส่วน icon2 ผมไม่รู้แหะๆ
echo '
           <tr>
              <td class="icon1 ', $color_class, '">
               <img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
              </td>
              <td class="icon2 ', $color_class, '">
                 <img src="', $topic['first_post']['icon_url'], '" alt="" />
              </td>


แต่ผมสงสัยว่า
ตอนนี้ผมมี หัวข้อย่อยแมนยู  ใช้รูปแมนยู
       หัวข้อย่อยลิเวอพู  ใช้รูปลิเวอร์พูล

ผมจะต้องแก้โค้ดยังไงเพราะหัวข้อหลักผมจำได้ว่า แค่แก้โค้ดอะไรสักอย่าง
แล้วแค่ใส่รูปในทีม default/images แต่ตั้งชื่อรูปทั้งสามรูปว่า on_1.png on2_1.png off_1.png
โดยหมายเลข 1 คือเลขของบอร์ด เวลาเราสร้างบอร์ดใหม่ เราแค่เอาเม้าไปชี้ดูลิ้งว่า บอร์ดนี้หมายเลขอะไรแล้วก็มาสร้างรูป
แล้วก็ตั้งชื่อรูปแล้วเอาไปไว้ใน default/images
ผมทำตามจากที่นี่ครับ ไอคอนบอร์ดหลัก http://www.zone-it.com/14778

แต่บอร์ดย่อย ยังหาวิธีไม่ได้เลยครับ

ekzakizm

ทำได้แล้ว ครับ ขอบคุณ ทุกๆท่านนะครับ  :wanwan017: