Thanks for reporting, we will fix this bug

1,077

(2 replies, posted in PunBB 1.3 bug reports)

Thanks, we will fix it - http://punbb.informer.com/trac/ticket/204

After what actions did this error appear? Maybe, you installed some mods or changed something in the DB?

Add extension request please

Are there any errors at the page, except this? Enable debug mode to see others errors. To do this add this line to config.php

define('FORUM_DEBUG', 1);

1,081

(3 replies, posted in General discussion)

The markup of the Forum allows you to do what you want. Every div element of the forum has an id, for example id="forum1", like the one topics have. You can edit CSS-files to set different colors for forums. For example, this code changes background color of forum with id = 1

#forum1{    background: #EDF1F5;
}

1,082

(13 replies, posted in PunBB 1.3 additions)

To delete "Sticky" and "Closed" notes remove this lines from script

 if ($cur_set['sticky'] == '1')
{
    $item_subject_status['sticky'] = $lang_forum['Sticky'];
    $item_status['sticky'] = 'sticky';
 }
    
if ($cur_set['closed'] != '0')
{
    $item_subject_status['closed'] = $lang_forum['Closed'];
    $item_status['closed'] = 'closed';
}

1,083

(13 replies, posted in PunBB 1.3 additions)

Place this script in a file with .php extension. On those pages where you want to display the topic list, insert this line:

include "<your_file_name.php>";

This line should be placed inside php-tags.

On every forum page, there is a div with id brd-main, it's not a part of functions.php.

1. All forum-notes are stored in lang-arrays. For every forum page there is a file with associative array. Files are placed in the "lang/<USER_LANGUAGE>/" directory. User's default language is English. To edit the "You are not logged in." note, open the "lang/English/common.php" file, and find the "Not logged in" key in the array.
2. Showing the number of posts works for me. What is the version of your forum?

1,085

(9 replies, posted in Test forum)

poplop wrote:

Hi!
test TEST

Поцелуй по расчету

Post deleted. Write in English please

1,086

(13 replies, posted in PunBB 1.3 additions)

This script will show last 20 posts. It will be correctly work after including file "include/common.php", also for correct displaying it should be inside of div with id "brd-main".

<?php
    $topics_count = 20;
    $query_active_topics= array(
        'SELECT'    => 't.id AS tid, t.poster, t.subject, t.posted AS has_posted, t.last_post, t.last_post_id, t.num_replies, t.num_views, t.closed, t.sticky, t.forum_id',
        'FROM'        => 'topics AS t',
        'JOINS'        => array(
            array(
                'INNER JOIN'    => 'forums AS f',
                'ON'            => 'f.id=t.forum_id'
            ),
            array(
                'LEFT JOIN'     => 'forum_perms AS fp',
                'ON'            => '(fp.forum_id=f.id AND fp.group_id='.$forum_user['g_id'].')'
            )
        ),
        'ORDER BY'    => 't.last_post',
        'LIMIT' => $topics_count
    );
    $result_active = $forum_db->query_build($query_active_topics) or error(__FILE__, __LINE__);
    
    if ($forum_db->num_rows($result_active) == 0)
    {

    ?>
        <div class="main-content main-message">
            <p>There is no message.</p>
        </div>
    <?php
        
    } 
    else
    {
        require_once FORUM_ROOT.'lang/'.$forum_user['language'].'/forum.php';

    ?>    
        <div class="main-subhead">
                <p class="item-summary">
                    <span>
                        <strong class="subject-title"><?php echo $lang_index['Topics']; ?></strong>
                        <strong class="info-replies"><?php echo $lang_forum['Replies']; ?></strong>
                        <strong class="info-views"><?php echo $lang_forum['Views']; ?></strong>
                    </span>
                </p>                                                
            </div>
        <div class="main-content main-forum">                    
        <?php

            $item_num = 1;
            while ($cur_set = $forum_db->fetch_assoc($result_active))
            {
               // Start from scratch
                $item_subject = $item_body = $item_status = $item_nav = $item_title = array();
                $item_indicator = ''; 
                
                if (!$forum_user['is_guest'] && $forum_config['o_show_dot'] == '1' && $cur_set['has_posted'] > 0)
                {
                    $item_title['posted'] = '<span class="posted-mark">'.$lang_forum['You posted indicator'].'</span>';
                    $item_status['posted'] = 'posted';
                }

                $item_title['link'] = '<a href="'.forum_link($forum_url['post'], $cur_set['last_post_id']).'">'.forum_htmlencode($cur_set['subject']).'</a>';

                if (!empty($item_nav))
                    $item_title['nav'] = '<span class="item-nav">'.sprintf($lang_forum['Topic navigation'], implode('&#160;&#160;', $item_nav)).'</span>';

                $item_body['subject']['title'] = '<h3 class="hn"><span class="item-num">'.forum_number_format(++$item_num).'</span> '.implode(' ', $item_title).'</h3>';
                if ($cur_set['sticky'] == '1')
                {
                    $item_subject_status['sticky'] = $lang_forum['Sticky'];
                    $item_status['sticky'] = 'sticky';
                }
    
                if ($cur_set['closed'] != '0')
                {
                    $item_subject_status['closed'] = $lang_forum['Closed'];
                    $item_status['closed'] = 'closed';
                }
    
                if (!empty($item_subject_status))
                    $item_subject['status'] = '<span class="item-status">'.sprintf($lang_forum['Item status'], implode(' ', $item_subject_status)).'</span>';
    
                $item_subject['starter'] = '<span class="item-starter">'.sprintf($lang_forum['Topic starter'], '<cite>'.forum_htmlencode($cur_set['poster']).'</cite>').'</span>';
    
                $item_body['subject']['desc'] = implode(' ', $item_subject);
                if (empty($item_status))
                    $item_status['normal'] = 'normal';

                $item_style = (($item_num % 2 != 0) ? ' odd' : ' even').(($item_num == 1) ? ' main-first-item' : '').((!empty($item_status)) ? ' '.implode(' ', $item_status) : '');

                $item_body['info']['replies'] = '<li class="info-replies"><strong>'.forum_number_format($cur_set['num_replies']).'</strong> <span class="label">'.(($cur_set['num_replies'] == 1) ? $lang_forum['Reply'] : $lang_forum['Replies']).'</span></li>';
                $item_body['info']['views'] = '<li class="info-replies"><strong>'.forum_number_format($cur_set['num_views']).'</strong> <span class="label">'.(($cur_set['num_views'] == 1) ? $lang_forum['View'] : $lang_forum['Views']).'</span></li>';

                ?>
                    <div class="main-item<?php echo $item_style ?>">
                        <span class="icon <?php echo implode(' ', $item_status) ?>"><!-- --></span>
                        <div class="item-subject">
                            <?php echo implode("\n\t\t\t\t", $item_body['subject'])."\n" ?>
                        </div>
                        <ul class="item-info">
                            <?php echo implode("\n\t\t\t\t", $item_body['info'])."\n" ?>
                        </ul>
                  </div>
        <?php

           }

        ?>
        </div>
    <?php
    
    }

