Moved to Modifications

Moved to Modifications

4,553

(12 replies, posted in PunBB 1.2 troubleshooting)

1. If you're uploading using an FTP program, they usually offer you a way. If you're confused about the word directory, directories are just like folders in Windows.
2. Well, lets say I own the site www.example.com. If I upload the contents of the upload directory to a folder called "forum" in the site, I can access the forum at http://www.example.com/forum/. To install, you need to run the install.php file from your webbrowser. In my example, I would go to http://www.example.com/forum/index.php

I'm not returning any duplicate rows though, so that won't do anything wink
Anyways, the second post should deal with the user issue

And here's a version which addresses the user issue: now you need reports from 3 unique users
Again, untested, I coded it right in the post box, it might need some fixes

FIND

// Retrieve the posts (and their respective poster/online status)

BEFORE, ADD

// mod: Don't display reported posts
$report_result = $db->query('SELECT post_id, reported_by FROM '.$db->prefix.'reports WHERE topic_id = '.$id.' AND zapped IS NULL') or error('Unable to fetch report info', __FILE__, __LINE__, $db->error());
$reported = array();
while($cur_report = $db->fetch_assoc($report_result))
{
    $reported[$cur_report['post_id']][$cur_report['reported_by']] = true;
}

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

    // Perform the main parsing of the message (BBCode, smilies, censor words etc)
    // mod: Don't display reported posts
    if (!$is_admmod && isset($reported[$cur_post['id']]) && count($reported[$cur_post['id']]) >= 3)
        $cur_post['message'] = '[<em>This post has been marked as objectionable and is awaiting staff review.</em>]';
    else
        $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']);

An untested version which I think should be better:

Only problem with it: one user can make 3 reports and the post will be hidden (I actually think that was a bug in the original code as well, but I've never tested it)

FIND

// Retrieve the posts (and their respective poster/online status)

BEFORE, ADD

// mod: Don't display reported posts
$report_result = $db->query('SELECT post_id, COUNT(*) AS num_reports FROM '.$db->prefix.'reports WHERE topic_id = '.$id.' AND zapped IS NULL GROUP BY post_id') or error('Unable to fetch report info', __FILE__, __LINE__, $db->error());
$reported = array();
while($cur_report = $db->fetch_assoc($report_result))
{
    if ($cur_report['num_reports'] >= 3)
        $reported[$cur_report['post_id']] = true;
}

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

    // Perform the main parsing of the message (BBCode, smilies, censor words etc)
    // mod: Don't display reported posts
    if (!$is_admmod && isset($reported[$cur_post['id']]))
        $cur_post['message'] = '[<em>This post has been marked as objectionable and is awaiting staff review.</em>]';
    else
        $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']);

Aha smile
Don't worry about it, that's very confusing! tongue

That is very odd
Is there any chance you could give me a link and an admin account so I can check it out?

Have you made any modifications at all to the source? Did you modify any of the group permissions? Are you logged in as an administrator?

4,560

(7 replies, posted in PunBB 1.2 troubleshooting)

Closed
This is the support forum for PunBB. If you want phpBB, go there.
But as has been said, you need to talk to your host: it's their issue, not ours or the phpBB group's.

4,561

(1 replies, posted in PunBB 1.2 troubleshooting)

You'll have to talk to your host: it's an issue with the MySQL server

Easiest way? Remove the second parameter from the call to $db->query and $db->num_rows will work

Another (better?) way? Add a new variable (for the sake of this, I'll call it $forum_count). Increment it every time you go through another row.

Well, there's a variable $cat_count which is already calculated for you at the end of the loop wink
The problem with $db->num_rows is that the query is running unbuffered. Therefore, the results aren't being loaded into memory beforehand (and thus you can't get an easy count).

Riklaunim wrote:

it will work with newer version until some bigger code changes wink

I'm sure it will: my point was simply that r682 (the current revision) is better to offer a tarball for (since it fixes the install bug)

r681 is a bad release to start from: all new installs of that are "broken" (Guests are assigned the wrong usergroup)

4,566

(2 replies, posted in PunBB 1.2 troubleshooting)

Moved to Troubleshooting

It's most likely a caching issue with your browser as opposed to a bug wink

4,567

(1 replies, posted in PunBB 1.2 bug reports)

Yes, already discussed (and addressed in 1.3)
http://punbb.org/forums/viewtopic.php?id=8436
I'm going to close this since we already have a topic that discusses the bug in some detail wink

4,568

(4 replies, posted in PunBB 1.2 discussion)

pogenwurst, your post is showing up multiple times: try logging out/in smile

Possibly as an extension to 1.3 smile

4,570

(11 replies, posted in PunBB 1.2 discussion)

I think you mean
http://punbb.org/forums/misc.php?email=2

I think if short tags work on the server his syntax is fine
My guess is that the host stopped allowing URLs in includes smile

What error is it causing? That's kind of important tongue

Not a problem: I was confused the first time I saw it as well smile

Moved to PunBB Discussion

Not a bug, as you guessed:
http://punbb.org/forums/viewtopic.php?id=10299
http://punbb.org/forums/viewtopic.php?id=6865
http://punbb.org/forums/viewtopic.php?id=9735

4,575

(4 replies, posted in PunBB 1.2 discussion)

Works for me