601

(7 replies, posted in PunBB 1.2 troubleshooting)

How can I - using phpMyAdmin - copy sql tables? I don't know why, but the g_post_polls table really has a punbb_-prefix, although it is supposed to be _forum. Can I just copy the table somehow? Why did it do that like that anyways? Is that because of the poll mod code?
Thanks for any answers.

602

(7 replies, posted in PunBB 1.2 troubleshooting)

Here you go.

File: <mysite>/forum/admin_forums.php
Line: 345

PunBB reported: Unable to fetch group forum permission list 

Database reported: Unknown column 'g.g_post_polls' in 'field list' (Errno: 1054) 

Failed query: SELECT g.g_id, g.g_title, g.g_read_board, g.g_post_replies, g.g_post_topics, g.g_post_polls, fp.read_forum, fp.post_replies, fp.post_topics, fp.image_upload FROM forumgroups AS g LEFT JOIN forumforum_perms AS fp ON (g.g_id=fp.group_id AND fp.forum_id=6) WHERE g.g_id!=1 ORDER BY g.g_id

603

(7 replies, posted in PunBB 1.2 troubleshooting)

When I installed punBB on my website, I messed something up the first time. Then I did the big mistake and didn't delete the database, because I was in a big hurry. So I just chose another prefix for the tables. Now something seems to be messed up. For example, the tables for the poll plugin have the old prefix punbb, although they should have the prefix forum. That is probably what causes the message
        "Error: Unable to fetch group forum permission list. ",
when I try to edit my forums.

What could I do?
Thanks for the help.

Thanks wink

I am really not good in PHP. So, does anybody see in the above code why the user online list doesn't update when logging in?
I would really highly aprecciate help.

thanks a lot

i need a new download file - punbb resource says the file does not exist

A lot. Thanks. I just didnt know where to put it in the other file. Now I know. Thanks again.

roll OOps, I really missed something there. The dumm thing is though, that would change the link colors everywhere, wouldn't it?

Oh, that's part of the mod. It does that randomly. Wait a second, it might be faster to chat...
I have a chat room in my forum, so just follow this link:
http://www.bydebrasdesigns.com/biblestu … m/chat.php
I just have to allow guests to chat. So just wait one minute, and then join, please!!!

Well, I originally uploaded the .htaccess file in binary mode. It didn't work. I looked a bit around in my hosting help and found out, that all .htaccess files have to be uploaded in ASCII mode.
How do you upload your files? With a program or online at your hosting manager?

Frank H wrote:

Just send me a mail if you have any problems, and I'll try my best to help out. smile
(you can use the email form on this forum, or use the email written in the readme.txt)

Who did you mean?

Second problem (actually that from the top of this page):

If I log in, my user name does not show up on the sidebar under "who is online" before I click on some other link.

Here is the questionable code from include/functions.php:

else
    {
        require PUN_ROOT.'lang/'.$pun_user['language'].'/index.php';
        $result = $db->query('SELECT COUNT(id)-1 FROM '.$db->prefix.'users') or error('Unable to fetch total user count', __FILE__, __LINE__, $db->error());
        $stats['total_users'] = $db->result($result);
        
        $result = $db->query('SELECT id, username FROM '.$db->prefix.'users ORDER BY registered DESC LIMIT 1') or error('Unable to fetch newest registered user', __FILE__, __LINE__, $db->error());
        $stats['last_user'] = $db->fetch_assoc($result);
        
        $result = $db->query('SELECT SUM(num_topics), SUM(num_posts) FROM '.$db->prefix.'forums') or error('Unable to fetch topic/post count', __FILE__, __LINE__, $db->error());
        list($stats['total_topics'], $stats['total_posts']) = $db->fetch_row($result);
        
        if ($pun_config['o_users_online'] == '1')
        {
            // Fetch users online info and generate strings for output
            $num_guests = 0;
            $users = array();
            $online = array();
            $result = $db->query('SELECT user_id, ident FROM '.$db->prefix.'online WHERE idle=0 ORDER BY ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());
        
            while ($pun_user_online = $db->fetch_assoc($result))
            {
                if ($pun_user_online['user_id'] > 1)
                    $users[] = "\n\t\t\t\t".'<a href="profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a><br />';
                else
                    ++$num_guests;
            }
        
            $num_users = count($users);
            $online[] = "\t\t\t\t".$lang_index['Users online'].': <strong>'.$num_users.'</strong><br />'."\n\t\t\t\t".$lang_index['Guests online'].': <strong>'.$num_guests.'</strong>'."\n\t\t\t"."\n";
        
        
            if ($num_users > 0 && $num_users < 10)
                $online[] = "\t\t\t"."\n\t\t\t\t".'<br /><strong>'.$lang_index['Online'].': </strong>'."\t\t\t\t".implode($users)."\n";
            else
                $online[] = "\t\t\t".'<div class="clearer"></div>'."\n";
        
        }
        
        return 'Welcome <strong>'.$pun_user['username'].'</strong><br />
            <a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a><br /><br />
            '.implode($online,'').'<br />
            Users: <strong>'. $stats['total_users'].'</strong><br />
            Topics: <strong>'.$stats['total_topics'].'</strong><br />
            Posts: <strong>'.$stats['total_posts'].'</strong><br />';
    }
}

