Oh, and remove the quotes. It's a number, not a string.

There's no need for an extra query, just use $fid.

Mark wrote:

For MyPunBB.com issues, you should really ask on the MyPunBB.com support forums.

Well, it's really not a MyPunBB.com issue. According to his post, he has a PunBB install on his own host, and he's trying to implement colored usergroups in the same fashion as when he had a forum on MyPunBB. That's what the situation seems to be, at least.

Life Spirit wrote:

I did it exactly how i did when i had MyPunBB, is there anything I have to do different?

679

(5 replies, posted in PunBB 1.2 discussion)

The convertor doesn't seem to support EZBoards, but I suppose you could kinda "double convert", i.e. covert from EZBoard to PhpBB, then from PhpBB to PunBB. Just be sure to keep a backup copy of the original EZBoards forum in case the conversion doesn't go as planned.

$results = mysql_query("SELECT * FROM forums") or die(mysql_error());
    while ($fblogid = mysql_fetch_array($results));

Wouldn't that output multiple rows?

What are you trying to determine? The forum id?

I don't know how MyPunBB does colored usergroups, but I have a feeling that it's different than doing it on a normal PunBB forum.

Anyway, try the colored usergroups mod.

@tntcheats: Probably, but you have to accept the risk of false positives.

I'll probably add it to my forum at some point, but most likely only for guests.

waazzuup wrote:

I'm a n00b -  I'm not much of a coder.  Could you please advise me on how I do this?

http://validator.w3.org/check?verbose=1 … Fforums%2F

In post.php, try finding this:

        if (!$pun_user['is_guest'])
        {
            $low_prio = ($db_type == 'mysql') ? 'LOW_PRIORITY ' : '';
            $db->query('UPDATE '.$low_prio.$db->prefix.'users SET num_posts=num_posts+1, last_post='.$now.' WHERE id='.$pun_user['id']) or error('Unable to update user', __FILE__, __LINE__, $db->error());
        }

        redirect('viewtopic.php?pid='.$new_pid.'#p'.$new_pid, $lang_post['Post redirect']);

And replacing it with this:

        if (!$pun_user['is_guest'])
        {
            $low_prio = ($db_type == 'mysql') ? 'LOW_PRIORITY ' : '';
            $db->query('UPDATE '.$low_prio.$db->prefix.'users SET num_posts=num_posts+1, last_post='.$now.' WHERE id='.$pun_user['id']) or error('Unable to update user', __FILE__, __LINE__, $db->error());
        }

        redirect('INSERT URL OF YOUR CHOICE HERE', $lang_post['Post redirect']);

EDIT: Just remembered you only want it in two forums. You'll have to add an if statement to check the forum ID. I have to go now, but if you need anymore help just ask.

685

(30 replies, posted in PunBB 1.2 discussion)

I really don't know whether the solution presented in it works or not, but a similar topic that popped up a while back.

686

(11 replies, posted in PunBB 1.2 show off)

Very cool, although I think that it would look nicer if you added more padding between sections.

StevenBullen wrote:

That a side... Spammers are starting to learn that sites are picking up these keywords... Then they will just do many variations like so... V1agra and so on... Spammers are annoying... sad

They already do that with my email, so I guess it's only a matter of time before such a thing becomes widespread on forums too, unless they're specifically trying to bump their search rank for a specific keyword (which in many instances is probably the case).

Doesn't sound like a bug, so I've moved this to troubleshooting (if it does turn out to be a bug, I'll move it back smile ).

Or to do it more easily (albeit a little less efficiently), change the part of header.php that prints the title tags to this:

<title><?php // reversed title order
if ($page_title != $pun_config['o_board_title'])
{
    $page_title = substr($page_title, strlen($pun_config['o_board_title']) + 3).' / '.$pun_config['o_board_title'];
    echo $page_title;
}
else
    echo $page_title;
?></title>

P.S. If you have problems with that, you might need to do this (I don't have any special characters in my board title so I don't need it, but you may):

<title><?php // reversed title order
if ($page_title != $pun_config['o_board_title'])
{
    $page_title = substr($page_title, strlen(punhtmlspecialchars($pun_config['o_board_title'])) + 3).' / '.punhtmlspecialchars($pun_config['o_board_title']);
    echo $page_title;
}
else
    echo $page_title;
?></title>

690

(5 replies, posted in PunBB 1.2 show off)

elbekko wrote:

Should be in Show off tho.

Yeah, I guess so.

I just love the way the username / title / avatar is set up in the topic view, with the photo border thingies.

Like elbekko said, enable debug mode, and like he forgot to say, paste the full error here.

692

(12 replies, posted in PunBB 1.2 discussion)

Gizzmo wrote:

that is for when users view, but if a guest views,  the query in the else statement is used.

Oh, I see what you're saying now. Thanks.

693

(12 replies, posted in PunBB 1.2 discussion)

Gizzmo wrote:

well it seemed that guest views didnt count, unless you add "t.poster," to the second query. But it seems to be working now.

Didn't I put that into the instructions?

pogenwurst wrote:

Anyway, open viewtopic.php and find

if (!$pun_user['is_guest'])
        $result = $db->query('SELECT f.no_images, t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, s.user_id AS is_subscribed FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'subscriptions AS s ON (t.id=s.topic_id AND s.user_id='.$pun_user['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 t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());

replace with

if (!$pun_user['is_guest'])
        $result = $db->query('SELECT f.no_images, t.subject, t.closed, t.num_replies, t.sticky, t.poster, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, s.user_id AS is_subscribed FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'subscriptions AS s ON (t.id=s.topic_id AND s.user_id='.$pun_user['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 t.id='.$id.' AND t.moved_to IS NULL') or error('Unable to fetch topic info', __FILE__, __LINE__, $db->error());

is there anything like this for mypunbb?

You can only use mods on MyPunBB if its owner (Connorhd) installs them.

24jedi wrote:

btw...what is the purpose for PUN_QUIET_VISIT and PUN_ALLOW_INDEX ?

They determine whether or not users visiting a particular page will be added to the online list and whether or not PunBB will generate a NOINDEX meta tag for the page, respectively.

What kind of message (if any) does the mod give the user after their post has been identified as spam?

697

(3 replies, posted in PunBB 1.2 show off)

how do you make your own skin?

You can use SpinkBB to make a simple style, but to do anything beyond that you'll need to learn CSS.

698

(12 replies, posted in PunBB 1.2 discussion)

Gizzmo wrote:

seems to work greatly so far.

Awesome!

699

(12 replies, posted in PunBB 1.2 discussion)

I'm not sure how well it works (if at all, I haven't tested and never got a response from whoever requested it), but I posted code for this sort of thing a little while ago.

teenagegluesniffer wrote:

Link is broken! sad

http://www.punres.org/desc.php?pid=148