26

(28 replies, posted in PunBB 1.3 extensions)

Ok. Update my first post.

27

(28 replies, posted in PunBB 1.3 extensions)

You right. sad I gix it now.

28

(28 replies, posted in PunBB 1.3 extensions)

And... And what? Constant PUN_ROOT defined before and like local path.

If you say "it XSS" you need check it first. Ok? wink

29

(28 replies, posted in PunBB 1.3 extensions)

Do not use this code on a live site. Just in a quick glance at it I can see it opens a site up to the execution of arbitrary PHP files.

Where?

30

(28 replies, posted in PunBB 1.3 extensions)

1 bug with secutity token. I dont know how make it working without ckick "confirm". Have ideas?

upd fix in 0.3.

31

(2 replies, posted in PunBB 1.3 troubleshooting)

Oh, sorry. I realy download old version. smile

[???? ???? ???-?? ???????? ????????? ??? "? ????? ???????? ??-?????????" ????, ????, ???????????.]

upd version 0.5.

This extension for make new forum without copy files and once DB for all users, posts, topics, etc.

I.e. you have domain example.com and some subdomains like 1.example.com, 2.example.com, 3.example.com and each domain have forum. 1 domain 1 copy PunBB. This sux. I know because i have.

Ok, for my opinion good idea select for all another subdomains some categories from first domain (main copy PunBB). Install first and last copy on example.com and use it copy everywhere.

http://www.punres.org/files.php?pid=502

1) Copy from folder "upload" to you PunBB directory.
2) From folder "extras" copy files to you (sub)domain directory and in index.php change path to you PunBB directory.
3) Set permissions 0777 to folder "extensions/domain/config".
4) In 0.5 in admin panel exists simple domain settings manager: add domain, edit, delete. Use it for make settings.

I know bug with quick jump. Need add some to var $pun_user['g_id'] (footer.php). But, it wrong.

33

(2 replies, posted in PunBB 1.3 troubleshooting)

function DBLayer($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect)
    {
        $this->prefix = $db_prefix;

        if ($p_connect)
            $this->link_id = @mysql_pconnect($db_host, $db_username, $db_password);
        else
            $this->link_id = @mysql_connect($db_host, $db_username, $db_password);

        if ($this->link_id)
        {
            if (@mysql_select_db($db_name, $this->link_id))
                return $this->link_id;
            else
                error('Unable to select database. MySQL reported: '.mysql_error(), __FILE__, __LINE__);
        }
        else
            error('Unable to connect to MySQL server. MySQL reported: '.mysql_error(), __FILE__, __LINE__);

        // Setup the client-server character set (UTF-8)
        if (!defined('PUN_NO_SET_NAMES'))
            mysql_query('SET NAMES \'utf8\'', $this->link_id) or error(__FILE__, __LINE__);
    }

Set utf-8 before DB select.

function DBLayer($db_host, $db_username, $db_password, $db_name, $db_prefix, $p_connect)
    {
        $this->prefix = $db_prefix;

        if ($p_connect)
            $this->link_id = @mysql_pconnect($db_host, $db_username, $db_password);
        else
            $this->link_id = @mysql_connect($db_host, $db_username, $db_password);

        // Setup the client-server character set (UTF-8)
        if (!defined('PUN_NO_SET_NAMES'))
            mysql_query('SET NAMES \'utf8\'', $this->link_id) or error(__FILE__, __LINE__);

        if ($this->link_id)
        {
            if (@mysql_select_db($db_name, $this->link_id))
                return $this->link_id;
            else
                error('Unable to select database. MySQL reported: '.mysql_error(), __FILE__, __LINE__);
        }
        else
            error('Unable to connect to MySQL server. MySQL reported: '.mysql_error(), __FILE__, __LINE__);
    }

And utf work.

daris, replace in user_agent.php (78):

$ua = '<img src="extensions/browser_and_os_icons/user_agent/os/' . htmlspecialchars(ereg_replace('[^a-z0-9_]', '', strtolower($ua_os))) . '.png" title="' . htmlspecialchars($useragent) . '" alt="' . htmlspecialchars($ua_os) . '" style="margin-right: 1px"/>' . '<img src="extensions/browser_and_os_icons/user_agent/browser/' . htmlspecialchars(ereg_replace('[^a-z0-9_]', '', strtolower($ua_browser))) . '.png" title="' . htmlspecialchars($useragent) . '" alt="' . htmlspecialchars($ua_browser) . '" style="margin-left: 1px"/>';
    global $base_url;

    $ua = '<img src="'.$base_url.'/extensions/browser_and_os_icons/user_agent/os/' . htmlspecialchars(ereg_replace('[^a-z0-9_]', '', strtolower($ua_os))) . '.png" title="' . htmlspecialchars($useragent) . '" alt="' . htmlspecialchars($ua_os) . '" style="margin-right: 1px"/>' . '<img src="'.$base_url.'/extensions/browser_and_os_icons/user_agent/browser/' . htmlspecialchars(ereg_replace('[^a-z0-9_]', '', strtolower($ua_browser))) . '.png" title="' . htmlspecialchars($useragent) . '" alt="' . htmlspecialchars($ua_browser) . '" style="margin-left: 1px"/>';

Else not work with SEF URL's.

P.S. And in new version need replace ereg_replace() to preg_replace(). preg_* much faster.