SimplePortal

Support => Turkish (Türkçe) => International Support => Ki?iselle?tirme => Topic started by: mkuru on July 28, 2012, 09:57:06 AM

Title: Kayan Resimler Kodu
Post by: mkuru on July 28, 2012, 09:57:06 AM
Code: [Select]
global $smcFunc, $scripturl;

$boards = array(49);

$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' => 5,
)
);
$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="180" />' : '',
);
$smcFunc['db_free_result']($request);

echo '
<table>
<tr>

<td width="100%">
<marquee id="images_marquee" behavior="scroll" direction="left" scrollamount="4"  height="165" width="180" onmouseover="this.stop();" onmouseout="this.start();">
<table>
<tr>';
foreach ($topics as $topic)
echo '
<td>
<a href="', $scripturl, '?topic=', $topic['id_topic'], '.0">', $topic['first_image'], '</a>

</td>';
echo '
</tr>
</table>
</marquee>
</td>

</tr>
</table>';

Arkadaşlar yukarıdaki kod ile 49 numaralı bölümden son 5 konuya ait resimleri sağ veya sol bloklarda kayan resimler şeklinde blok oluşturdum. Kod internet explorer ve mozilla tarayıcılarında sorunsuz çalışmasına rağmen Chorome taratıcısında 2. resimde tekrar başa dönüyor. Bunun bir çözümü bulunabilir mi?
SimplePortal 2.3.8 © 2008-2024, SimplePortal