(22 replies, posted in General discussion)

There is enough div's and other tags just about everywhere to get away with just using 2 images (or 4 if you want all corners), but it certain places the SPAN tag is missing so you can't always rely on being able to just style "<h2><span>text</span></h2>" and release the style. I just did a global regex search and replace way back when I did this for one of my websites, and it worked well. The CSS on my site might a little messy to read as I never bothered to completely clean it up, but if you take a look at it you should find what you need to round most corners.


(9 replies, posted in General discussion)

Smartys wrote:
CodeXP wrote:

I have to say that I don't really see the benefit of compressing CSS, considering that they'll get cached client-side anyway and will remain so even if the page linking to it gets changed.

It depends on how many uniques you have. If you have 1000 unique visitors and a 10 KB stylesheet, that's 10 MB of bandwidth for stylesheets. If compression takes it down to 5 KB, that's 5 MB of bandwidth instead. Now, how about if you have 10,000 or 100,000 unique visitors? How about if some of those visitors have caching disabled?

As Bekko said, MediaWiki's CSS can exceed 30 KB.

Oh I do understand what you're saying, but I just don't think it's worth it in most cases. In cases of extreme traffic I'd think you'd run into other resource problems before you'd reach any bandwidth limits anyway.


(9 replies, posted in General discussion)

I have to say that I don't really see the benefit of compressing CSS, considering that they'll get cached client-side anyway and will remain so even if the page linking to it gets changed.

yemgi wrote:

indeed wich means the ACP can be in other languages than English, it just needs to be translated

Not really, as you can't just use a language pack to get the ACP in your preferred language, no matter how well translated it is. Why? Because a lot of the language strings are hard-coded into PunBB's source code.

The most important points for me in 1.3 is native utf8 support, a *proper* way to track read/unread topics (damn that timeout system in 1.2!) and extensions. Sure I can add all that using mods for 1.2, but at what price? There's a limit to how much time I can spend on keeping things updated, so being able to upgrade to a new minor version without risking breaking any of my mods would be really nice smile


(23 replies, posted in Programming)

Heh, I use a UserJS script in Opera to remove target=whatever from links. I absolutely hate it when websites tries to force me to open a link in a new tab/window. Using the javascript method mentioned in this thread is a better option than using the target attribute though, as you could just disable javascript for a specific site instead of being left with no alternative other than rewriting the pages client-side...

EDIT: I would also just like to add that if people are forgetting your site just because they didn't open a link in a new window, then your problem is the content and not the links.

oneless wrote:

