Les archives de FluxBB.fr
Vous n'êtes pas identifié(e).
Bonjour,
j'utilise "Last Topics mod by adaur", et j'aimerais que les topics de la section présentations ne s'affichent pas.
Comment faire ? J'ai regardé dans le last-topics.php :
<?php
//
// Last Topics mod by adaur
//
// Make sure no one attempts to run this script "directly"... it would be bad
if (!defined('PUN'))
exit;
// Load the viewforum.php language file
if (file_exists(PUN_ROOT.'lang/'.$pun_user['language'].'/forum.php'))
require PUN_ROOT.'lang/'.$pun_user['language'].'/forum.php';
else
require PUN_ROOT.'lang/English/forum.php';
$show = isset($show) ? $show : NULL;
if ($show < '1' || $show > '50' || $show == '') $show = '5'; // Don't mess up with the numbers :P
if ($pun_user['g_id'] == PUN_ADMIN)
{
$result = $db->query('SELECT t.id, t.poster, t.subject, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_replies, t.num_views, t.moved_to, t.forum_id, u.id AS uid, g.g_color 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=3) LEFT JOIN '.$db->prefix.'users AS u ON u.username = t.last_poster LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id = u.group_id WHERE t.moved_to IS NULL AND t.id !=56 ORDER BY t.last_post DESC LIMIT '.$show) or error('Unable to get the admin\'s topic list', __FILE__, __LINE__, $db->error());
}
elseif ($pun_user['is_guest'])
{
$result = $db->query('SELECT t.id, t.poster, t.subject, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_replies, t.num_views, t.moved_to, t.forum_id, u.id AS uid, g.g_color 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=3) LEFT JOIN '.$db->prefix.'users AS u ON u.username = t.last_poster LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id = u.group_id WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.moved_to IS NULL AND t.id !=56 ORDER BY t.last_post DESC LIMIT '.$show) or error('Unable to get the guest\'s topic list', __FILE__, __LINE__, $db->error());
}
else
{
$result = $db->query('SELECT t.id, t.poster, t.subject, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_replies, t.num_views, t.moved_to, t.forum_id, u.id AS uid, g.g_color 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'].') LEFT JOIN '.$db->prefix.'users AS u ON u.username = t.last_poster LEFT JOIN '.$db->prefix.'groups AS g ON g.g_id = u.group_id WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.moved_to IS NULL AND t.id !=56 ORDER BY t.last_post DESC LIMIT '.$show) or error('Unable to get the member\'s topic list', __FILE__, __LINE__, $db->error());
}
?>
<div id="idx1" class="blocktable">
<h2><span><?php echo $lang_common['Last topics'] ?></span></h2>
<div class="box">
<div class="inbox">
<table cellspacing="0">
<thead>
<tr>
<th class="tcl" scope="col"><?php echo $lang_common['Topic']; ?></th>
<th class="tc2" scope="col"><?php echo $lang_common['auteur']; ?></th>
<th class="tc3" scope="col"><?php echo $lang_common['Replies'] ?></th>
<?php if ($pun_config['o_topic_views'] == '1'): ?> <th class="tc4" scope="col"><?php echo $lang_forum['Views'] ?></th> <?php endif; ?>
<th class="tcr" scope="col"><?php echo $lang_common['Last post'] ?><span class="reduire"></span><span class="agrandir"></span></th>
</tr>
</thead>
<tbody class="ajax_index">
<?php
while ($cur_topic = $db->fetch_assoc($result)) {
if ($pun_config['o_censoring'] == '1')
$cur_topic['subject'] = censor_words($cur_topic['subject']);
$date = format_time($cur_topic['posted']);
$subject_ini = htmlspecialchars($cur_topic['subject']);
$subject = '<a href="'.makeurl("topic-", $cur_topic['id'], $cur_topic['subject']).'">'.balises(htmlspecialchars($cur_topic['subject'])).'</a>';
if (!$pun_user['is_guest'])
{
$tracked_topics = get_tracked_topics();
}
if (!$pun_user['is_guest'] && $cur_topic['last_post'] > $pun_user['last_visit'] && (!isset($tracked_topics['topics'][$cur_topic['id']]) || $tracked_topics['topics'][$cur_topic['id']] < $cur_topic['last_post']) && (!isset($tracked_topics['forums'][$cur_topic['forum_id']]) || $tracked_topics['forums'][$cur_topic['forum_id']] < $cur_topic['last_post']) && $cur_topic['moved_to'] == null)
{
$item_status = ' inew';
$icon_type = 'icon icon-new';
$subject = '<strong>'.$subject.'</strong>';
}
else
{
$item_status = '';
$icon_type = 'icon';
}
$sql = $db->query('SELECT u.id, g.g_color FROM '.$db->prefix.'users AS u LEFT JOIN '.$db->prefix.'groups AS g on u.group_id = g.g_id WHERE u.username = "'.$cur_topic['poster'].'"');
$poster = $db->fetch_assoc($sql);
$auteur = '<a href="profile.php?id='.$poster['id'].'"><span style="color:'.$poster['g_color'].'">'.pun_htmlspecialchars($cur_topic['poster']).'</span></a>';
?>
<tr<?php if ($item_status != '') echo ' class="'.trim($item_status).'"'; ?>>
<td class="tcl">
<div class="intd">
<div class="<?php echo $icon_type ?>"><div class="nosize"></div></div>
<div class="tclcon">
<?php echo $subject."\n\t\t" ?>
</div>
</div>
</td>
<td class="tc2"><?php echo $auteur ; ?></td>
<td class="tc3"><?php echo $cur_topic['num_replies'] ?></td>
<?php if ($pun_config['o_topic_views'] == '1'): ?> <td class="tc4"><?php echo $cur_topic['num_views'] ?></td> <?php endif; ?>
<td class="tcr"><?php echo '<a href="message-'.$cur_topic['last_post_id'].'.html#p'.$cur_topic['last_post_id'].'">'.format_time($cur_topic['last_post']).'</a> <span class="byuser">'.$lang_common['by'].'<a href="profile.php?id='.$cur_topic['uid'].'"><span style="color:'.$cur_topic['g_color'].'"> '.pun_htmlspecialchars($cur_topic['last_poster']).'</span></a></span>'; ?></td>
</tr>
<?php
} // That's all folks!
?>
</tbody></table></div></div></div>Je ne sais pas du tout :s
merci d'avance
Hors ligne
UP
Hors ligne