276

(7 replies, posted in PunBB 1.2 troubleshooting)

Offhand, I think you would just to have to remove some if statements (and the menu, of course)? Then you might also want to change some styles?

Thought I saw this somewhere? I was just integrating a page and had this problem?

The header.php file and the `generate_navlinks()` function assumes all files are in the PunBB folder. For the style link, I added `PUN_ROOT` to the URL; For the navlinks, I added this:

'.$pun_config['o_base_url'].'/

Edit: I saw that this is fixed in v1.3. smile

278

(9 replies, posted in PunBB 1.2 troubleshooting)

Specifically: Switch to UTF-8 everywhere

279

(45 replies, posted in News)

When it's ready. smile

280

(2 replies, posted in PunBB 1.2 modifications, plugins and integrations)

Find these lines in viewtopic.php?

<dd class="usertitle"><strong><?php echo $user_title ?></strong></dd>
<dd class="postavatar"><?php echo $user_avatar ?></dd>

?and try switching them around:

<dd class="postavatar"><?php echo $user_avatar ?></dd>
<dd class="usertitle"><strong><?php echo $user_title ?></strong></dd>
orlandu63 wrote:

Also, a 'Disable View Count' feature would be nice

http://dev.punbb.org/ticket/32

282

(4 replies, posted in PunBB 1.2 discussion)

Technical availability aside, I must say I prefer the first style, as it is much easier to find  such an URL in a browser's address bar [history/drop-down menu].

283

(6 replies, posted in PunBB 1.2 discussion)

What announcement plugin is this? What about Connor's Global Topic plugin?

Hmm? on my board it does stop at the first post.

Edit: The reports query seems to cause problems? Is there a way to move it outside the main loop?

Edit: Still curious about moving outside the loop, but, um? trying renaming the variable to:

$report_result // instead of $result, which is in use by the main loop!

Try this? In viewtopic.php, find?

    // Perform the main parsing of the message (BBCode, smilies, censor words etc)
    $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']);

?replace with:

    $result = $db->query('SELECT DISTINCT reported_by FROM '.$db->prefix.'reports WHERE post_id = '.$cur_post['id'].' AND zapped IS NULL') or error('Unable to fetch report info', __FILE__, __LINE__, $db->error());
    if (!$is_admmod && $db->num_rows($result) >= 3)
        $cur_post['message'] = '<em>This post has been marked as objectionable and is awaiting staff review.</em>';
    else
        // Perform the main parsing of the message (BBCode, smilies, censor words etc)
        $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']);
pedrotuga wrote:

Will it be possible to turn the good looking urls off?

Yes

Edit:

pedrotuga wrote:

What about the old urls? will they still be working? we cant forget that there are links spread on the web pointing to 1.2 forums that should not be made broken.

Look for yourself: http://dev.punbb.org/browser/branches/p … /.htaccess

pedrotuga wrote:

Anyway, i guess the database model will be untouched.

Check that too: http://dev.punbb.org/browser/branches/p … update.php

miketk, isn't your above rule using a regex?

sirena wrote:

(a) Will they slow down a site that uses them? There are quite a few rules - over 50 - for Apache to parse in there. Is there a server load issue users should be aware of?

AFAIK, it probably won't be parsing all 50 rules every time; the [L] flag should stop the parsing after the correct rule has been found for that URL.

Edit: miketk, why not use three rules for that? Like MadHatter said, something has to do the work; Why do you think a php file would do any better? (Odds are that php is being run through an apache module too.)

Sounds like a mod request. You should be able to make a small change ("closed ASC ,") to the query (in viewforum.php) that fetches the topics (though I haven't tried it):

// Fetch list of topics to display on this page
switch ($db_type)
{
    case 'mysql':
    case 'mysqli':
        $sql = 'SELECT p.poster_id AS has_posted, t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to FROM '.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id WHERE t.forum_id='.$id.' GROUP BY t.id ORDER BY sticky DESC, closed ASC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
        break;

    case 'sqlite':
        $sql = 'SELECT p.poster_id AS has_posted, t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to FROM '.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id WHERE t.id IN(SELECT id FROM '.$db->prefix.'topics WHERE forum_id='.$id.' ORDER BY sticky DESC, closed ASC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'].') GROUP BY t.id ORDER BY t.sticky DESC, t.last_post DESC';
        break;

    default:
        $sql = 'SELECT p.poster_id AS has_posted, t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to FROM '.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id WHERE t.forum_id='.$id.' GROUP BY t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to, p.poster_id ORDER BY sticky DESC, closed ASC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
        break;
}

290

(3 replies, posted in PunBB 1.2 discussion)

I've edited profile.php. Add `u.last_visit` to the database query (line 894)?

g.g_user_title FROM '.$db->prefix.'users
g.g_user_title, u.last_visit FROM '.$db->prefix.'users

?then display it (line 1197):

<p><?php echo $lang_common['Last post'] ?>: <?php echo $last_post ?></p>
<?php if ($pun_user['g_id'] == PUN_ADMIN): ?><p>Last visit: <?php echo format_time($user['last_visit']); ?>
<?php endif; ?><p><?php echo $lang_common['Last post'] ?>: <?php echo $last_post ?></p>

Just saw that Midnight Apps uses PunBB.

Looks kinda like this: Author Column mod

293

(26 replies, posted in General discussion)

I wouldn't be sticking my tongue out so close to it?

294

(27 replies, posted in PunBB 1.2 discussion)

Sounds good Rickard. smile

295

(2 replies, posted in PunBB 1.2 troubleshooting)

Add a WHERE clause to the query:

$result = $db->query('SELECT g_id, g_title FROM '.$db_prefix.'groups WHERE g_id <> 3 ORDER BY g_id') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());

A couple of fixes and additions are already in progress?

Edit: A new version has been uploaded.

Version 2 is now on the downloads page as AP_Author_Update.

Edit: New thread

298

(6 replies, posted in PunBB 1.2 discussion)

I think it has something to do with how it gets the list of plugins in the folder. When I want to cleanup the list, I just delete and re-upload my plugins.

299

(6 replies, posted in PunBB 1.2 discussion)

Connor's plugin might help you set the number of posts: AP_Forum_cleanup

Directly changing the DB is fine, but I'll mention one of my plugins too: AP_Author_Update

Version 2.0 has been uploaded: http://punbb.org/download/plugins/AP_Author_Update.zip

This plugin allows admins to change the author of a single post or to transfer all posts by a certain user to another user.