23 กุมภาพันธ์ 2555, 10:38:44
ยินดีต้อนรับผู้เยี่ยมชม
  • noavata
  • ยินดีต้อนรับคุณ, ผู้เยี่ยมชม กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน
    เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น
Page Rank

ทำเว็บไซต์ | แต่งบอร์ด | ออกแบบ | SMF | Joomla | Drupal | WordPress | JQuery | CMS | ECommerce | Tel. 08-08577477

ส่งหัวข้อนี้พิมพ์ หน้า: 1 
icon message ผู้เขียน หัวข้อ: Thumbnail on Topic Listing แสดงไฟล์แนบหน้าหัวข้อ  (อ่าน 1824 ครั้ง)
0 สมาชิก และ 1 ผู้เยี่ยมชม กำลังดูหัวข้อนี้
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general เมื่อ: 13 มิถุนายน 2553, 14:30:01
  • ชื่อ: Thumbnail on Topic Listing
  • ผู้เขียน: vbgamer45
  • นำเสนอโดย: DexMoreGroup
  • ประเภท: Themes
  • รองรับ: SMF 1.1.xx, 2.0.xx
  • ปรับปรุงล่าสุด: 8 มีนาคม 2553
  • ต้นฉบับ: Thumbnail on Topic Listing

รายละเอียด
      แสดงรูปย่อของไฟล์แนบหน้าหัวข้อกระทู้ (MessageIndex)

ตัวอย่าง
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com

สำหรับ SMF 1.1.xx

แก้ไขไฟล์:

file $sourcedir/MessageIndex.php

ค้นหา -->>
โค๊ด: [Select]
// Grab the appropriate topic information...
if (!$pre_query || !empty($topic_ids))

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
// Thumbnail Topic Mod
if (isset($modSettings['photo_boards']))
$modSettings['photo_boards'] = explode(',', $modSettings['photo_boards']);
else
$modSettings['photo_boards'] = array($board);

// Used to decide if we thumbnails are shown on this topic listing page
$context['show_thumbnails'] = false;

// End Thumbnail Topic Mod

ค้นหา -->>
โค๊ด: [Select]
ORDER BY " . ($pre_query ? "FIND_IN_SET(t.ID_TOPIC, '" . implode(',', $topic_ids) . "')" : (!empty($modSettings['enableStickyTopics']) ? 'isSticky' . ($fake_ascending ? '' : ' DESC') . ', ' : '') . $_REQUEST['sort'] . ($ascending ? '' : ' DESC')) . "

แก้เป็น -->>
โค๊ด: [Select]
GROUP BY t.ID_TOPIC
ORDER BY " . ($pre_query ? "FIND_IN_SET(t.ID_TOPIC, '" . implode(',', $topic_ids) . "')" : (!empty($modSettings['enableStickyTopics']) ? 'isSticky' . ($fake_ascending ? '' : ' DESC') . ', ' : '') . $_REQUEST['sort'] . ($ascending ? '' : ' DESC')) . "

ค้นหา -->>
โค๊ด: [Select]
ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
mf.smileysEnabled AS firstSmileys

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
, IFNULL(big.ID_ATTACH, 0) AS bigId, big.filename AS bigFilename, big.width AS bigWidth, big.height AS bigHeight,
IFNULL(thn.ID_ATTACH, 0) AS thnId, thn.filename AS thnFilename, thn.width AS thnWidth, thn.height AS thnHeight

ค้นหา -->>
โค๊ด: [Select]
FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS ml, {$db_prefix}messages AS mf)

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
LEFT JOIN {$db_prefix}attachments AS big ON (big.ID_MSG = mf.ID_MSG AND big.attachmentType = 0)
LEFT JOIN {$db_prefix}attachments AS thn ON (thn.ID_ATTACH = big.ID_THUMB)