I think it has to do with my new index page. My main page is now a welcome page - and it does not show up with the "who is online" footer...
Might that be the problem?

Where would I have to "plug in" a self-made stylesheet for my calendar? (I just wanted to change the link colors for the colors, and I saw no other way)...

By the way, I just noticed that only happens when I use bold, italic, etc. - not the smilies... - in all my forums.

I put my doubtful code here.

Fixed.

Oh, the capitalization is important?
That would explain a lot... big_smile
Well - then, thanks a lot.

I'll post here if it worked or not...

@nightfalcon:
Really nice mod.
Just one question:
In header.php you include the stylesheet image_upload.css here:

if (defined('PUN_ADMIN_CONSOLE'))
    echo '<link rel="stylesheet" type="text/css" href="style/imports/base_admin.css" />'."\n";
    echo '<link rel="stylesheet" type="text/css" href="style/imports/image_upload.css" />'."\n";

Wouldn't it be better when that would be under "imports", since it doesn't really work out fine as forum design option (I am just concerned about this, because my users don't have a clue about all that php-stuff... wink

EDIT: Oops. As you can see, I already fixed it. The original form was obviously this:

if (defined('PUN_ADMIN_CONSOLE'))
    echo '<link rel="stylesheet" type="text/css" href="style/imports/base_admin.css" />'."\n";
    echo '<link rel="stylesheet" type="text/css" href="style/image_upload.css" />'."\n";

I got almost the same error message. I fixed it, though.
Still, does anybody know how to do chmod-stuff with www.godaddy.com ?
Thanks a lot.

The first part (starting at line 348) is the actual change from the easybbcode mod (I don't know why I posted that here- I was obviously a little confused yesterday). The rest - including line 383 (I marked it) - was already in the file.
Well, here you go:

$replace = array('<strong>$1</strong>',
                     '<em>$1</em>',
                     '<span class="bbu">$1</span>',
                     'handle_url_tag(\'$1\')',
                     'handle_url_tag(\'$1\', \'$2\')',
                     '<a href="mailto:$1">$1</a>',
                     '<a href="mailto:$1">$2</a>',
                     '<ul>$1</ul>',
                     '<ol>$1</ol>',
                     '<li>?  $1</li>',
                     '<li>$1</li>',
                     '<span style="color: $1">$2</span>',
                     '<span style="font-family: $1">$2</span>',
                     '<span style="font-family: $1">',
                     '</span>',
                     '<p align="$1">$2</p>',
                     '<span style="$1">$2</span>',
                     '<hr />',
                     '<hr />',
                     '<table>$1</table>',
                     '<div align="center">$1</div>',
                     '<tr>$1</tr>',
                     '<td>$1</td>',
                     '<del>$1</del>',
                     '<pre>$1</pre>',
                     '<pre>',
                     '</pre>',
                     '<sup>$1</sup>',
                     '<sub>$1</sub>',
                     '<span style="font-size: $1pt;">$2</span>',
                     '<span style="font-size: $1pt;">$2',
                     '</span>',
                     '<span style="background-color: #FFFF00; color: #000000">$1</span>');

    // This thing takes a while! :)
    $text = preg_replace($pattern, $replace, $text); //THIS IS LINE 383

    return $text;

Does that help?

Sorry, that is another plugin. I added three mods to my forum yesterday and what I asked was about the image_upload mod. Sorry again wink

this is the message punbb comes up with:

Warning: preg_replace(): Compilation failed: unmatched parentheses at offset 5 in /home/content/d/e/b/debsue/html/biblestudy/forum/include/parser.php on line 383

Warning: preg_replace(): No ending delimiter '#' found in /home/content/d/e/b/debsue/html/biblestudy/forum/include/parser.php on line 383

Warning: preg_replace(): Compilation failed: unmatched parentheses at offset 6 in /home/content/d/e/b/debsue/html/biblestudy/forum/include/parser.php on line 383

Warning: preg_replace(): No ending delimiter '#' found in /home/content/d/e/b/debsue/html/biblestudy/forum/include/parser.php on line 383

does anybody have an idea what that means?

In header.php you include the stylesheet image_upload.css
Wouldn't it be better when that would be under "imports", since it doesn't really work out fine as forum design big_smile

Right now it seems to work. Maybe that was just because it was the first time or something wink