Les archives de FluxBB.fr
Vous n'êtes pas identifié(e).
Pages : 1
j'ai besoin d'aide je viens d'installer le mod quotat s'en probleme
mes voila le code que vous donner pour le top 10 ne fonctionne pas comment pourai-je faire pour me le procurer merci
Hors ligne
Déplacé vers Entraide.
Merci de mettre un titre plus explicite la prochaine fois.
(s) MT
ex-Apupv
:faq: :recherche:
Gra.
Hors ligne
pour le top 10 il faut faire une include.
sur lindex.php cherche ce code
define('PUN_ROOT', './');
require PUN_ROOT.'include/common.php';
if ($pun_user['g_read_board'] == '0')
message($lang_common['No view']);
// Load the index.php language file
require PUN_ROOT.'lang/'.$pun_user['language'].'/index.php';
$page_title = pun_htmlspecialchars($pun_config['o_board_title']);
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';
$sql = 'SELECT sf.id, sf.forum_name, f.id FROM '.$db->prefix.'forums AS sf LEFT JOIN '.$db->prefix.'forums AS f ON sf.parent_forum_id = f.id WHERE sf.parent_forum_id <> 0 ORDER BY sf.disp_position';
$res_ssforum = $db->query($sql, true) or error('Impossible de retrouver la liste des sous forums', __FILE__, __LINE__, $db->error());
$i = 0;
while ($cur_sous_forum = $db->fetch_row($res_ssforum))
{
$tab_sous_forums[$i] = $cur_sous_forum;
$i++;
}juste en dessous met ce code
include('stats.php');sur le ftp a la racine met ce fichier
stats.php
et dedant met sa
<?php
$ak_limit = 10;
?>
<div id="announce" class="blocktable">
<h2><span><b>Top 10</b></span></h2>
<div class="box">
<div class="inbox">
<table cellspacing="0">
<thead>
<tr>
<th scope="col" width="70"><?php echo "Top 10 Uploadeurs" ?></th>
<th scope="col" width="60"><?php echo "Taille en Mo" ?></th>
<th scope="col" width="70"><?php echo "Top 10 Posteurs" ?></th>
<th scope="col" width="60"><?php echo "Nombre de posts" ?></th>
<th class="tc1" scope="col"><?php echo "10 Derniers Posts" ?></th>
</tr>
</thead>
<td class="tc10">
<?php
$result = $db->query('SELECT u.id, u.username, u.group_id, u.total_up, g.g_id, g.g_color FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id>1 ORDER BY u.total_up DESC, u.username LIMIT '.$ak_limit) or error('Unable to fetch user data', __FILE__, __LINE__, $db->error());
while ($data = $db->fetch_assoc($result))
{
echo "\t\t\t\t\t\t".'<a href="profile.php?id='.$data['id'].'"><span style="color:'.$data['g_color'].'">'.pun_htmlspecialchars($data['username']).'</span></a><br>'."\n";
}
?>
</td>
<td class="tc10">
<?php
$result = $db->query('SELECT id, total_up FROM '.$db->prefix.'users WHERE id>1 ORDER BY total_up DESC, total_up LIMIT '.$ak_limit) or error('Unable to fetch user data', __FILE__, __LINE__, $db->error());
while ($data2 = $db->fetch_assoc($result))
{
echo "\t\t\t\t\t\t".$data2['total_up'].'<br>'."\n";
}
?>
</td>
<td class="tc10">
<?php
$result = $db->query('SELECT u.id, u.username, u.group_id, u.num_posts, g.g_id, g.g_color FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id WHERE u.id>1 ORDER BY u.num_posts DESC, u.username LIMIT '.$ak_limit) or error('Unable to fetch user data', __FILE__, __LINE__, $db->error());
while ($data = $db->fetch_assoc($result))
{
echo "\t\t\t\t\t\t".'<a href="profile.php?id='.$data['id'].'"><span style="color:'.$data['g_color'].'">'.pun_htmlspecialchars($data['username']).'</span></a><br>'."\n";
}
?>
</td>
<td class="tc10">
<?php
$result = $db->query('SELECT id, username, num_posts FROM '.$db->prefix.'users WHERE id>1 ORDER BY num_posts DESC, username LIMIT '.$ak_limit) or error('Unable to fetch user data', __FILE__, __LINE__, $db->error());
while ($data = $db->fetch_assoc($result))
{
echo "\t\t\t\t\t\t".$data['num_posts'].'<br>'."\n";
}
?>
</td>
<td class="tc1">
<?php
$result = $db->query('SELECT t.* FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE (fp.read_forum IS NULL OR fp.read_forum=1) ORDER BY t.last_post DESC LIMIT '.$ak_limit) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());
require PUN_ROOT.'lang/'.$pun_user['language'].'/forum.php';
?>
<table cellspacing="0">
<tbody>
<?php
if ($db->num_rows($result))
{
while ($cur_topic = $db->fetch_assoc($result))
{
if ($cur_topic['moved_to'] == null)
$last_post = '<a href="viewtopic.php?pid='.$cur_topic['last_post_id'].'#p'.$cur_topic['last_post_id'].'">'.format_time($cur_topic['last_post']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['last_poster']).'</span>';
else
$last_post = ' ';
if ($pun_config['o_censoring'] == '1')
$cur_topic['subject'] = censor_words($cur_topic['subject']);
if ($cur_topic['moved_to'] != 0)
$subject = $lang_forum['Moved'].': <a href="viewtopic.php?id='.$cur_topic['moved_to'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
else if ($cur_topic['closed'] == '0')
$subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
else
{
$subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
}
if (!$pun_user['is_guest'] && $cur_topic['last_post'] > $pun_user['last_visit'] && $cur_topic['moved_to'] == null)
{
$subject = '<strong>'.$subject.'</strong>';
$subject_new_posts = '<span class="newtext">[ <a href="viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.$lang_common['New posts info'].'">'.$lang_common['New posts'].'</a> ]</span>';
}
else
$subject_new_posts = null;
?>
<table>
<?php echo "\t\t\t\t\t\t".$subject."\n\n"; ?>
</table>
<?php
}
}
else
{
?>
<table>
<?php echo $lang_forum['Empty forum'] ?></td>
</table>
<?php
}
?>
</table>
</tbody>
</td>
</table>
</div>
</div>
</div>tu valide tout et voila
Hors ligne
merci a toi mes je ne parvin pas a l'inserre
Edit: Suppression du code pour alléger la BDD, le fichier est dans le message suivant
Dernière modification par yemgi (25-10-2007 19:39:14)
Hors ligne
Je te conseille de mettre ton fichier sur PunBB Upload au lieu de le coller comme ça 
Hors ligne
Hors ligne
trouve sa dans lindex.php
// Print the categories and forumset met le code include au dessus
et si tu as un soucie jai mons hotmail dans mon profil
Dernière modification par sob (25-10-2007 12:14:49)
Hors ligne
Pages : 1