j'essaye de modifier un script de news dans le cadre d'une integration de ipb dans un site.
Le script de news marche a merveille, et je cherche a le modifier pour qu'il affiche le sondage comme une news.
J'ai presque réussi, j'ai le titre du sondage qui s'affiche, le lien du titre pointe vers le topic du sondage, les commentaire aussi, mais pour avoir le contenu du sondage (pour cocher son choix) je n'y arrive pas.
Voici le code a modifier (avec les modifications que j'ai deja apportés :
CODE
mysql_connect ($dbhost, $dbusername, $dbpassword);
mysql_select_db ($dbname);
$topics = mysql_query ("select* from ibf_topics where forum_id=".$forumid." order by start_date desc");
for ($i=0; $i <$posts; $i++)
{
$topicrow = mysql_fetch_array($topics);
$titleid = $topicrow["tid"];
$topictitle = ($topicrow["title"]);
$replies = $topicrow["posts"];
$postq = mysql_query ("SELECT * FROM `ibf_posts` where topic_id = ".$titleid." order by post_date");
$postfetch = mysql_fetch_array($postq);
$post = $postfetch["post"];
$authorid = $postfetch["author_id"];
$unixdate = $topicrow["start_date"];
$date = date("j/m/Y",$unixdate);
$author = $topicrow["starter_name"];
$post = str_replace('<#EMO_DIR#>', $emoticons, $post);
$post = str_replace('<#IMG_DIR#>', $img_dir, $post);
mysql_select_db ($dbname);
$topics = mysql_query ("select* from ibf_topics where forum_id=".$forumid." order by start_date desc");
for ($i=0; $i <$posts; $i++)
{
$topicrow = mysql_fetch_array($topics);
$titleid = $topicrow["tid"];
$topictitle = ($topicrow["title"]);
$replies = $topicrow["posts"];
$postq = mysql_query ("SELECT * FROM `ibf_posts` where topic_id = ".$titleid." order by post_date");
$postfetch = mysql_fetch_array($postq);
$post = $postfetch["post"];
$authorid = $postfetch["author_id"];
$unixdate = $topicrow["start_date"];
$date = date("j/m/Y",$unixdate);
$author = $topicrow["starter_name"];
$post = str_replace('<#EMO_DIR#>', $emoticons, $post);
$post = str_replace('<#IMG_DIR#>', $img_dir, $post);
Merci de votre aide