SimplePortal

Support => International Support => Turkish (Türkçe) => Topic started by: tazmaniac on February 15, 2014, 04:05:03 AM

Title: resimlerde img tagı dışındakileri de çekebilmek
Post by: tazmaniac on February 15, 2014, 04:05:03 AM
merhaba resimleri blokta göstermek için aşağıdaki kodu kullanıyorum fakat link olarak ekelenen resimler dışında eklenti olarak eklenen resimleri bir türlü gösteremiyorum.bunun için eklenebilecek kodlar var mıdır?

Code: [Select]
global $smcFunc, $scripturl;

$boards = array(48);

$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 m.subject',
array(
'boards' => $boards,
)
);
$topics = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
$topics[] = array(
'id_topic' => $row['id_topic'],

'first_image' => preg_match_all('~\[img\]([^\]]+)\[\/img\]~i',$row['body'], $images) ? '<img src="' . $images[1][0] . '" alt="' . $row['subject'] . '" height="200"  />' : '',
);
$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="6"  height="200" 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>', $topic['subject'], '</span></a>
</td>';
echo '
</tr>
</table>
</marquee>
</td>
<td><input type="button" value="»" onclick="document.getElementById(\'images_marquee\').direction = \'right\';" /></td>
</tr>
</table>';
Title: Re: resimlerde img tagı dışındakileri de çekebilmek
Post by: streetfire on May 28, 2015, 05:11:53 AM
İşte bende bunu istiyorum. Bir de topikleri değil de açtığım forum konularına otomatik olarak eklenen topik konularını ben topik no girmeden resim eklemişse siteye dosya ekleden bu bulokta göstersin istiyorum.
Title: Re: resimlerde img tagı dışındakileri de çekebilmek
Post by: streetfire on June 12, 2015, 10:58:40 AM
Haydi arkadaşlar bir destek yapın :) Fotoğrafları konulara tapik olarak ekli açanların fotoğrafları konu başlıklı olarak açılsın istiyorum...
SimplePortal 2.3.8 © 2008-2024, SimplePortal