Topic: limit posts
hello all can anyone help me please i have a problem i don`t know how to limit posts in punBB but i don`t know if it`s possible do that if someone know please reply or PM me
Thank YOU
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 troubleshooting → limit posts
hello all can anyone help me please i have a problem i don`t know how to limit posts in punBB but i don`t know if it`s possible do that if someone know please reply or PM me
Thank YOU
Limit posts in what way?
I mean to put a limit of posts on topics , a topic contains 2,000 posts and then be closed automatically
After line 105 on 'viewtopic.php':
$max_posts = 2000;
$postnumber = array_pop($db->fetch_assoc($db->query('SELECT num_replies FROM '.$db->prefix.'topics')));
if($number >= 2000 && intval($cur_topic['closed'])==0)
$db->query('UPDATE '.$db->prefix.'topics SET closed=1 WHERE id=\''.$cur_topic['forum_id'].'\'');
Note: Code not tested.
the code does not work
$max_posts = 2000;
$postnumber = array_pop($db->fetch_assoc($db->query('SELECT num_replies FROM '.$db->prefix.'topics')));
if($postnumber >= 2000 && intval($cur_topic['closed'])==0)
{
$db->query('UPDATE '.$db->prefix.'topics SET closed=1 WHERE id=\''.$id.'\'');
header('Location: '.$pun_config['o_base_url'].'/viewtopic.php?id='.$id);
}
Works now.
PunBB Forums → PunBB 1.2 troubleshooting → limit posts
Powered by PunBB, supported by Informer Technologies, Inc.