Topic: 2 forums and same users?

Is it possible to have 2 forums and use the same userlist? Is it possible to have 2 forums and share a categori between them. For example use the same "off topic" on both forums?

Re: 2 forums and same users?

Same discussion: http://punbb.org/forums/viewtopic.php?id=12909

3

Re: 2 forums and same users?

Yes, it is possible, but u should to rewrite many queries.

Hm... every pixel has it's own destiny

4 (edited by Riklaunim 2006-08-30 22:37)

Re: 2 forums and same users?

seva wrote:

Yes, it is possible, but u should to rewrite many queries.

not realy. punBB uses include/dblayer/ db backend files and queries go throught them (for example mysql.php). If you edit query function it will work. Here is my old hack:

function query($sql, $unbuffered = false)
    {
    global $db_prefix;
    IF(ereg('rk_bans', $sql) or ereg('rk_groups', $sql) or ereg('rk_online', $sql) or ereg('rk_users', $sql))
        {
        $sql = str_replace($db_prefix.'bans', 'cms_rk_bans', $sql);
        $sql = str_replace($db_prefix.'groups', 'cms_rk_groups', $sql);
        $sql = str_replace($db_prefix.'online', 'cms_rk_online', $sql);
        $sql = str_replace($db_prefix.'users', 'cms_rk_users', $sql);
        }

if (defined('PUN_SHOW_QUERIES'))
..................

You can use strpos and not ereg tongue in my case forum have ***_rk_ prefix and cms_rk_ is the "main forum"

My site [PHP, Python, Linux]

Re: 2 forums and same users?

Don't use ereg, use preg tongue

6

Re: 2 forums and same users?

Riklaunim wrote:
seva wrote:

Yes, it is possible, but u should to rewrite many queries.

not realy. punBB uses include/dblayer/ db backend files and queries go throught them (for example mysql.php). If you edit query function it will work. Here is my old hack:

..................

You can use strpos and not ereg tongue in my case forum have ***_rk_ prefix and cms_rk_ is the "main forum"

It's a perversion wink And what if i run this query: 'INSERT INTO '.$db->prefix.'posts (message) VALUE (\'rk_groups\')'; ? So, it' a bad hack .. or mb i'm not correct?

Hm... every pixel has it's own destiny

Re: 2 forums and same users?

You're right, I believe it would change any mention of the forum prefix tongue