Help - Search - Member List - Calendar
Full Version: [Traité]Problème avec une fonction
IPBR-FR > Entraide > Forums dédiés aux mods majeures > IPB SDK
chdidi
Bonjour tout le monde j'ai un ptit problème qui selon moi est vraiment petit mais je n'arrive pas a trouver la solution sad.gif
CODE
function Block_News() {
global $SDK;

if ($news = $SDK->list_forum_topics($GLOBALS['newsforumid'], array("limit" => $GLOBALS['newslimit'], "order" => "desc"))) {
 if (count($news)) {
  foreach ($news as $i) {
   echo '<p style="margin: 0px;"><strong>'.$i['title'].'</strong><br /> echo $SDK->get_avatar (); Posté par <a href="'.$SDK->board_url.'?showuser='.$i['author_id'].'">'.$i['author_name'].'</a> at <em>'.$SDK->sdk_date($i['post_date'], "M j Y, h:i A").'</em><br /><span style="font-size:8pt;">'.$i['post'].'</span><br /><br />Commentaires: <strong>'.$i['posts'].'</strong> - Views: <strong>'.$i['views'].'</strong> - <a href="'.$boardurl.'?showtopic='.$info['tid'].'">Faire un commentaire</a></p><hr style="color: #c0c0c0;" />';
  }
 }
}
}
?>


CODE
echo $SDK->get_avatar ();

A mon avi la balise echo étant déjà ouverte on ne peut pas en ouvrir une nouvelle
Fabien
Bonjour,

Le nombre echo n'est pas limité. smile.gif

C'est quoi exactement le problème ?
chdidi
QUOTE(Fabien @ mercredi 18 janvier 2006 à 15:54)
Bonjour,

Le nombre echo n'est pas limité. smile.gif

C'est quoi exactement le problème ?
*



Merci de ta réponse Fabien et bien en faite regarde : http://loiclinux.homelinux.org/chdidi/basicportal.php

Comme tu peux le voir la fonction ne démare pas alors qu'elle devrait à l'endroit ou je l'ai placé sad.gif



merci a++ wink.gif
Fantome
Essaye avec ça
CODE
function Block_News() {
global $SDK;

if ($news = $SDK->list_forum_topics($GLOBALS['newsforumid'], array("limit" => $GLOBALS['newslimit'], "order" => "desc"))) {
if (count($news)) {
 foreach ($news as $i) {
  echo '<p style="margin: 0px;"><strong>'.$i['title'].'</strong><br /> '.$SDK->get_avatar ().' Posté par <a href="'.$SDK->board_url.'?showuser='.$i['author_id'].'">'.$i['author_name'].'</a> at <em>'.$SDK->sdk_date($i['post_date'], "M j Y, h:i A").'</em><br /><span style="font-size:8pt;">'.$i['post'].'</span><br /><br />Commentaires: <strong>'.$i['posts'].'</strong> - Views: <strong>'.$i['views'].'</strong> - <a href="'.$boardurl.'?showtopic='.$info['tid'].'">Faire un commentaire</a></p><hr style="color: #c0c0c0;" />';
 }
}
}
}
?>
chdidi
Merci Fantôme ca marche du tonnere en revanche sais-tu comment je pourais faire pour que ce soit l'avatar du poster qui s'affiche ? smile.gif

d'avance merci ! wink.gif
PQS: si je trouve la soluce tout seul je vous le fait savoir wink.gif
Fantome
Comme ça
CODE
function Block_News() {
global $SDK;

if ($news = $SDK->list_forum_topics($GLOBALS['newsforumid'], array("limit" => $GLOBALS['newslimit'], "order" => "desc"))) {
if (count($news)) {
 foreach ($news as $i) {
  echo '<p style="margin: 0px;"><strong>'.$i['title'].'</strong><br /> '.$SDK->get_avatar ($i['author_id']).' Posté par <a href="'.$SDK->board_url.'?showuser='.$i['author_id'].'">'.$i['author_name'].'</a> at <em>'.$SDK->sdk_date($i['post_date'], "M j Y, h:i A").'</em><br /><span style="font-size:8pt;">'.$i['post'].'</span><br /><br />Commentaires: <strong>'.$i['posts'].'</strong> - Views: <strong>'.$i['views'].'</strong> - <a href="'.$boardurl.'?showtopic='.$info['tid'].'">Faire un commentaire</a></p><hr style="color: #c0c0c0;" />';
 }
}
}
}
?>
chdidi
Merci Fantôme c'est génial !
J'avais pas eu le temps de me pencher sur le sujet car j'étais penché sur mes spagetty ! tongue.gif



a++ wink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.