226

(8 replies, posted in Feature requests)

smile http://dev.punbb.org/changeset/783

Speaking of unverified users, could they be listed as that (by title) on userlist.php?

It looks like it should be available as:

$cur_post['posted']

228

(4 replies, posted in PunBB 1.2 discussion)

Try this?

Open: search.php

Find:

            // If it's a search for todays posts
            else if ($action == 'show_24h')
            {
                $result = $db->query('SELECT t.id FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_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) AND t.last_post>'.(time() - 86400)) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());
                $num_hits = $db->num_rows($result);

                if (!$num_hits)
                    message($lang_search['No recent posts']);
            }

Replace with:

            // If it's a search for todays posts
            // mod: search for the X most recent posts
            else if ($action == 'show_24h')
            {
                $result = $db->query('SELECT t.id FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_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 t.last_post DESC LIMIT 10') or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error()); // AND t.last_post>'.(time() - 86400)
                $num_hits = $db->num_rows($result);

                if (!$num_hits)
                    message($lang_search['No recent posts']);
            }

http://www.php.net/empty

The following things are considered to be empty:

"" (an empty string)
0 (0 as an integer)
"0" (0 as a string)
NULL
FALSE
array() (an empty array)
var $var; (a variable declared, but without a value in a class)

teenagegluesniffer wrote:

I would want to know this, before registering at a website....that way I wouldn't register there.

Off topic: Admins could always just read the database, you know? Isn't that what privacy policies are for?

Vanslyde wrote:

so now.. how about clickable footers?

That may be possible with 1.3: http://dev.punbb.org/ticket/41

232

(11 replies, posted in PunBB 1.2 discussion)

If KDE is on there, I never saw it. The machine just boots to an informational text screen.

233

(4 replies, posted in Feature requests)

Paul wrote:

The only problem of course is what if its not code i.e. sombody could use the bbcode code tags to post ascii art in which case the <code> tag is semantically wrong. Strictly speaking there should also be a bbcode pre tag.

Strictly speaking, there should also be a <kbd> tag for providing, say, shell commands.

Edit: Maybe it's ascii art for a command line tool. tongue

No, it shouldn't.

Open: header.php

Find:

$tpl_main = str_replace('<pun_title>', '<h1><span>'.pun_htmlspecialchars($pun_config['o_board_title']).'</span></h1>', $tpl_main);

Replace with:

$tpl_main = str_replace('<pun_title>', '<h1><span><a href="'.$pun_config['o_base_url'].'/index.php">'.pun_htmlspecialchars($pun_config['o_board_title']).'</a></span></h1>', $tpl_main);

Adjust stylesheets as desired?

Edit: This inline style seems to work too?

style="text-decoration: none; color: inherit;"

235

(9 replies, posted in PunBB 1.2 discussion)

Rich Pedley wrote:

Also, are there any changes in the database that would affect existing installations?

http://dev.punbb.org/browser/branches/p … update.php

236

(11 replies, posted in PunBB 1.2 discussion)

It's a virtual machine running Ubuntu (w/ 2.6.x kernel)? I guess it has PunBB pre-installed.

Edit: It's Ubuntu v6.06.2 with PHP v5.1.2, MySQL 5.0.22, and PunBB v1.2.14 all included and setup (you just enter the admin username/password/e-mail for PunBB).

Edit: If you try it, you can use port 3000 to configure the networking options.

Edit: It includes the (PunBB) backup plugin too.

Edit: Forgot to mention Apache v2.0.55.

237

(2 replies, posted in General discussion)

Cookies won't work across multiple domains?

I would just have one of the domains redirect you to the other one, and then only use the other one for your site.

238

(11 replies, posted in Programming)

I was just having a conversation about people who don't search for themselves?

http://httpd.apache.org/docs/1.3/howto/htaccess.html

239

(2 replies, posted in PunBB 1.2 discussion)

admin_groups.php

Rickard wrote:

