2,101

(105 replies, posted in General discussion)

FIND

$forums_info = $db->query('SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, id, forum_name FROM '.$db->prefix.'forums ORDER BY disp_position') or error(implode($db->error(),''),__FILE__,__LINE__,$db->error());

REPLACE WITH

$forums_info = $db->query('SELECT num_topics, num_posts, parent_forum_id, last_post_id, last_poster, last_post, f.id, forum_name, p.poster_id as last_poster_id FROM '.$db->prefix.'forums AS f LEFT JOIN '.$db->prefix.'posts AS p ON (p.id=f.last_post_id) ORDER BY disp_position') or error(implode($db->error(),''),__FILE__,__LINE__,$db->error());

2,102

(105 replies, posted in General discussion)

    // If there is a last_post/last_poster.
    if ($l_post != '') {
        $idmT = (isset($idmComp)) ? ' title="'.$idmComp.'"' : '';
    $last_post = 'Re: <a href="viewtopic.php?pid='.$l_pid.'#p'.$l_pid.'"'.$idmT.'>'.$idm.'</a><br />'.format_time($l_post).'<br /><span class="byuser">'.$lang_common['by'].' <a href="profile.php?id='.$l_pr_id.'">'.pun_htmlspecialchars($_lpr).'</a></span>';
    } else
        $last_post = ' ';

Then

FIND

$l_pr = $cur_forum['last_poster'];

AFTER, ADD

$l_pr_id = $cur_forum['last_poster_id'];

FIND

$sfdb[$sfcount][7] = $current['forum_name'];

AFTER, ADD

$sfdb[$sfcount][8] = $current['last_poster_id'];

FIND

$l_pr = $sfdb[$i][4];

AFTER, ADD

$l_pr_id = $sfdb[$i][8];

2,103

(5 replies, posted in PunBB 1.2 troubleshooting)

I would need to see the rest of your code, but my guess is that the issue is target="iframe" wink

2,104

(15 replies, posted in PunBB 1.2 troubleshooting)

When viewing source in IE on one of the affected pages, I see this:

[character]?<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

where [character] is some character, I can't tell what it is, it just looks like a box. Try removing that character.

So if you're putting something into the database, it's needed for security reasons

2,106

(15 replies, posted in PunBB 1.2 troubleshooting)

tomekf wrote:

I think there is bug in PunBB with disabling userlist roll You should change line 30 from:

if ($pun_user['g_read_board'] == '0')

to:

if ($pun_user['g_read_board'] == '0' || $pun_user['g_search_users'] == '0')

Now you can change in Setup group options and permissions --> Search user list which group is able to view userlist smile

That's not a bug though, since allowing freetext search is different from allowing a user to view the userlist wink

2,107

(5 replies, posted in PunBB 1.2 troubleshooting)

Nope, PunBB should work fine in an iframe, what's the problem?

I have fountains of knowledge on the subject of backups? tongue
What you're doing I would say is the best way, although I would personally generate two backups. One of schema, which contains all tables, and one of data, which contains non-search data. mysqldump offers those options.

As for automating it, for PunBB-Hosting I've modified the DB Management plugin to backup using mysqldump, that would be the most automation you could do I think (unless you make, say, a shell script to import the database from the command line that you would run by itself).

No

$username = $firstname.$lastname;

That would be valid syntax, I couldn't say how well it would work.

No, you don't need to run install.php.
I would need to see a link to the forum to tell more, although I have an idea.

2,111

(2 replies, posted in PunBB 1.2 discussion)

Those aren't subdomains, those are subfolders wink
You have two options, you can either keep the same cookie name and set the cookie path or keep the cookie path and set different cookie names. I would set the path for security reasons.

2,112

(105 replies, posted in General discussion)

No. You ignored what I said. wink
OK, here are the instructions, exactly as they are on the wiki
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, t.subject FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id INNER JOIN '.$db->prefix.'topics AS t ON t.last_post_id=f.last_post_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 there is a last_post/last_poster.
    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>';
    else
        $last_post = ' ';

REPLACE WITH

    // Display the last topic
    $idm = $cur_forum['subject'];
    if(strlen($idm) > 30) {
        $idmComp = str_replace('"', "''", $idm);
        $idm = substr($idm, 0, 30).'...';
    } else
        $idmComp = '';
 
    // If there is a last_post/last_poster.
    if ($cur_forum['last_post'] != '') {
        $idmT = (isset($idmComp)) ? ' title="'.$idmComp.'"' : '';
        $last_post = format_time($cur_forum['last_post']).'<br />dans <a href="viewtopic.php?pid='.$cur_forum['last_post_id'].'#p'.$cur_forum['last_post_id'].'"'.$idmT.'><em>'.$idm.'</em></a><br /><span class="byuser">'.$lang_common['by'].' '.pun_htmlspecialchars($cur_forum['last_poster']).'</span>';
    } else
        $last_post = ' ';
