Simple Portal - Yukarıya Kayan Resimli Konular Modifikasyonu

0 Üye ve 2 Ziyaretçi konuyu incelemekte.

Çevrimdışı D®agon

  • Ezberletmez Öğretir
  • *******
  • Join Date: Mar 2008
  • Yer: Ankara
  • 11650
  • +524/-0
  • Cinsiyet: Bay
    • Arif Hocam
[code]global $smcFunc, $scripturl;

$topic_ids = array(2024, 2040, 2049, 2053, 2066, 2058, 1986, 2064, 1847, 2055);

$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_topic IN ({array_int:topics})
  ORDER BY t.id_topic DESC
        LIMIT {int:limit}',
  array(
      'topics' => $topic_ids,
                'limit' => 10,
  )
);
$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="160" width="200" />' : '',
  );
$smcFunc['db_free_result']($request);

echo '
        <center><table>
         
              <td width="100%">
                  <marquee onmouseover="this.stop()" onmouseout="this.start()" width="200" height="380" scrollamount="2" scrolldelay="1" direction="up"  loop="infinite">
                  <center><table>';




foreach ($topics as $topic)
  echo '
                        <il>
                          <a href="', $scripturl, '?topic=', $topic['id_topic'], '.0"><font color=red size=2 ALIGN=Center>',  shorten_subject($topic['subject'], 24), '</font><br />', $topic['first_image'], '<br /><br /></span></a>
                        </il>';
echo '
                     
                    </table></center>
                  </marquee>
              </td>

         
        </table></center>';[/code]