7,101

(13 replies, posted in PunBB 1.2 troubleshooting)

Erm, if you can, disable it first and see if that helps?

I think Rickard said it the best smile

The Clear Cache plugin can be used to clear and reset the different PunBB caches if you are uncomfortable with or unable to manually edit the files in the cache directory.

Not useful in most cases, but if you manually change something in the database (and can login as an admin) and want the cache to reflect it, you can refresh it with this smile

Download it here

7,103

(17 replies, posted in News)

I'm just browsing the URL link you gave in my browser smile

Yes.
Nice catch smile

7,105

(17 replies, posted in News)

Working fine for me...

7,106

(7 replies, posted in Feature requests)

Mmm, I thinkthe easiest way might be to add a column to the forums table "last_subject" (should be a VARCHAR(255))

Then
FIND

//
// Update posts, topics, last_post, last_post_id and last_poster for a forum (redirect topics are not included)
//
function update_forum($forum_id)
{
    global $db;

    $result = $db->query('SELECT COUNT(id), SUM(num_replies) FROM '.$db->prefix.'topics WHERE moved_to IS NULL AND forum_id='.$forum_id) or error('Unable to fetch forum topic count', __FILE__, __LINE__, $db->error());
    list($num_topics, $num_posts) = $db->fetch_row($result);

    $num_posts = $num_posts + $num_topics;        // $num_posts is only the sum of all replies (we have to add the topic posts)

    $result = $db->query('SELECT last_post, last_post_id, last_poster FROM '.$db->prefix.'topics WHERE forum_id='.$forum_id.' AND moved_to IS NULL ORDER BY last_post DESC LIMIT 1') or error('Unable to fetch last_post/last_post_id/last_poster', __FILE__, __LINE__, $db->error());
    if ($db->num_rows($result))        // There are topics in the forum
    {
        list($last_post, $last_post_id, $last_poster) = $db->fetch_row($result);

        $db->query('UPDATE '.$db->prefix.'forums SET num_topics='.$num_topics.', num_posts='.$num_posts.', last_post='.$last_post.', last_post_id='.$last_post_id.', last_poster=\''.$db->escape($last_poster).'\' WHERE id='.$forum_id) or error('Unable to update last_post/last_post_id/last_poster', __FILE__, __LINE__, $db->error());
    }
    else    // There are no topics
        $db->query('UPDATE '.$db->prefix.'forums SET num_topics=0, num_posts=0, last_post=NULL, last_post_id=NULL, last_poster=NULL WHERE id='.$forum_id) or error('Unable to update last_post/last_post_id/last_poster', __FILE__, __LINE__, $db->error());
}

REPLACE WITH

//
// Update posts, topics, last_post, last_post_id, last_subject and last_poster for a forum (redirect topics are not included)
//
function update_forum($forum_id)
{
    global $db;

    $result = $db->query('SELECT COUNT(id), SUM(num_replies) FROM '.$db->prefix.'topics WHERE moved_to IS NULL AND forum_id='.$forum_id) or error('Unable to fetch forum topic count', __FILE__, __LINE__, $db->error());
    list($num_topics, $num_posts) = $db->fetch_row($result);

    $num_posts = $num_posts + $num_topics;        // $num_posts is only the sum of all replies (we have to add the topic posts)

    $result = $db->query('SELECT last_post, last_post_id, last_poster, subject FROM '.$db->prefix.'topics WHERE forum_id='.$forum_id.' AND moved_to IS NULL ORDER BY last_post DESC LIMIT 1') or error('Unable to fetch last_post/last_post_id/last_poster', __FILE__, __LINE__, $db->error());
    if ($db->num_rows($result))        // There are topics in the forum
    {
        list($last_post, $last_post_id, $last_poster, $last_subject) = $db->fetch_row($result);

        $db->query('UPDATE '.$db->prefix.'forums SET num_topics='.$num_topics.', num_posts='.$num_posts.', last_post='.$last_post.', last_post_id='.$last_post_id.', last_poster=\''.$db->escape($last_poster).'\', last_subject = \''.$db->escape($last_subject).'\' WHERE id='.$forum_id) or error('Unable to update last_post/last_post_id/last_poster', __FILE__, __LINE__, $db->error());
    }
    else    // There are no topics
        $db->query('UPDATE '.$db->prefix.'forums SET num_topics=0, num_posts=0, last_post=NULL, last_post_id=NULL, last_poster=NULL WHERE id='.$forum_id) or error('Unable to update last_post/last_post_id/last_poster', __FILE__, __LINE__, $db->error());
}

