601

(15 replies, posted in PunBB 1.3 extensions)

Thanks, for reporting. Bug was fixed in [1228].

602

(2 replies, posted in Discussions)

The "Reporting method" option defines how notifications about new reports are received. This option is not related with notifications about new topics/posts. There is no such option in the PunBB core.

This option in administration only sets the default value of the "E-mail settings" option in user's profile for new registered users.

604

(10 replies, posted in PunBB 1.3 discussion)

In this case script will look like:

<?php

define('FORUM_ROOT', './');
require FORUM_ROOT.'include/common.php';

$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
if ($id < 1)
    message($lang_common['Bad request']);

// Fetch some info about the topic
if (preg_match('~.*viewtopic.*~', $_SERVER['REQUEST_URI']))
{
    $query = array(
        'SELECT'    => 't.subject AS subject',
        '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'].')'
            )
        ),
        'WHERE'        => '(fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL'
    );
    $page = 'viewtopic';
}
else
{
    $query = array(
        'SELECT'    => 'f.forum_name AS subject',
        'FROM'        => 'forums AS f',
        'JOINS'        => array(
            array(
                'LEFT JOIN'        => 'forum_perms AS fp',
                'ON'            => '(fp.forum_id=f.id AND fp.group_id='.$forum_user['g_id'].')'
            )
        ),
        'WHERE'        => '(fp.read_forum IS NULL OR fp.read_forum=1) AND f.id='.$id
    );
    $page = 'viewforum';
}
$result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
if (!$forum_db->num_rows($result))
    message($lang_common['Bad request']);

list($subject) = $forum_db->fetch_row($result);

if ($page == 'viewtopic')
    $redirtect_url = str_replace('&amp;', '&', forum_link($forum_url['topic'], array($id, sef_friendly($subject))));
else if ($page == 'viewforum')
    $redirtect_url = str_replace('&amp;', '&', forum_link($forum_url['forum'], array($id, sef_friendly($subject))));

header('HTTP/1.1 301 Moved Permanently');    
header('Location: '.$redirtect_url);

?>

And the file "<FORUM_ROOT>/.htaccess" will be:

# BEGIN PunBB

<IfModule mod_rewrite.c>
# MultiViews interfers with proper rewriting
Options -MultiViews

RewriteEngine On

# Uncomment and properly set the RewriteBase if the rewrite rules are not working properly
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} viewtopic.* [OR]
RewriteCond %{REQUEST_FILENAME} viewforum.*
RewriteRule . redirect_viewtopic.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . rewrite.php [L]
</IfModule>

# END PunBB

Is this what you needed?

606

(10 replies, posted in PunBB 1.3 discussion)

I've created an example of how to redirect all request from viewtopic.php according to SEF-url.

  • Edit "<FORUM_ROOT>/.htaccess". It should be:

# BEGIN PunBB

<IfModule mod_rewrite.c>
# MultiViews interfers with proper rewriting
Options -MultiViews

RewriteEngine On

# Uncomment and properly set the RewriteBase if the rewrite rules are not working properly
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} viewtopic.*
RewriteRule . redirect_viewtopic.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . rewrite.php [L]
</IfModule>

# END PunBB
  • Create the file "<FORUM_ROOT>/redirect_viewtopic.php" with this code:

<?php

define('FORUM_ROOT', './');
require FORUM_ROOT.'include/common.php';

$id = isset($_GET['id']) ? intval($_GET['id']) : 0;
if ($id < 1)
    message($lang_common['Bad request']);

// Fetch some info about the topic
$query = array(
    'SELECT'    => 't.subject',
    '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'].')'
        )
    ),
    'WHERE'        => '(fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL'
);
$result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
if (!$forum_db->num_rows($result))
    message($lang_common['Bad request']);

list($topic_subject) = $forum_db->fetch_row($result);
header('Location: '.str_replace('&amp;', '&', forum_link($forum_url['topic'], array($id, sef_friendly($topic_subject)))));

?>

To create redirection for other forum links, you need to add corresponding RewriteCond to the "<FORUM_ROOT>/.htaccess" and add generation of the corresponding link to the file.

Fixed, thanks.

Thanks, fixed.

gmbrdilos wrote:

I for one installed a giant amount of extensions but it worked fine for a day (during which I didn't install anything) then next morning it started happening. I am the only person on my forum experiencing this but it is getting very very annoying.

Have you changed the file "<FORUM_ROOT>/config.php"? What extensions have you got installed?

610

(154 replies, posted in Supported extensions)

achtungbaby wrote:

Is it possible to add a notification by mail ?

There is an addition for pun_pm, it is called pm_email. Try it.

According to the cookie specification, any cookie set for one domain, must not be sent to any other domain. Try to search in google some information about cross-domain cookies, perhaps you will find something useful.

You can limit the forums to be searched at line 125 of "<FORUM_ROOT>/search.php" by editing the value of $forum_sql variable.

613

(3 replies, posted in PunBB 1.3 discussion)

Read this.

614

(3 replies, posted in PunBB 1.3 additions)

As I understand, you want to display several forums on one page? Or allow to display forums only with certain id?

615

(13 replies, posted in PunBB 1.3 troubleshooting)

Is "Allow BBCode \[img\] tag in posts" option enabled in <FORUM_URL>/admin/settings.php?section=features?

616

(98 replies, posted in PunBB 1.3 extensions)

demo-world wrote:

Tryed and installed the latest version (1216) but where are the field and buttons for adding a file ? These are not displayed when writing an post ? Is there a hint or must i activate somewhere it ?

This happens because of default administrator permissions in the DB. Today or tomorrow I will commit changes in the extension to SVN, and forum administrators and moderators will be allowed to add an unlimited number of attachments to posts.

Yes, it can. PunBB Forum supports UTF-8 encoding.

618

(13 replies, posted in PunBB 1.3 troubleshooting)

It works fine for me:
PunBB bbcode test
with BBCode:

[url=http://punbb.informer.com/forums/][img=PunBB bbcode test]http://punbb.informer.com/forums/img/test.png[/img][/url]
octavian_3009 wrote:

Is there a place where PunBB users can submit changes to be looked at and considered for future versions?

You can add it to the wiki page of pun_antispam.

620

(15 replies, posted in PunBB 1.3 extensions)

Try to enable debug mode as posted above.

621

(3 replies, posted in PunBB 1.3 discussion)

You can turn on the maintenance mode at the <FORUM_URL>/admin/settings.php?section=maintenance. All users, except you, will see the maintenance message instead of forum pages.

622

(6 replies, posted in PunBB 1.3 troubleshooting)

Try to set

$cookie_domain = 'forum.logistiqueconseil.org';

in the file "<FORUM_ROOT>/config.php".

623

(15 replies, posted in PunBB 1.3 extensions)

Don't forget to create backup of your DB and forum files manually before testing.

624

(21 replies, posted in News)

ridgerunner wrote:

Is the PunBB 1.2 branch going to continue to be maintained?

Yes, it is. If you have some suggestion or you have found some bugs, post it in an according forum.

625

(2 replies, posted in PunBB 1.2 discussion)

I think it has happened because of some errors in CSS style. Could you give us the link to your site?