#brdtitle H1 {

    HEIGHT: 100px;
    MARGIN: 0px;
    FONT-SIZE: 40px;
    COLOR: #FFF;
    PADDING-TOP: 40px;
    PADDING-LEFT: 130px;
}

You're messing with the placement via CSS.

2,114

(105 replies, posted in General discussion)

OK. By removing the true you added buffering back, which fixes the problem with display but doesn't address the issue of the queries.
Now, to address that, add back what you removed and follow the instructions here:
http://wiki.punres.org/Last_post%27s_su … orum_index
just using the steps noted as "fpouget proposition" instead of the regular ones.
So, for example, the first 3 codes of block are the find, the regular replace, and the "fpouget proposition" replace. Ignore the second block, the regular replace.

2,115

(105 replies, posted in General discussion)

You're adding a query within an unbuffered query, which is a bad idea in general (you're running one more query for every row returned by the original query). Use the stuff referenced as "fpouget proposition" instead.

Are you using any other web applications that use SMTP? Are they working?

I have no idea what that errno means, you need to talk to your host about it. If you haven't changed anything, they have wink

Is that your SMTP server?

Could you provide a link to your forum?

Mmm, could you paste a copy of your code?

What's the error you get?

Use PUN_ROOT and define it relative to that.

2,123

(124 replies, posted in News)

pingme wrote:

developers must earn a levaing that true....The point is not about that..Point is as a donar I feel cheated...the message is very ambiguos about future versions...or what it actually means to me as a end user...whats the impact of this sale on the end user...

I'm sorry you feel cheated, but I think we've been as clear as we can in laying out exactly how the change impacts the users (not at all). I pasted a quote to you a couple posts back that was just about as clear as anything else. And the donation money did go to support the upkeep and running of PunBB, it's not like people donated and then Rickard went off and spent the money on booze tongue

2,124

(124 replies, posted in News)

pingme wrote:

I read the entire thread If you can read between the line....there is no garuntee that future versions will be free

Rickard wrote:

Enough with the drama. This isn't the "End of free PunBB". PunBB is GPL and will remain so. If push comes to shove, I'll fork it myself!

There are no words between the lines, so anything you read there isn't real tongue

viewforum.php
FIND

// Fetch list of topics to display on this page
if ($pun_user['is_guest'] || $pun_config['o_show_dot'] == '0')
{
    // Without "the dot"
    $sql = 'SELECT id, poster, subject, posted, last_post, last_post_id, last_poster, num_views, num_replies, closed, sticky, moved_to FROM '.$db->prefix.'topics WHERE forum_id='.$id.' ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
}
else
{
    // With "the dot"
    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 AND p.poster_id='.$pun_user['id'].' WHERE t.forum_id='.$id.' GROUP BY t.id ORDER BY sticky DESC, '.(($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 AND p.poster_id='.$pun_user['id'].' WHERE t.id IN(SELECT id FROM '.$db->prefix.'topics WHERE forum_id='.$id.' ORDER BY sticky DESC, '.(($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 AND p.poster_id='.$pun_user['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, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
            break;

    }
}

REPLACE WITH

// Fetch list of topics to display on this page
if ($pun_user['is_guest'] || $pun_config['o_show_dot'] == '0')
{
    // Without "the dot"
    $sql = 'SELECT t.id, t.poster, t.subject, 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 AS last_poster_id FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'posts AS p ON (p.id=t.last_post_id) WHERE forum_id='.$id.' ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
}
else
{
    // With "the dot"
    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, p2.poster_id AS last_poster_id FROM '.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id AND p.poster_id='.$pun_user['id'].' INNER JOIN '.$db->prefix.'posts AS p2 ON (p2.id=t.last_post_id) WHERE t.forum_id='.$id.' GROUP BY t.id ORDER BY sticky DESC, '.(($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 AND p.poster_id='.$pun_user['id'].' WHERE t.id IN(SELECT id FROM '.$db->prefix.'topics WHERE forum_id='.$id.' ORDER BY sticky DESC, '.(($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 AND p.poster_id='.$pun_user['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, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
            break;

    }
}