J'utilise SDK 1.5 et IBF 2.0.4
J'aimerai que, sur mon site, lorsque les news s'affichent et qu'elles contiennent des images en vignettes, celles ci s'affichent également, comme sur le forum.
Actuellement il s'affiche simplement [attachmentid=418] par exemple
Comment faire ?
Le code utilisé (celui par défaut d'affichage des news)
CODE
function Block_News() {
global $SDK;
if ($news = $SDK->list_forum_topics($GLOBALS['newsforumid'], array("limit" => $GLOBALS['newslimit'], "order" => "desc", "start" => "0", "orderby" => "post_date"))) {
if (count($news)) {
foreach ($news as $i) {
echo '<table width="90%" border="0" cellspacing="0" cellpadding="5" align="center">
<tr><td bgcolor="F5F5F5"><strong>'.$i['title'].'</strong><br /><br />
<span style="font-size:8pt;">'.$i['post'].'</span><br /><br />
Posté par <a href="'.$SDK->board_url.'/index.php?showuser='.$i['author_id'].'">'.$i['author_name'].'</a> à <em>'.$SDK->sdk_date($i['post_date'], "d-m-Y, h:i:s").'</em><br />
Réponses: <strong>'.$i['posts'].'</strong> - Lu: <strong>'.$i['views'].'</strong> - <a href="'.$SDK->board_url.'/http://ipb2.ipbr-fr.com/index.php?showtopic='.$i['tid'].'">Répondre</a></p></td>
</tr></table><br />';
}
}
}
global $SDK;
if ($news = $SDK->list_forum_topics($GLOBALS['newsforumid'], array("limit" => $GLOBALS['newslimit'], "order" => "desc", "start" => "0", "orderby" => "post_date"))) {
if (count($news)) {
foreach ($news as $i) {
echo '<table width="90%" border="0" cellspacing="0" cellpadding="5" align="center">
<tr><td bgcolor="F5F5F5"><strong>'.$i['title'].'</strong><br /><br />
<span style="font-size:8pt;">'.$i['post'].'</span><br /><br />
Posté par <a href="'.$SDK->board_url.'/index.php?showuser='.$i['author_id'].'">'.$i['author_name'].'</a> à <em>'.$SDK->sdk_date($i['post_date'], "d-m-Y, h:i:s").'</em><br />
Réponses: <strong>'.$i['posts'].'</strong> - Lu: <strong>'.$i['views'].'</strong> - <a href="'.$SDK->board_url.'/http://ipb2.ipbr-fr.com/index.php?showtopic='.$i['tid'].'">Répondre</a></p></td>
</tr></table><br />';
}
}
}
EDIT : Quand on écrit les balises à la main, il faut les fermer correctement