Sorry, it seems it's in index.php =o

Anyways, this is the one:

// Print the categories and forums
$result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.redirect_url, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE fp.read_forum IS NULL OR fp.read_forum=1 ORDER BY c.disp_position, c.id, f.disp_position', true) or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());

That can be changed to:

// Print the categories and forums
$cid_sql = isset($_GET['cid']) ? "c.id=".intval($_GET['cid']) . " AND" : '';
$result = $db->query('SELECT c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.redirect_url, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster FROM '.$db->prefix.'categories AS c INNER JOIN '.$db->prefix.'forums AS f ON c.id=f.cat_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id='.$pun_user['g_id'].') WHERE '.$cid_sql.' fp.read_forum IS NULL OR fp.read_forum=1 ORDER BY c.disp_position, c.id, f.disp_position', true) or error('Unable to fetch category/forum list', __FILE__, __LINE__, $db->error());

Then, for a certain category, use this link:
index.php?cid=1 (change 1 to category id)

*goes to add it in the wiki*

Install my mod wink

2,253

(7 replies, posted in Feature requests)

He's right though. If you do integration and you put a file into another folder, none of the links work wink

2,254

(92 replies, posted in General discussion)

I used to have dual screens, but the scond one is now on another comp ^^

2,255

(11 replies, posted in Feature requests)

It would be quite the job to do that, but I suppose it's possible... You'd have to edit quite alot of queries tho.

It should be commented quite well. Try searching for it.

2,257

(92 replies, posted in General discussion)

http://icstrategy.midgetforhire.com/Ima … esktop.JPG

2,258

(33 replies, posted in PunBB 1.2 troubleshooting)

I experienced that SpinkBB doesn't really have full compatibility =/ The last skin I made with it was messing up my forum too.

##
##
##        Mod title:  install_mod.php warning
##
##      Mod version:  1.0
##   Works on PunBB:  Should work on every version
##     Release date:  2006-04-17
##           Author:  El Bekko
##
##      Description:  Adds an alert only visible for admins if a file install_mod.php
##                      is present in the PunBB root directory.
##
##     Difference with  
## previous version:  /
##
##   Affected files:  header.php
##                    main.tpl
##                    
##       Affects DB:  No
##
##            Notes:  None
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##

Download

It doesn't do that much, I reckon =/

Let me check...

This code checks if you're logged on:

function check_cookie(&$pun_user)
{
    global $db, $pun_config, $cookie_name, $cookie_seed;

    $now = time();
    $expire = $now + 31536000;    // The cookie expires after a year

    // We assume it's a guest
    $cookie = array('user_id' => 1, 'password_hash' => 'Guest');

    // If a cookie is set, we get the user_id and password hash from it
    if (isset($_COOKIE[$cookie_name]))
        list($cookie['user_id'], $cookie['password_hash']) = @unserialize($_COOKIE[$cookie_name]);

    if ($cookie['user_id'] > 1)
    {
        // Check if there's a user with the user ID and password hash from the cookie
        $result = $db->query('SELECT u.*, g.*, o.logged, o.idle FROM '.$db->prefix.'users AS u INNER JOIN '.$db->prefix.'groups AS g ON u.group_id=g.g_id LEFT JOIN '.$db->prefix.'online AS o ON o.user_id=u.id WHERE u.id='.intval($cookie['user_id'])) or error('Unable to fetch user information', __FILE__, __LINE__, $db->error());
        $pun_user = $db->fetch_assoc($result);

        // If user authorisation failed
        if (!isset($pun_user['id']) || md5($cookie_seed.$pun_user['password']) !== $cookie['password_hash'])
        {
            pun_setcookie(0, random_pass(8), $expire);
            set_default_user();

            return;
        }

        // Set a default language if the user selected language no longer exists
        if (!@file_exists(PUN_ROOT.'lang/'.$pun_user['language']))
            $pun_user['language'] = $pun_config['o_default_lang'];

        // Set a default style if the user selected style no longer exists
        if (!@file_exists(PUN_ROOT.'style/'.$pun_user['style'].'.css'))
            $pun_user['style'] = $pun_config['o_default_style'];

        if (!$pun_user['disp_topics'])
            $pun_user['disp_topics'] = $pun_config['o_disp_topics_default'];
        if (!$pun_user['disp_posts'])
            $pun_user['disp_posts'] = $pun_config['o_disp_posts_default'];

        if ($pun_user['save_pass'] == '0')
            $expire = 0;

        // Define this if you want this visit to affect the online list and the users last visit data
        if (!defined('PUN_QUIET_VISIT'))
        {
            // Update the online list
            if (!$pun_user['logged'])
                $db->query('INSERT INTO '.$db->prefix.'online (user_id, ident, logged) VALUES('.$pun_user['id'].', \''.$db->escape($pun_user['username']).'\', '.$now.')') or error('Unable to insert into online list', __FILE__, __LINE__, $db->error());
            else
            {
                // Special case: We've timed out, but no other user has browsed the forums since we timed out
                if ($pun_user['logged'] < ($now-$pun_config['o_timeout_visit']))
                {
                    $db->query('UPDATE '.$db->prefix.'users SET last_visit='.$pun_user['logged'].' WHERE id='.$pun_user['id']) or error('Unable to update user visit data', __FILE__, __LINE__, $db->error());
                    $pun_user['last_visit'] = $pun_user['logged'];
                }

                $idle_sql = ($pun_user['idle'] == '1') ? ', idle=0' : '';
                $db->query('UPDATE '.$db->prefix.'online SET logged='.$now.$idle_sql.' WHERE user_id='.$pun_user['id']) or error('Unable to update online list', __FILE__, __LINE__, $db->error());
            }
        }

        $pun_user['is_guest'] = false;
    }
    else
        set_default_user();
}

