Just checked. It's not.

function message($message, $no_back_link = false)
{
        global $db, $lang_common, $pun_config, $pun_start, $tpl_main;

Just add $pun_user to that global line to make it available.

I would assume that $pun_user is not a global in the message function, at first guess.

It's not defeating the purpose at all. Any form of plugin/admin tool/script has to be written. If it's a mod, you can't always guarantee exactly how it's going to work, or how reliably. Admin tools are supplied with your db for a reason. Cron is always the best option for automated running of anything. UI tools have a use for people who aren't comfortable with shell/command line, but true dexterity and functionality are always obtained via the latter rather than the former.

1,129

(3 replies, posted in PunBB 1.2 troubleshooting)

Very few things changed between 1.2.15 and 1.2.16. Just upload 1.2.16, copy your config.php over and run the db update script, if you want the version number to reflect the change.

kevinnading wrote:

maybe you guys might want to implement an automated prune option where upon new user(so not to deal with cron jobs) it prunes non-verfied users that have been there a certain period of time or even an option of displaying them in the total user count and latest new user.

Cron and the proper db management tools are by far the best solution. UI's are an idle option.

kevinnading wrote:

id love to contribute but im on so many other projects already that i want to keep this program clean for easy updates which is why i dont simply change/fix these little things and i post the suggestions/problems here. i welcome more trolls to try to feed on me but be forewarned.. i might be new on these forums but im definately not new to the internet wink

Why would we want to waste our time? We do have lives and interesting things to do, thankyou.

For members, it pulls the e-mail address from the db, and just asks for their name and, (optional), message. The name is just due to the fact that what they enter in their profile for name may be meaningless to someone they know. They ain't always exactly truthful with their profile, big_smile and I don't believe the standard registration enforces the name field being filled in? The captcha, sender e-mail address and confirmation are only visible to guests.

Well, I've made the mod totally active on the test forum. big_smile It now has an 'Email link' button at the top of viewtopic, and I've integrated the captcha into it for guest use too. Didn't think it was wise to leave it wide open for anonymous use. big_smile

Still open to testing and suggestions. smile

Anyone fancy giving this a try and seeing what they think? The topic id is hardcoded whilst testing, and just e-mails the link to the standard first test post after an install. The uri is:

http://forums.bauchan.org/testforum/mod … .php?tid=1


I'm wide open to any suggestions on possible improvements and such. smile It's guest usable at the moment, but requires the sender e-mail entering twice, just as a precaution. For logged in users, it takes the sender e-mail address from the pun_user array.


Cheers,

Matt

1,134

(1 replies, posted in Programming)

The penny finally dropped. big_smile


$result = $db->query('SELECT t.id, t.posted, t.subject, t.poster, p.message, p.hide_smilies, p.posted AS pposted, f.forum_name AS forum, c.cat_name AS category FROM '.$db->prefix.'topics t LEFT JOIN '.$db->prefix.'posts p ON (p.topic_id=t.id AND t.posted=p.posted) INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'categories AS c ON f.cat_id=c.id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.moved_to IS NULL '.$where.' ORDER BY posted DESC LIMIT '.$postslimit) or error('Unable to fetch forum topics', __FILE__, __LINE__, $db->error());

It was due to retrieving the message content, I was still pulling from posts by topic id, so I've changed it to compare topic posted time by message posted time as in the above. Is that code above optimal, btw?


Cheers,

Matt

1,135

(1 replies, posted in Programming)

Just wondering if someone could give me a whack with the clue stick on this one. big_smile Trying to fetch a list of topics, (just the first message from), and it ain't working. big_smile It's bringing several posts from one topic, instead of just the first. My db skillls are letting me down yet again. What am I missing?

$result = $db->query('SELECT t.id, t.posted, t.subject, t.poster, p.message, p.hide_smilies, f.forum_name AS forum, c.cat_name AS category FROM '.$db->prefix.'topics t LEFT JOIN '.$db->prefix.'posts p ON p.topic_id=t.id INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'categories AS c ON f.cat_id=c.id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.moved_to IS NULL '.$where.' ORDER BY posted DESC LIMIT '.$postslimit) or error('Unable to fetch forum posts', __FILE__, __LINE__, $db->error());

The where var is one of either topic, forum or category id.


Cheers,

Matt

Noticed this site the other day:

http://www.loudblog.com/index.php

Your easiest method would be to use PunBB to manage users, then integrate that into your other site via this method:

http://punbb.org/docs/dev.html#integration

Jérémie wrote:

Personally, I can't imagine why this would be useful. It takes UI space, and can be done by hand easily... and it's not done that often.

But I've had various clients asking for it from time to time, so...

I know what you mean. I'm in the copy the link and e-mail it via the e-mail UA camp myself, but just noticed those links seem to be on quite a few sites. And you know what it's like once you start mulling an idea over...... big_smile

Edit: Just tried one on another website and found out what the general format is like. Looks straight forward enough to do. big_smile

lie2815 wrote:

I thought there is already a mod for this.

Not that I could find. The only e-mail related mod I found was for the digests.

What are the general opinions on the 'Email this to a friend' type link on webpages/forums? Trying to decide whether or not I should be a sad git and create a script for doing it. big_smile

1,141

(2 replies, posted in General discussion)

Cheers. smile Just on a related note, what do you do if someone contacts you regarding having been blocked by it from registering? Had one contact me a week or two since, due to the fact that his I.P was in the CBL, and was on at least its second consecutive listing for a Storm trojan infection.

1,142

(18 replies, posted in General discussion)

Paul wrote:

I don't get the problem. Surely all you have to do is to take the smallest sized favicon you've come across and make the background image that size. That way its certain to be covered.

I thought it would be that straight forward initially, but they're sods with favicons on some sites. big_smile I've got it now with an 8x8 image at the bottom of a 16x16 layer/frame with transparent background. Problem is with the likes of Metacafe, (as a prime example). Their favicon is 16x16, but the image is approx. only 8x8, and it is also placed in the bottom right of the layer, hence the background image is slightly visible past it.

As it is now though, (if I made the background image any smaller it would be ne'er use nor ornament), big_smile I can live with the odd quirky favicon making it partially visible. smile

1,143

(18 replies, posted in General discussion)

quaker wrote:

sound like danged if you do danged if you dont..

It would appear that's pretty much the outcome. big_smile I've settled finally on a small background image with the probability that it'll be slightly visible behind smaller favicons. Can't really find any other way. big_smile

Just on a sidetrack, btw, but still CSS related, does anyone have an idea how I can align these feed buttons correctly in Opera?

http://forums.bauchan.org/testforum/viewforum.php?id=1

Alignment is fine in everything else, (IE, Gecko, Mozilla) based, but Opera shows them way out of whack if I correct alignment for the others, and if I get rid of the negative margin, Opera displays them fine but nowt else. They're on a float: right setup, btw.


Cheers.

1,144

(18 replies, posted in General discussion)

quaker wrote:

can u not create a if statement?

With it being a non local image, it would mean connecting to the remote site and seeing what code was returned, to integrate it in that way. T'would be a quick way to create a self inflicted DoS. big_smile big_smile

1,145

(124 replies, posted in News)

oliversl wrote:

Also, having analytics and adsense in punbb.org should be a must.

A personal preference/wish, not a must. What one classes as necessary, others necessarily do not, and those most definitely are not necessities.

1,146

(18 replies, posted in General discussion)

Yup. It's an extract from the parser.

Finally managed to get the background image showing through just trying everything I could think of one by one. big_smile Ended up with this:

img.favicon {
        width: 16px;
        height: 16px;
        position: absolute;
        margin-left: -8px;
        margin-top: 1px;
        background: no-repeat;
        vertical-align: bottom;
        background-image: url(../images/icons/no_icon.png);
}

Only thing I'm wondering now is if there's a way to hide the background image if the favicon is shown, to avoid having both visible if the overlying icon is less in size than 16x16.

If you trust your users that much, I'd personally suggest not running a forum.

1,148

(18 replies, posted in General discussion)

Jérémie wrote:

You could do it server side (check, and output the appropriate src for the img tag in the html page displayed), but it will slow things down, probably a lot.

Aye, that's one thing I was wanting to completely avoid. Especially due to the fact that this is one of those purely cosmetic with no real need type scenarios. big_smile I'd like to get it working, but wouldn't introduce load specifically for it.

If not, CSS is probably the fastest way to go (use a background image behind the real one).

Just been trying that, and not for the life of me can I figure out how to do it, (although my CSS skills aren't exactly legendary). big_smile This is what I've tried so far. (Can class= be used for img tags, btw)?

img.favicon {
        background-image: url(./images/icons/no_icon.png);
        height: 16px;
        color: #ffffff;
}
<img class="favicon" src="'.$icon_url.'/favicon.ico" alt=""/>

Am I barking up the wrong tree with that? It just doesn't seem to want to work. If I put text in the alt tag, that displays white as set, but the background image won't display if there is no favicon.ico.


Cheers.

1,149

(18 replies, posted in General discussion)

Smartys wrote:

It wouldn't allow a URI wink

I must be going blind. I'd never noticed this post 'til just now. big_smile

1,150

(18 replies, posted in General discussion)

I'd never considered using CSS for it. I'll have a dig through and see what I can find there. I'm trying to ditch any javascript I don't really need, so CSS would be the preferable way if it'll work. I'll post it up if I find a method. Cheers again Smartys. smile