/me runs off to assign a ticket to himself.

smile http://dev.punbb.org/ticket/61

241

(16 replies, posted in PunBB 1.2 discussion)

Side note: Here's an example of Facebook's discussion boards (notice the "replied to whoever's post" link and "X replies" parts?): http://img444.imageshack.us/img444/244/ … ionda5.png

242

(16 replies, posted in PunBB 1.2 discussion)

I expected that reply; Facebook is a social website, not something you can download. smile

Try this? note that "or" will appear for all languages. If this matters to you, then you might be able to edit the language files instead of the cache.php file?


Open: include/cache.php

Find:

        $output .= "\t\t\t\t".'<form id="qjump" method="get" action="viewforum.php">'."\n\t\t\t\t\t".'<div><label><?php echo $lang_common[\'Jump to\'] ?>'."\n\n\t\t\t\t\t".'<br /><select name="id" onchange="window.location=(\'viewforum.php?id=\'+this.options[this.selectedIndex].value)">'."\n";

Replace with:

        $output .= "\t\t\t\t".'<form id="qjump" method="get" action="viewforum.php">'."\n\t\t\t\t\t".'<div><label><?php echo $lang_common[\'Jump to\'].\' <a href="search.php?action=show_24h">\'.strtolower($lang_common[\'Show recent posts\']).\'</a> or:\' ?>'."\n\n\t\t\t\t\t".'<br /><select name="id" onchange="window.location=(\'viewforum.php?id=\'+this.options[this.selectedIndex].value)">'."\n";

Edit: on second thought, you may want to change the wording for the link, so it would probably be better to change the common.php files for any lanaguages you use, instead of changing the above function?

244

(16 replies, posted in PunBB 1.2 discussion)

Side note: This is how Facebook's discussion boards work, if anyone is familiar with that?

Replace the line I gave you with this:

    echo "\t\t\t".'<p><a href="search.php?action=show_24h">'.$lang_common['Show recent posts'].'</a></p>'."\n";

You can place that before or after the "Jump to" list (shown here):

    // Display the "Jump to" drop list
    if ($pun_config['o_quickjump'] == '1')
    {
        // Load cached quickjump
        @include PUN_ROOT.'cache/cache_quickjump_'.$pun_user['g_id'].'.php';
        if (!defined('PUN_QJ_LOADED'))
        {
            require_once PUN_ROOT.'include/cache.php';
            generate_quickjump_cache($pun_user['g_id']);
            require PUN_ROOT.'cache/cache_quickjump_'.$pun_user['g_id'].'.php';
        }
    }

Try this? In footer.php, find:

    // Display the "Jump to" drop list

Before, add:

    echo "\t\t\t".'<dl id="searchlinks" class="conl">'."\n\t\t\t\t".'<dt><strong>'.$lang_common['Search links'].'</strong></dt>'."\n\t\t\t\t".'<dd><a href="search.php?action=show_24h">'.$lang_common['Show recent posts'].'</a></dd>'."\n\t\t\t".'</dl>'."\n";

247

(16 replies, posted in PunBB 1.2 discussion)

Donny Bahama wrote:

then anyone could flag an objectionable post - and when they did, it would instantly go away.

You might be interested in this: http://www.punres.org/files.php?pid=331

So, is this supposed to be like a guestbook?

It's almost exactly like editing post.php

Find:

                <label><strong><?php echo $lang_common['Message'] ?></strong><br />

Before, add:

                <?php require PUN_ROOT.'mod_easy_bbcode.php'; ?>

249

(66 replies, posted in General discussion)

hcgtv wrote:

Now, now, we were all Newbies at one point.

Still off topic: I'm not trying to make fun of anyone. I felt it safe to guess that the op has, at best, built-in ZIP support from WinXP and maybe not be able to make use of the linked file without additional effort.

250

(66 replies, posted in General discussion)

Off topic: Any bets on whether or not the OP has software to open a rar file?