Gönderen Konu: İSTEK | SMF Forum - Durum  (Okunma sayısı 3005 defa)

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı tr-servers

  • Yeni Üye
  • *
  • İleti: 1
  • +0/-0
  • Cinsiyet: Bay
    • tr-servesr.com
İSTEK | SMF Forum - Durum
« : 06 Eylül 2016, 09:42:35 »
Merhaba fotoğraftada görüldüğü gibi böyle bir durum eklentisi yapılabilirmi acaba?
[img width=111 height=200]http://i.hizliresim.com/E3ryMn.png[/img]

Çevrimdışı D®agon

  • Ezberletmez Öğretir
  • Administrator
  • Süper Mega üye
  • *******
  • İleti: 11650
  • +524/-0
  • Cinsiyet: Bay
    • Arif Hocam
Ynt: İSTEK | SMF Forum - Durum
« Yanıtla #1 : 06 Eylül 2016, 13:10:43 »
Elbette yapılır. Ancak Foruma kayıt olurken Durum eklemek gerek.
Sonra aşağıdaki son konular modifikasyonu kullanılabilir.
Ama biraz uğraş ister.  hyhvv

[code]global $smcFunc, $scripturl;

$boards = array(20, 21, 22, 23, 24);

$request = $smcFunc['db_query']('', '
  SELECT t.id_topic, m.subject, m.body
  FROM {db_prefix}topics AS t
      INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_first_msg)
  WHERE t.id_board IN ({array_int:boards})
  ORDER BY t.id_topic DESC
        LIMIT {int:limit}',
  array(
    'boards' => $boards,
                'limit' => 15,
  )
);
$topics = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
  $topics[] = array(
      'id_topic' => $row['id_topic'],
      'subject' => $row['subject'],
      'body' => $row['body'],
      'first_image' => preg_match_all('~\[img\]([^\]]+)\[\/img\]~i', $row['body'], $images) ? '<img src="' . $images[1][0] . '" alt="' . $row['subject'] . '" height="50" width="60" />' : '',
  );
$smcFunc['db_free_result']($request);

echo '
<div align="center">
  <table border="1" width="100%" style="border-width: 0px">';
            foreach ($topics as $topic)
    {
echo '
      <tr>
       

        <td style="border-style: none; border-width: medium" align="left" height="auto">
       
        <a href="', $scripturl, '?topic=', $topic['id_topic'], '.0">
<font color=red size=2 ALIGN=Center>', shorten_subject($topic['subject'], 30), '</font></a>

        </td>
      </tr> ';
      }
        echo '
  </table>
</div>';[/code]

 

Voiser