SimplePortal
Support => International Support => Turkish (Türkçe) => Topic started by: xakbul on February 25, 2013, 06:56:52 PM
-
(http://c1111.hizliresim.com/r/m/mj04.jpg)
global $smcFunc, $scripturl;
$topic_ids = array(1, 2, 3, 4);
$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 m.subject',
array(
'topics' => $topic_ids,
)
);
$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="100" width="100" />' : '',
);
$smcFunc['db_free_result']($request);
echo '
<table>
<tr>
<td><input type="button" value="«" onclick="document.getElementById(\'images_marquee\').direction = \'left\';" /></td>
<td width="100%">
<marquee id="images_marquee" behavior="scroll" direction="left" scrollamount="8" height="100" width="100%" 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'], '<br /><span></span></a>
</td>';
echo '
</tr>
</table>
</marquee>
</td>
<td><input type="button" value="»" onclick="document.getElementById(\'images_marquee\').direction = \'right\';" /></td>
</tr>
</table>';
php blok açıp kodları ekledim. ama blokta sadece konu başlıkları kayıyor, resimler gözükmüyor. bir eksik mi var ?
-
Kodlarda sıkıntı yok.
$topic_ids = array(1, 2, 3, 4);
satırındaki 1,2,3,4 ile belirtilen konuların içerisinde resim olup olmadığına bakın.
-
evet eklediğim id lere ait konularda resim var..
ama resimler çıkmıyor..?
(http://i1240.photobucket.com/albums/gg488/xakbul/Untitled2-25_zps578ac2e5.jpg)
-
Aynı sıkıntı bende de var . Bir türlü çözemedim
-
Bende hiçbirşey çıkmıyor. İstediğim blok bu lütfen biri bilgi ve yardım verebilir mi?
Ben bu konu ekleyip php bloktan kaydettim. Fakat tüm topik kodlarını yani 1'den 90'a kadar girsem de bir tek konuyu çıkartmadı.
Yardım edebilecek var mı?
-
Bilgisi olan var mı?
-
Konu ID lerini doğru girmiyorsunuzdur.Bir konuya girdiğinizde tarayıcıda ki linkin sonunda o konuya ait ID numarasını görürsünüz.Örneğin bu konunun ID numarası 12389 dur.
-
Ben konu olarak değil de forum ana başlıklarına eklendikçe tüm forum başlıklarında eklenen fotoğrafları göstersin istiyorum. topik değil anlayacağınız.