And this creates the cookie:

//
// Set a cookie, PunBB style!
//
function pun_setcookie($user_id, $password_hash, $expire)
{
    global $cookie_name, $cookie_path, $cookie_domain, $cookie_secure, $cookie_seed;

    // Enable sending of a P3P header by removing // from the following line (try this if login is failing in IE6)
//    @header('P3P: CP="CUR ADM"');

    setcookie($cookie_name, serialize(array($user_id, md5($cookie_seed.$password_hash))), $expire, $cookie_path, $cookie_domain, $cookie_secure);
}

Use the function pun_hash() It's in functions.php too.

2,262

(21 replies, posted in Programming)

Ok, this will have to be rewritten =/ You didn't use ANY of PunBB's integrated DB functions, so giving it out as a mod is no option (I know cos my first mod was like that and I got the full storm tongue)

PunBB uses cookies to check wink Try functions.php

2,264

(21 replies, posted in Programming)

Mail me >>

2,265

(13 replies, posted in PunBB 1.2 discussion)

Same as pogenwurst ^^

Almost done, and I must say it sure looks alot better now ^^

Yeah, the PunBB forums have no mods (as far as I know) except for the ads.

True... I think I'll just remake it to use the DB and you can just output in a file on command.

2,269

(0 replies, posted in General discussion)

Hey guys,

As you've already been of great help with other problems, I guess you're smart enough to solve this one too ^^

Do any of you know some sort of plugin for Intervideo WinDVD 5 so it can capture composite video using WDM? Like the TV plugin for Winamp does (I would use that one, but is unsopported for latest version). I tried VLC, but it didn't work too well (lagged alot) =/ Tried using CapTV, but refused to go into full-screen, ...
So I'm getting pretty desperate now tongue

Thx for your help ^^

-- Bekko

Just creating config.php, pasting the contents given and uploading it wink

2,271

(3 replies, posted in PunBB 1.2 troubleshooting)

Edit your *.css files smile Use search and replace on the current colour with the colour you want wink

I'd add it to main.tpl wink

2,273

(21 replies, posted in Programming)

quaker wrote:

im working on a ad manager for punbb
but i need someone to build the ap_mod for it..

http://nalan.org
in the advertisement block
and i added google adsense.

Tell me what you need smile

2,274

(4 replies, posted in Programming)

Err... you mean just accept them without asking?

2,275

(1 replies, posted in General discussion)

Try limit="#" wink