ไฟล์  sourcedir/MessageIndex.phpค้นหา
// Grab the appropriate topic information...
   if (!$pre_query || !empty($topic_ids))
วางไว้หลังค้นหา
   // 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
ค้นหา
ORDER BY " . ($pre_query ? "FIND_IN_SET(t.ID_TOPIC, '" . implode(',', $topic_ids) . "')" : (!empty($modSettings['enableStickyTopics']) ? 'isSticky' . ($fake_ascending ? '' : ' DESC') . ', ' : '') . $_REQUEST['sort'] . ($ascending ? '' : ' DESC')) . "
วางทับที่ค้นหา
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')) . "
ค้นหา
LEFT(ml.body, 384) AS lastBody, LEFT(mf.body, 384) AS firstBody, ml.smileysEnabled AS lastSmileys,
            mf.smileysEnabled AS firstSmileys
วางไว้หลังค้นหา
, 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
ค้นหา
FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS ml, {$db_prefix}messages AS mf)
วางไว้หลังค้นหา
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)
ค้นหา
// Begin 'printing' the message index for current board.
      while ($row = mysql_fetch_assoc($result))
      {
         if ($row['ID_POLL'] > 0 && $modSettings['pollMode'] == '0')
            continue;
วางไว้หลังค้นหา
// Thumbnail Topic 
         if ($row['thnId'] != 0)
         {
            $image = array(
               'id' => $row['thnId'],
               'url' => $scripturl . '?action=dlattach;topic=' . $row['ID_TOPIC'] . '.0;attach=' . $row['thnId'] . ';image',
               'link' => $scripturl . '?action=dlattach;topic=' . $row['ID_TOPIC'] . '.0;attach=' . $row['bigId'] . ';image',
               'filename' => $row['thnFilename'],
               'width' => $row['thnWidth'],
               'height' => $row['thnHeight']
            );
            $context['show_thumbnails'] = true;
         }
         elseif ($row['bigId'] != 0 && $row['bigWidth'] > 0 && $row['bigHeight'] > 0)
         {
            $image = array(
               'id' => $row['bigId'],
               'url' => $scripturl . '?action=dlattach;topic=' . $row['ID_TOPIC'] . '.0;attach=' . $row['bigId'] . ';image',
               'link' => $scripturl . '?action=dlattach;topic=' . $row['ID_TOPIC'] . '.0;attach=' . $row['bigId'] . ';image',
               'filename' => $row['bigFilename'],
               'width' => $row['bigWidth'],
               'height' => $row['bigHeight']
            );
            $context['show_thumbnails'] = true;
         }
         else
            $image = array();
         if (isset($context['topics'][$row['ID_TOPIC']]))
         {
            $context['topics'][$row['ID_TOPIC']]['image'][] = $image;
            continue;
         }         
         // End Thumbnail Topic Mod
ค้นหา
// 'Print' the topic info.
         $context['topics'][$row['ID_TOPIC']] = array(
            'id' => $row['ID_TOPIC'],
วางไว้หลังค้นหา
'image' => array($image),
ไฟล์  themedir/MessageIndex.template.phpค้นหา
<td width="9%" colspan="2" class="catbg3"></td>
วางทับที่ค้นหา
<td width="9%" colspan="', $context['show_thumbnails'] ? 3 : 2, '" class="catbg3"></td>
ค้นหา
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>
วางทับที่ค้นหา
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 '
อ้างที่มา... You are not allowed to view links.
 
Register or 
Loginตัวอย่างไฟล์แนบนี้   เป็นธีมดีฟอลด์ ติดตั้งธรรมดา แสดงในทันที