Re: Sub Forum Mod and index
Nobody can suggest a solution?
You are not logged in. Please login or register.
PunBB Forums → General discussion → Sub Forum Mod and index
Nobody can suggest a solution?
I guess no one is willing to devote some time to it at present. So sad because we reached so far with it.
I guess no one is willing to devote some time to it at present. So sad because we reached so far with it.
Perhaps most people don't know where to start to help us. The only thing that has to be done is to install punbb, the subforums and mark forums as read mod. The problem is that someone needs to help us with creating a query that reads out if there are new posts in the subforums so it can be displayed on the index.php page.
Someone helped me to solve the problem. Here is the code from what I had to change:
//////////////////// REPLACE : ///////////////
if (!empty($sfdb))
{
foreach ($sfdb as $sub_forums)
{
if ($cur_forum['fid'] == $sub_forums[0] && !$pun_user['is_guest'] && forum_is_new($cur_forum['fid'], $cur_forum['last_post']))
{
$item_status = 'inew';
$icon_text = $lang_common['New icon'];
$icon_type = 'icon inew';
}
}
}
//////////////////// WITH: ///////////////
if (!empty($sfdb)) {
foreach ($sfdb as $sub_forums) {
if (!$pun_user['is_guest']) {
if ($cur_forum['fid'] == $sub_forums[0]) {
if (forum_is_new($cur_forum['fid'], $cur_forum['last_post']) || forum_is_new($sub_forums[6], $sub_forums[5])) {
$item_status = 'inew';
$icon_text = $lang_common['New icon'];
$icon_type = 'icon inew';
}
}
}
}
}
If anyone is interested in can send my index.php file.
merging subforum with "last post on forum index" is
very heavy work for punBB
index.php execute times get bigger each day while your forum gets bigger
which makes punbb impossible to work with
this is the part that makes heavy load
$result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.redirect_url, f.moderators, f.num_topics, f.num_posts, .....
the load comes from last posts if anyone can optimize it
it will be usefull
i found the solution
subforum do not do any load
if you also apply this mod on it (thats if you can)
http://www.punres.org/viewtopic.php?pid=24988#p24988
note:the instructions on wiki page "last topic on index" makes a heavy load
PunBB Forums → General discussion → Sub Forum Mod and index
Powered by PunBB, supported by Informer Technologies, Inc.