My thinking behind removing the function instead of just hiding the link with CSS is, why have the server spend effort generating it when it`s not going to be used. Granted it may not make much of a diff but every little helps wink

The changes you have posted so far in this thread would have absolutely no effect on performance. Also, some of the changes doesn't even make sense. Why would you change:

$post_actions[] = '<li class="postreport"><a href="misc.php?report='.$cur_post['id'].'">'.$lang_topic['Report'].'</a>';


$post_actions[] = '';


Comment it out, don't just set it to null.


(14 replies, posted in PunBB 1.2 discussion)

Lucas Malor wrote:

Mmmmmmmhhhh...... Alpha? Nightly? What is it??? :-P

I don't think you could really call it either. It is simply the development branch smile


(14 replies, posted in PunBB 1.2 discussion)

Lucas Malor wrote:

You can view it and download it as zip at the development section:


I think it could be "publicized" a little more :-) Many test users could return more feedback, as other opensource projects (I'm thinking about Firefox)

I know you can download it from svn, but it is not a beta version wink


(3 replies, posted in PunBB 1.2 troubleshooting)

You don't need any code to do so. All you need to do is type in the numeric entity for it:

& #8226;

(remove the space between & and the #. I just added it so that this forum wouldn't convert it).

• As you can see it work just fine smile


(14 replies, posted in PunBB 1.2 discussion)

Lucas Malor wrote:
Tobi wrote:

Therefore I more or less stopped developing plugins for 1.2, which turned out to be a mistake.... wink

I'll try to install the beta 1.3 :-)

There is no such thing as a PunBB 1.3 beta release.

Add the following to your stylesheet:

div#brdheader #brdtitle {
    height: 80px; /* Replace with height of your header image */
    padding: 0

#brdtitle span, #brdtitle p {
    position: absolute;
    display: block;
    overflow: hidden;
    width: 1em;
    left: -999em

#brdtitle h1 {
    width: 500px; /* Replace with width of your header image */
    height: 80px; /* Replace with height of your header image */
    background: url('/path/to/your/image.jpg') top left no-repeat;

Just tested it on your page and it works just fine smile


(27 replies, posted in PunBB 1.2 discussion)

Yes, you are correct in that the first one is perfectly ok. As for the second one, just replace the current comment tags with the CDATA one and you'll be ok smile The cdata sections isn't always required for inline scripts either, but the problem you will often encounter without it is that you can not use any of the chars "<", ">" or "&" in your javascript if you leave it out, so you'd be *very* limited in what you could do with it.


(27 replies, posted in PunBB 1.2 discussion)

Hehe, stuff like that happens to all of us from time to time wink

By the way, I don't know if you are aware of it but when you are serving the pages as application/xhtml+xml the tags in the your style sheets are now case sensitive so if you haven't done so already, it's a good idea to look over them. Also, you need to serve javascripts slightly different depending on if you're using text/html or xml. In XML, they should be enclosed in a CDATA section, instead of the usual html comment tags.


(27 replies, posted in PunBB 1.2 discussion)

MattF wrote:

This last php/xml bit is driving me to distraction. big_smile

IE gets the correct header type, (text/html), and opens the forums.php, (running the portal mod), fine. Firefox gets the application/xhtml+xml header and tries downloading the forums.php file. Works fine with the same file renamed as forums.xml. I know I must be missing something obvious here, but can't find out what. big_smile

Are you including the XML declaration? If not, it needs to be the very first thing on the page. Just add…

echo '<?xml version="1.0" encoding="'.$lang_common['lang_encoding'].'" ?>';

…as the first thing you echo out from header.php.

Also, the extension doesn't matter one bit as long as you are sending the document with the correct mime type, and correctly identifies the document as xml.


(27 replies, posted in PunBB 1.2 discussion)

MattF wrote:

Cheers. smile I'll get that hardcoded charset altered to use lang_encoding too. Thanks for the pointer. smile Btw, like that theme on your site.

Hey, thanks for that smile I have a few more on that site as well, so if you wish to check them out just login with the following account:

Username: PunBB
Password: PunDemo

I make a few styles every now and them when I don't have anything more productive to do, but very few of them are actually uploaded...I just like playing around wink

I've also made a few changes to my own extern.php now, but I haven't bothered with Atom just yet (don't know if I'll ever, because I don't really need it).


(27 replies, posted in PunBB 1.2 discussion)

MattF wrote:

Cheers for the advice chaps.  smile Have just added a HTTP_ACCEPT statement to the atom script:

if (stristr($_SERVER["HTTP_ACCEPT"], "application/xml"))
        header ("Content-Type: application/atom+xml; charset=utf-8");
        header ("Content-type: text/xml; charset=utf-8");

and popped that on the testforum server. Is that code correct in it's design? Is it working as it should now? (I'm still getting used to this bit with regards to testing, so I'm not overly sure). big_smile

Thanks again for all the help on this one. I highly appreciate it. smile


It appears to work just fine smile The only change I would have made is to use $lang_common['lang_encoding'] instead of hard coding it for UTF-8.


(27 replies, posted in PunBB 1.2 discussion)

MattF wrote:

Sod's law that I get it right for once and then change it. big_smile big_smile Is it worthwhile doing that at the moment though, or is it better just leaving it on the incorrect but more accessible, (and not dependant on registered filetypes being setup in M$ correctly), option?

What I would have done is to do content negotiation to determine if the user agent accepts said mime type. That's what I do on one of my sites (though I haven't done anything with the extern.php script yet) and it works very well as you can see if you try opening the site in IE and a proper browser like Opera or FF smile

Really, all you should have to check for is whether or not


exists in the $_SERVER['HTTP_ACCEPT'] string.


(27 replies, posted in PunBB 1.2 discussion)

MattF wrote:

Just bet you to the post on that one. big_smile Sorted it. The post is just above yours. smile I'd used the header type I'd seen in another atom script, rather than just specifiying text/xml as in the rss script. That's what was causing the problem. Proper text output on it now. smile

While it might not prompt you to download the file anymore, you are now using an incorrect mime type to serve atom feeds. They should always be sent as…


…just like you used originally.


(19 replies, posted in PunBB 1.2 troubleshooting)

AndyDeacon wrote:

And I have one more question. See the icons. There are so dirty-placed. How I can centered icons like an QIP v8030 for example. There are so clean in QIP & ICQ.

I'm not quite sure I understand what you're asking, but if you're asking how to align the smilies vertically with the text you could try adding the following to your CSS:

div.postmsg img { vertical-align: text-bottom }

Don't know how/if that'll work in IE though.

Paul wrote:

I use FeedDemon and I am very happy with it. Actually happy enough to actually pay for it.

Same here, FeedDemon is great! smile

MattF wrote:
CodeXP wrote:

Think I'll stay away from the pbl blocklist for checks such as this (and just use the PBL and XBL),

The PBL section of Spamhaus is designed for use upon MX servers, not web servers. It bears no relation to anything web based. The sbl-xbl list is the one best served for web use. The zen list, (or the pbl list alone), should only be used for MX servers and nothing more.

Hehe, yeah I noticed that upon further investigation smile


(3 replies, posted in PunBB 1.2 troubleshooting)

You need to go to your "Administration" page, click "Permissions" and select "Yes" for "Image tag in signatures."

I like the look of it, but what happened to your markup?!? http://img20.imageshack.us/img20/8360/runawayij7.gif

@quaker: Yeah, I'd love to see some of these problems addressed in the 1.3 release, but even if they're not we still have the extension system which will make it a whole lot easier to implement solutions on your own.

@shieldwolf: The version you see in my original post is the latest version, so if you use that you should be ok.

quaker wrote:

all over the USA...

thanks.. for another spam stopper..haha... now i think that i have about 5 mods for that.

side note.. this is starting to be a very good idea..


I can see the value in such a mod, but I don't think I'll have any use for it though smile

As for protecting a forum against spam, it really is difficult. If only PunBB allowed you to automatically promote members based on numbers of posts etc., and allow you to specify what BBCodes etc. was available for the different groups (remove ability for posting links, images and all that until they've made at least 10-20 posts over X number of days), it would greatly improve the whole situation. The only way to do this today is by using mods, and to be honest, having to many of them just makes it to much work upgrading when a new PunBB version is out. I would think that we'll be much better of when 1.3 is out, what with the extension system and other improvements smile