1,526

(6 replies, posted in News)

Everyone cross their fingers that we don't need to wait too long!

BBClone is a PHP statistics system. While it isn't lightweight like PunBB, overall it is very high quality. Anyway, I use it to get more detailed statistics on visits to my forums. To use it with your forums, download and install it, then insert the following code in a file such as header.php (I have it below the <title> tags):

// Edits to use BBclone
define("_BBC_PAGE_NAME", $page_title);
define("_BBCLONE_DIR", "bbclone/");
define("COUNTER", _BBCLONE_DIR."mark_page.php");
if (is_readable(COUNTER)) include_once(COUNTER);

Be sure that it's between <?php and ?>. Change "bbclone/" on the second line with respect to where BBClone is installed on your server.

That's simply the code have BBClone start logging visits; I'll post how to use it to add some extra stats to your index page later on.

hnstmn wrote:

Can anyone provide this Mod for me for a (1.2.6) version?

Olders mods sometimes work on newer versions of PunBB - you might as well try. Just make sure to backup the affected files before you attempt the mod.

Sorry, I wasn't clear enough - I meant how, behind the scenes it works. What files, database tables, etc does it modify?

Interesting... I might have to try it. Could you give us a bit more info on how it works?

1,531

(14 replies, posted in PunBB 1.2 discussion)

I believe (though I'm not certain)  that the Extra BBCodes mod has unordered list support.

Reines wrote:

Yea i have noticed that afew times on my forums too, and although not vital - it can be annoying tongue

Sorry, but I've gotta disagree - users could find this very frustrating if they end up doing what I did - deleting the duplicate(s), only to find that both the duplicate(s) and the original are gone!

Good idea. I'll add it to my forum soon.

OK - thanks for looking in to it.

Never mind - after 5 minutes or so of duplicate posts, things are back to normal. Wierd.
Someone can delete this thread now.

For some reason, my posts are appearing multiple times all of a sudden. They did not just a few hours ago.
For example:
http://punbb.org/forums/viewtopic.php?id=8544
http://punbb.org/forums/viewtopic.php?pid=50391

On the latter thread, the "something went crazy" I mentioned was referring to the fact that I saw duplicate posts - which I deleted. However, both posts were deleted, not just the duplicate.

mk.3 wrote:

I found the line in redirect() and in navlinks() but from time to time i still get sent to index.php instead of board.php

I'll see whats around line 235 it might be something different. Thanks.

Something went crazy with my posts - and now there gone.
Anyway- to summarize my two posts, include/functions.php at around line 235 has the code for the "Index" link in the navbar along the top of every page.

1,538

(8 replies, posted in General discussion)

While Greasemonkey can block ads, in most cases the Firefox extension Adblock or Adblock Plus is more efficient if ads are what you're concerned with.

Smartys wrote:

In the code, in the pun_mail function, replace $pun_config['o_mailing_list'] with the email address (enclosed in 's)

Thanks! It worked!

And thanks to CodeXP for the mod!

New code:

<?php
// Edits for RSS autodiscovery
echo ("<link rel=\"alternate\" type=\"application/rss+xml\" title=\"New topics feed.\" href=\"extern.php?action=new&type=rss\"/>\n<link rel=\"alternate\" type=\"application/rss+xml\" title=\"Recent activity feed.\" href=\"extern.php?action=active&type=rss\"/>\n");
if ($id) { if (ereg('viewforum.php', $REQUEST_URI)) {
$auto_discover_new = '<link rel="alternate" type="application/rss+xml" title="New topics feed for forum #'.$id.'." href="extern.php?action=new&type=rss&fid='.$id.'"/>';
$auto_discover_active = '<link rel="alternate" type="application/rss+xml" title="Recent activity feed for forum #'.$id.'." href="extern.php?action=active&type=rss&fid='.$id.'"/>';
echo ($auto_discover_new . "\n" . $auto_discover_active . "\n");
}}
?>

Seems to work fine now.

Darn it - I just now noticed a mistake. It interprets topic IDs as forum IDs. I'll see if I can fix that.

Would CodeXP be kind enough to do this (unless of course he has another plan), or can someone tell me how to implement it myself (sorry if that sentence sounds rude or sarcastic - it's not supposed to). I really want to install this mod.

To add RSS autodiscovery links (for Firefox livemarks) to my forum, I used the following code:

<?php
// Edits for RSS autodiscovery
echo ("<link rel=\"alternate\" type=\"application/rss+xml\" title=\"New topics feed.\" href=\"extern.php?action=new&type=rss\"/>\n<link rel=\"alternate\" type=\"application/rss+xml\" title=\"Recent activity feed.\" href=\"extern.php?action=active&type=rss\"/>\n");
if ($id) {
$auto_discover_new = '<link rel="alternate" type="application/rss+xml" title="New topics feed for forum #'.$id.'." href="extern.php?action=new&type=rss&fid='.$id.'"/>';
$auto_discover_active = '<link rel="alternate" type="application/rss+xml" title="Recent activity feed for forum #'.$id.'." href="extern.php?action=active&type=rss&fid='.$id.'"/>';
echo ($auto_discover_new . "\n" . $auto_discover_active . "\n");
}
?>

Add it to header.php. I suggest putting in under "</title>" around line 70.
My PHP isn't that great, so revisions are welcome.

If for some reason you want to see this in action (if you would call it "action"), click the link in my sig.

I hope this helps somebody!

EDIT: See below for new code.
EDIT: It appears that keyes has addressed this kind of thing already. You might try using code from both this thread and the other one to have the most effective solution.

Connorhd wrote:

but you need admin access to change the groups, so if you can change the groups you can change the email

Excuse me if I sound stupid - I am a novice at both PHP and security - but could you just use a hard-coded email, rather than the one specified in the admin panel?