J'ai une petite requête à vous soumettre, j'ai installer l'exemple du SDK 1.5 beta 3 intitulé "forumslist.php", il fonctionne nickel bien sûr mais j'aimerais que quand il me liste les forums, qu'au lieu qu'il me pointe vers la version web, qu'il utilise le skin de l'exemple c'est à dire que du texte sans rien.
Je vous mets le code du fichier en question : "forumslist.php"
CODE
<?
/**
* IPB SDK Code Snippet - Forums Listing
* Copyright (C) 2003 Global Centre Scripting
* Designed for IPB SDK 1.0
*
* This script displays a list of forums viewable by the
* currently logged in member.
*
* @author Cow <khlo@global-centre.com>
* @date 21.03.2004
*/
// Load and Start IPB SDK
require_once "./ipbsdk/ipbsdk_class.inc.php";
$SDK =& new IPBSDK();
$forums = $SDK->get_member_readable_forums(); // Get array of readable forums
$categories = array(); // Make blank categories array for later usage
$categorynames = array();
// Cycle through the forums, putting Forum IDs in $categories
foreach ($forums as $i) {
if($i['parent_id'] != "-1")
{
$categories[$i['parent_id']][] = $i['id'];
}
if (!$categorynames[$i['parent_id']]) {
$categorynames[$i['parent_id']] = $i['category_name'];
}
}
// Ok, lets go through the categories displaying it's name, and forums
foreach ($categories as $j => $k) {
echo '<br /><strong>'.$categorynames[$j].'</strong><br />';
foreach ($k as $l) {
if ($forums[$l]['parent_id'] == $j) {
echo '<a href="'.$board_url.'index.php?showforum='.$l.'">'.$forums[$l]['name'].'</a><br />';
}
}
}
?>
/**
* IPB SDK Code Snippet - Forums Listing
* Copyright (C) 2003 Global Centre Scripting
* Designed for IPB SDK 1.0
*
* This script displays a list of forums viewable by the
* currently logged in member.
*
* @author Cow <khlo@global-centre.com>
* @date 21.03.2004
*/
// Load and Start IPB SDK
require_once "./ipbsdk/ipbsdk_class.inc.php";
$SDK =& new IPBSDK();
$forums = $SDK->get_member_readable_forums(); // Get array of readable forums
$categories = array(); // Make blank categories array for later usage
$categorynames = array();
// Cycle through the forums, putting Forum IDs in $categories
foreach ($forums as $i) {
if($i['parent_id'] != "-1")
{
$categories[$i['parent_id']][] = $i['id'];
}
if (!$categorynames[$i['parent_id']]) {
$categorynames[$i['parent_id']] = $i['category_name'];
}
}
// Ok, lets go through the categories displaying it's name, and forums
foreach ($categories as $j => $k) {
echo '<br /><strong>'.$categorynames[$j].'</strong><br />';
foreach ($k as $l) {
if ($forums[$l]['parent_id'] == $j) {
echo '<a href="'.$board_url.'index.php?showforum='.$l.'">'.$forums[$l]['name'].'</a><br />';
}
}
}
?>
J'espère que je me suis bien exprimé, sinon n'hésitez pas à me le faire savoir.
Merci
voici un lien vers le site en question : http://forums.astel.be/forumslist.php