101

Re: Sub Forum Mod and index

Nobody can suggest a solution?

102

Re: Sub Forum Mod and index

I guess no one is willing to devote some time to it at present. So sad because we reached so far with it. sad

103 (edited by Surkow 2007-11-09 21:15)

Re: Sub Forum Mod and index

bingiman wrote:

I guess no one is willing to devote some time to it at present. So sad because we reached so far with it. sad

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.

104 (edited by Surkow 2007-11-18 12:42)

Re: Sub Forum Mod and index

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.

105 (edited by gorsan 2008-10-26 01:35)

Re: Sub Forum Mod and index

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

106

Re: Sub Forum Mod and index

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