And then edit index.php like so:
FIND

$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, f.last_post, f.last_post_id, f.last_poster FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_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 c.disp_position, c.id, f.disp_position', true) or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());

REPLACE WITH

$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, f.last_post, f.last_post_id, f.last_poster f.last_subject FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_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 c.disp_position, c.id, f.disp_position', true) or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());

FIND

if ($cur_forum['last_post'] != '')
        $last_post = '<a href="viewtopic.php?pid='.$cur_forum['last_post_id'].'#p'.$cur_forum['last_post_id'].'">'.format_time($cur_forum['last_post']).'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_forum['last_poster']).'</span>';

REPLACE WITH

if ($cur_forum['last_post'] != '')
        $last_post = '<a href="viewtopic.php?pid='.$cur_forum['last_post_id'].'#p'.$cur_forum['last_post_id'].'">'.$cur_forum['last_subject'].'</a> <span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_forum['last_poster']).' at '.format_time($cur_forum['last_post']).'</span>';

Completely untested, tell me if it works right smile

7,107

(13 replies, posted in PunBB 1.2 troubleshooting)

I have no idea what it should be configured to, I just am pretty sure it causes issues smile

7,108

(20 replies, posted in Feature requests)

Ugh tongue

I know there's more then one, but I wanted you to look at the context and see where it was. It's rather obvious (this is the edited code)

            // If it's a search for posts by a specific user ID
            else if ($action == 'show_user')
            {
                $result = $db->query('SELECT t.id FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id 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) AND p.poster_id='.$user_id.'') or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());
                $num_hits = $db->num_rows($result);

                if (!$num_hits)
                    message($lang_search['No user posts']);
            }

7,109

(20 replies, posted in Feature requests)

No, there isn't. I'm talking about the SQL query for the search we're doing. It's in the code, up from where you were editing before. If you need me to check, I will.

7,110

(4 replies, posted in PunBB 1.2 bug reports)

rofl, I just reproduced it tongue
I was hitting the wrong button hmm

7,111

(20 replies, posted in Feature requests)

OK, just remove the GROUP BY statement to make it actually display all the posts.

7,112

(20 replies, posted in Feature requests)

The query doesn't do that for me, although it doesn't fetch all my posts either.
Go play with the query, or I can try when I get home

Elrond wrote:
Smartys wrote:

And subscriptions are already able to be set by the admins

Huh, stupid question: Where?

I mean if subscriptions are enabled or not

Connorhd wrote:

but it works on 1.2.5 http://punres.org/viewtopic.php?id=288

And no one else pointed this out to me why? tongue

7,115

(4 replies, posted in PunBB 1.2 bug reports)

I can't replicate that in a clean 1.2.5...

7,116

(10 replies, posted in General discussion)

lol, I don't think he did anything? tongue

7,117

(20 replies, posted in Feature requests)

OK smile

7,118

(20 replies, posted in Feature requests)

How so? It doesn't mess it up for me on a clean board...

7,119

(20 replies, posted in Feature requests)

FIND

            // We want to sort things after last post
            $sort_by = 4;

            $search_ids = array();
            while ($row = $db->fetch_row($result))
                $search_ids[] = $row[0];

            $db->free_result($result);

            $show_as = 'topics';

REPLACE WITH

            // We want to sort things after last post
            $sort_by = 4;

            $search_ids = array();
            while ($row = $db->fetch_row($result))
                $search_ids[] = $row[0];

            $db->free_result($result);
            
            if ($action == 'show_user')
                $show_as = 'posts';
            else
                $show_as = 'topics';

And I've created a plugin to do it for you smile

in the cache folder
delete all the .php files

Edit: Ooh, idea for a plugin smile

7,122

(26 replies, posted in PunBB 1.2 discussion)

http://dev.punbb.org/roadmap
Permission Denied

This action requires ROADMAP_VIEW permission.

tongue

No, there isn't one. Rickard might create one for 1.3 at some point *hint hint* but for bugfixes it's probably best to just have him note them tongue

Mmm, don't mind me then if I don't convert the digest mod to 1.2.5 (I hate trying to convert the HTML! tongue)

Odd, did you check the Userlist and find no accounts (I think passwords have to be changed when coverting from VB3, not sure)?
As for the forums, did you have them in a category? If not, read a couple posts up for someone who had the same issue

7,125

(67 replies, posted in News)

This is the only time Rickard has done this as far as I know wink
And given the amount of stuff fixed, I can't see 1.2.6 being all that far off