Help - Search - Member List - Calendar
Full Version: Intégration sondage dans site
IPBR-FR > Entraide > Forums dédiés aux mods majeures > IPB SDK
Ukoback
Bonjour,

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);


Merci de votre aide smile.gif
Fabien
C'est plus compliqué que ça un sondage. Les informations sur le sondage sont stockées dans ibf_polls.
Fantome
Va voir la doc sur le sdk. http://www.ipbr-fr.com/contributions/SDK/d..._poll_info.html

PS: sympa l'interface de ton site wink.gif
Ukoback
Merci fantome smile.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.