?>

In what cases do you want to use https or http? Describe in more detail please

1,088

(1 replies, posted in General discussion)

Read this article about installation

1,089

(7 replies, posted in PunBB 1.2 bug reports)

In the PunBB 1.3.* go to <FORUM_URL>/admin/settings.php?section=setup and at the bottom of the page there is field for addition new links

Thanks, fixed in [952]

You want to say that you rename $db to $db_pun in 'include/common.php'? It's not a good way. Place code were you have problem here or send an e-mail to me

There is a way to include php-file in main.tpl. It's described here

Do you try to set

$cookie_domain = 'www.domain.com';
$cookie_path = '/';

in config.php?

Variable db  is a link identifier of MySQL connection for Joomla, for PunBB - its object for SQL-quires. Its initialization happens in file PUN_ROOT.include/common.php.   
This error mean that you call method "query" of variable, that is not an object. You don't need to do following for getting results:

$db = mysql_connect("server", "user", "password")or die("error message!");
mysql_select_db("dbname",$db)or die("error message 2!");

Also after line

echo 'Logged in as: <b>'.pun_htmlspecialchars($pun_user['username']).'</b>';

add this two lines to close connections for punbb:

$db->end_transaction();
$db->close();

Don't forget to recreate connection for Joomla.

1,095

(2 replies, posted in PunBB 1.3 discussion)

This topic should help you. You can add it without title and description lose smile

1,096

(4 replies, posted in PunBB 1.3 additions)

At the black background, I can't see what is wrong. Can you describe your problem?

When user logout, following actions are happened:

  • Deletion user from online table.

  • Update of last_visit field in table 'users'.

  • Set of new cookie

  • Removing of tracked topics.

How to do this you can find in file "login.php" at line 120.

1,098

(4 replies, posted in PunBB 1.3 bug reports)

Thanks, fixed in [951]

1,099

(13 replies, posted in PunBB 1.3 additions)

Here is query for getting last 20 posts. It is used Query Builder.

$query = array(
                'SELECT'    => 'p.id AS pid, p.poster AS pposter, p.posted AS pposted, p.poster_id, p.message, p.hide_smilies, t.id AS tid, t.poster, t.subject, t.first_post_id, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_replies, t.forum_id, f.forum_name',
                'FROM'        => 'posts AS p',
                'JOINS'        => array(
                    array(
                        'INNER JOIN'    => 'topics AS t',
                        'ON'            => 't.id=p.topic_id'
                    ),
                    array(
                        'INNER JOIN'    => 'forums AS f',
                        'ON'            => 'f.id=t.forum_id'
                    ),
                    array(
                        'LEFT JOIN'        => 'forum_perms AS fp',
                        'ON'            => '(fp.forum_id=f.id AND fp.group_id='.$forum_user['g_id'].')'
                    )
                ),
                'ORDER BY'    => 'pposted DESC',
                'LIMIT'        => '20'
            );

This code should be added after including the "include/common.php" file.

1,100

(10 replies, posted in PunBB 1.3 troubleshooting)

For changing post-links you need to add parameters to function forum_link, when links created (It happened in 12 forum files). I think the easiest way to do this changes - make an extension. Change code of core is not a good way for this.