ค้นหา -->>
โค๊ด: [Select]
// Begin 'printing' the message index for current board.
while ($row = mysql_fetch_assoc($result))
{
if ($row['ID_POLL'] > 0 && $modSettings['pollMode'] == '0')
continue;

เพิ่มไว้หลัง -->>
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com

ค้นหา -->>
โค๊ด: [Select]
// 'Print' the topic info.
$context['topics'][$row['ID_TOPIC']] = array(
'id' => $row['ID_TOPIC'],

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'image' => array($image),

file $themedir/MessageIndex.template.php

ค้นหา -->>
โค๊ด: [Select]
<td width="9%" colspan="2" class="catbg3"></td>

แก้เป็น -->>
โค๊ด: [Select]
<td width="9%" colspan="', $context['show_thumbnails'] ? 3 : 2, '" class="catbg3"></td>

ค้นหา -->>
โค๊ด: [Select]
echo '
<tr>
<td class="windowbg2" valign="middle" align="center" width="5%">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="windowbg2" valign="middle" align="center" width="4%">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>

แก้เป็น -->>
โค๊ด: [Select]
echo '
<tr>
<td class="windowbg2" valign="middle" align="center" width="5%">
<img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
</td>
<td class="windowbg2" valign="middle" align="center" width="4%">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>';
// Thumbnail Topic Mod
if ($context['show_thumbnails'])
{
echo '<td class="windowbg2" valign="middle" align="center">';

$imagefound = false;

foreach ($topic['image'] as $image)
{
if ($imagefound == true)
break;

if (isset($image['id']))
{

echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $image['width'], '" height="', $image['height'], '" alt="" /></a>';
$imagefound = true;
}
}

echo '</td>';
}

// End Thumbnail Topic Mod

echo '

ลิงค์หัวข้อ: http://dexmore.com/topic/1933
Windows XP    Firefox 3.6.3   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 1 เมื่อ: 25 มิถุนายน 2553, 12:50:22
สำหรับ SMF 2.0.xx

แก้ไขไฟล์:

file $sourcedir/MessageIndex.php

ค้นหา -->>
โค๊ด: [Select]
// Grab the appropriate topic information...
if (!$pre_query || !empty($topic_ids))

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
// Thumbnail Topic Mod
if (isset($modSettings['photo_boards']))
$modSettings['photo_boards'] = explode(',', $modSettings['photo_boards']);
else
$modSettings['photo_boards'] = array($board);

// Used to decide if we thumbnails are shown on this topic listing page
$context['show_thumbnails'] = false;

// End Thumbnail Topic Mod

ค้นหา -->>
โค๊ด: [Select]
ORDER BY ' . ($pre_query ? 'FIND_IN_SET(t.id_topic, {string:find_set_topics})' : (!empty($modSettings['enableStickyTopics']) ? 'is_sticky' . ($fake_ascending ? '' : ' DESC') . ', ' : '') . $_REQUEST['sort'] . ($ascending ? '' : ' DESC')) . '

แก้เป็น -->>
โค๊ด: [Select]
GROUP BY t.id_topic
ORDER BY ' . ($pre_query ? 'FIND_IN_SET(t.id_topic, {string:find_set_topics})' : (!empty($modSettings['enableStickyTopics']) ? 'is_sticky' . ($fake_ascending ? '' : ' DESC') . ', ' : '') . $_REQUEST['sort'] . ($ascending ? '' : ' DESC')) . '

ค้นหา -->>
โค๊ด: [Select]
SUBSTRING(mf.body, 1, 385) AS first_body, ml.smileys_enabled AS last_smileys, mf.smileys_enabled AS first_smileys

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
, IFNULL(big.id_attach, 0) AS big_id, big.filename AS big_filename, big.width AS big_width, big.height AS big_height,
IFNULL(thn.id_attach, 0) AS thn_id, thn.filename AS thn_filename, thn.width AS thn_width, thn.height AS thn_height

ค้นหา -->>
โค๊ด: [Select]
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member

แก้เป็น -->>
โค๊ด: [Select]
LEFT JOIN {db_prefix}attachments AS big ON (big.id_msg = mf.id_msg AND big.attachment_type = 0)
LEFT JOIN {db_prefix}attachments AS thn ON (thn.id_attach = big.id_thumb)
LEFT JOIN {db_prefix}members AS meml ON (meml.id_member = ml.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)

ค้นหา -->>
โค๊ด: [Select]
// Begin 'printing' the message index for current board.
while ($row = $smcFunc['db_fetch_assoc']($result))
{
if ($row['id_poll'] > 0 && $modSettings['pollMode'] == '0')
continue;

เพิ่มไว้หลัง -->>
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com

ค้นหา -->>
โค๊ด: [Select]
// 'Print' the topic info.
$context['topics'][$row['id_topic']] = array(
'id' => $row['id_topic'],

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'image' => array($image),

file $themedir/MessageIndex.template.php

ค้นหา -->>
โค๊ด: [Select]
<th scope="col" class="smalltext first_th" width="8%" colspan="2">&nbsp;</th>

แก้เป็น -->>
โค๊ด: [Select]
<th scope="col" class="smalltext first_th" width="8%" colspan="', $context['show_thumbnails'] ? 3 : 2, '">&nbsp;</th>

ค้นหา -->>
โค๊ด: [Select]
<td class="icon2 ', $color_class, '">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>

แก้เป็น -->>
โค๊ด: [Select]
<td class="icon2 ', $color_class, '">
<img src="', $topic['first_post']['icon_url'], '" alt="" />
</td>';
// Thumbnail Topic Mod
if ($context['show_thumbnails'])
{
echo '<td class="windowbg2" valign="middle" align="center">';

$imagefound = false;

foreach ($topic['image'] as $image)
{
if ($imagefound == true)
break;

if (isset($image['id']))
{

echo '<a href="', $topic['first_post']['href'], '"><img src="', $image['url'], '" width="', $image['width'], '" height="', $image['height'], '" alt="" /></a>';
$imagefound = true;
}
}

echo '</td>';
}

// End Thumbnail Topic Mod

echo '

ลิงค์หัวข้อ: http://dexmore.com/topic/1933
Windows XP    Firefox 3.6.4   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
*



Thailand   ชาย ออฟไลน์ เว็บไซต์
icon message
general ความคิดเห็นที่ 2 เมื่อ: 8 สิงหาคม 2553, 15:31:54
Mod ตัวนี้ติดตั้งแล้วจะใส่ภาพยังไงคับ

ลิงค์หัวข้อ: http://dexmore.com/topic/1933
Windows XP    Chrome 5.0.375.125   see ip บันทึกการเข้า
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 3 เมื่อ: 8 สิงหาคม 2553, 15:39:26
ไม่มีการใส่ภาพครับ มันจะดึงรูปจากไฟล์แนบมาแสดง ถ้าหัวข้อไม่มีรูปไฟล์แนบก็ไม่แสดงครับ

ลิงค์หัวข้อ: http://dexmore.com/topic/1933
Windows XP    Firefox 3.6.8   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
*
***



Thailand   ชาย ออฟไลน์ เว็บไซต์
icon message
general ความคิดเห็นที่ 4 เมื่อ: 12 กันยายน 2553, 18:54:10
ได้แนบไฟล์หรือยังครับ เป็นรูปภาพหรือยังครับ

ตัวอย่างเว็บที่ใช้อยู่ครับ

โค๊ด: [Select]
http://www.dekconwan.com/smf/index.php?board=5.0

ถ้าไม่มีไฟล์แนบจะไม่โชว์ครับ...

ลิงค์หัวข้อ: http://dexmore.com/topic/1933
Windows XP    Firefox 3.6.9   see ip บันทึกการเข้า
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 5 เมื่อ: 12 กันยายน 2553, 18:56:31
ถ้าไม่ได้ใช้ธีมมาตรฐานต้องเพิ่มโค้ดเองในไฟล์ MessageIndex.template.php ของธีมที่ใช้นะครับ

ลิงค์หัวข้อ: http://dexmore.com/topic/1933
Windows XP    Firefox 3.6.9   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
ด้วยรักษ์อาข่า โซ แลเชอ
*
***


รักษ์ชนเผ่าอาข่า

Thailand   ชาย ออนไลน์ เว็บไซต์
icon message
general ความคิดเห็นที่ 6 เมื่อ: 5 กันยายน 2554, 19:36:31
พี่ครับ....
กำหนดความกว้าง ความสูง ภาพแนบไฟล์ที่โชว์หน้าหัวข้อกระทู้นั้นๆๆ...ตรงไหนครับ

*** อยากกำหนดให้เล็กลงกว่านี้


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

ลิงค์หัวข้อ: http://dexmore.com/topic/1933
Windows XP    Chrome 13.0.782.220   see ip บันทึกการเข้า
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 7 เมื่อ: 5 กันยายน 2554, 19:40:32
มันอยู่ที่การกำหนดค่าของไฟล์แนบครับ mod นี้เรื่องขนาดรูปหน้าหัวข้อเอาดีไม่ได้หรอกครับ

ลิงค์หัวข้อ: http://dexmore.com/topic/1933
Windows XP    Firefox 6.0.1   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
ด้วยรักษ์อาข่า โซ แลเชอ
*
***


รักษ์ชนเผ่าอาข่า

Thailand   ชาย ออนไลน์ เว็บไซต์
icon message
general ความคิดเห็นที่ 8 เมื่อ: 5 กันยายน 2554, 19:44:57
ถ้าำกำหนดไม่ได้..ดูไม่สวยเลย
...ลบออกดีกว่า

..มี mod อื่นที่กำหนดได้หรือเปล่า


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

ลิงค์หัวข้อ: http://dexmore.com/topic/1933
Windows XP    Chrome 13.0.782.220   see ip บันทึกการเข้า
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 9 เมื่อ: 5 กันยายน 2554, 19:49:40
อะไรที่เราให้ผู้ใช้โพสต์ได้ แทรกได้ไม่มีทางที่จะควบคุมขนาดได้หรอกครับ เราจะไปกำหนดบังคับเขาอย่างไรว่าต้องโพสต์ขนาดเท่านี้เท่านั้น เมื่อบังคับไม่ได้ เราก็กำหนดขนาดให้มันตายตัวไม่ได้

ลิงค์หัวข้อ: http://dexmore.com/topic/1933
Windows XP    Firefox 6.0.1   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
*



Thailand   ชาย ออฟไลน์
icon message
general ความคิดเห็นที่ 10 เมื่อ: 27 ธันวาคม 2554, 15:55:06
ถ้ามีรูปแนบหลายรูปเราจะกำหนดให้ดึงรูปที่เราต้องการได้มั้ยครับ

ลิงค์หัวข้อ: http://dexmore.com/topic/1933
Windows NT 6.1    Chrome 12.0.742.112   see ip บันทึกการเข้า
โฮสต์ดีๆ บริการด้วยใจ
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 11 เมื่อ: 27 ธันวาคม 2554, 16:41:37
ไม่ได้ครับมันกำหนดให้ดึงรูปแรกจากหัวข้อที่มีไฟล์แนบครับ ถ้าจะทำก็ได้แต่เงื่อนไขค่อนข้างซับซ้อนนิดหนึ่ง ตั้งแต่ทำ smf มาไม่เคยใช้ไฟล์แนบเลยครับ เลยไม่รู้จะแก้จะลองกับอะไร

ลิงค์หัวข้อ: http://dexmore.com/topic/1933
Windows XP    Firefox 8.0.1   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
ส่งหัวข้อนี้พิมพ์ หน้า: 1 
กระโดดไป:  

Creative Commons License

SMF Thai Translation Powered by SMF © 2006–2012, Simple Machines LLC

WordPress Google เข้าเยี่ยมชมหน้านี้ล่าสุดเมื่อ : 21 กุมภาพันธ์ 2555, 12:46:49

jQuery Plugin Copyright © 2551-2555 Themes Design & Hosting by DexMoreGroup

Sitemap | Thai Simple Machines Forum support SMF Thai

Web Begining | SMF Modifications | SMF Thai Translation Web Begining

Drupal | WordPress | CMS Joomla | jQuery Plugin | Web Graphics CMS Joomla