2,801

(14 replies, posted in PunBB 1.2 troubleshooting)

bernt wrote:

I think I know what the problem could be; In the file no_common.php an apostrophe was not closed (\') - could this cause such problems?

If you mean single quotation marks were not closed i.e. instead of
'xxxx'
you had
'xxx
then that would do it. I did exactly the same thing when editing an English language file. It throws up an error because there is an unterminated string.

2,802

(11 replies, posted in PunBB 1.2 discussion)

Kennel wrote:

Hmm, that's not an RSS feed?

Here are the RSS feeds for these forums:

- New topics
- Recently active topics

Sorry, my post was misleading. I am using the first link. The script punrss.php is a xml to php parser. I didn't think anybody would want a demo of raw xml. The way I have done it is, I think, the way most people would use a news feed on a real site (subject to formating/layout). And for my next trick, the user - xml - vCard parser (maybe). Its amazing what you can find as Hotscripts these days.

2,803

(11 replies, posted in PunBB 1.2 discussion)

I was just testing the PunBB rss feed and thought I might as well leave it up briefly as a demo that it works.

http://www.post21.co.uk/punrss/punrss.php

2,804

(5 replies, posted in PunBB 1.2 discussion)

Own up, you just wanted to fill that empty column didn't you.

Off topic but sort of related. All along I've been thinking that the breadcrumbs should be on a separate row. The appearance of the moderators links confirms it. It's OK at higher resolutions but at 800x600 things are beginning to look a bit scrunched.

Just a little thing I have been working on.
http://post21.co.uk/punsg
Not quite finished yet and the idea is for users to install it on their own pc's so they can test their styles without having to install server/php/mysql.

Uploaded here
http://www.post21.co.uk/sigma12/bd_preview1.gif

No problem. Email it to me.

2,808

(2 replies, posted in PunBB 1.2 troubleshooting)

The borders are set by using cellspacing="1" which effectively allows the background colour of .punmain to blead through 1px gaps between cells to create the border. To change this you are going to have to edit every file you wish to change; first to remove all the borders and then use the stylsheet to put back the borders you do want.

Hi CSpotKill. One thing I would say is that I am not trying to compete with your efforts. In any event, my skills are not upto it. I am just suggesting some easy to implement changes which would give end users far more options and more control via the stylsheet and hopefully streamline the markup in the process. I am actually becoming more convinced that your approach is the best way to go in the long run. Think of my suggestions as a quick fix to what I percieve as PunBB's only weakness i.e. limited styling possibilities rather than a suggested design strategy.

P.S. You should have called yourself CSpotSkill smile

P.P.S. I just realised I could reduce each table to two cells instead of 4 or maybe even one cell. That would enable the easy use of borders and dispose of cellspacing="1". If I float the contents of the cell it would even allow for user info and the post to be transposed right to left (do I hear the sound of 1.2 Billion Chinese cheering). In other words, use the table as no more than a rigid frame around a pure css interior.

Have to go now. Lunch break over. I seem to have an email from somebody called Yana in the Ukraine who wants to get acquainted. I think I will forward her email to that nice bunch of Nigerian bankers who have kindly offered to make me rich.

Hi CSpotKill. One thing I would say is that I am not trying to compete with your efforts. In any event, my skills are not upto it. I am just suggesting some easy to implement changes which would give end users far more options and more control via the stylsheet and hopefully streamline the markup in the process. I am actually becoming more convinced that your approach is the best way to go in the long run. Think of my suggestions as a quick fix to what I percieve as PunBB's only weakness i.e. limited styling possibilities rather than a suggested design strategy.

P.S. You should have called yourself CSpotSkill smile

P.P.S. I just realised I could reduce each table to two cells instead of 4 or maybe even one cell. That would enable the easy use of borders and dispose of cellspacing="1". If I float the contents of the cell it would even allow for user info and the post to be transposed right to left (do I hear the sound of 1.2 Billion Chinese chearing). In other words, use the table as no more than a rigid frame.

Have to go now. Lunch break over. I seem to have an email from somebody called Yana in the Ukraine who wants to get acquainted. I think I will forward her email to that nice bunch of Nigerian bankers who have kindly offered to make me rich.

I now have each post in a separate table again but still no inner tables so thats still a decent reduction in tables. I have tested it and it works perfectly with wide posts. I will upload it after some more tinkering.

I am interested in seeing how the great CSS experiment ends up though I am not entirely optomistic largely because the only board to use pure css is a bit of a dogs breakfast and isn't even that quick. PunBB v.1.4 quite possibly, but not v.1.2. I am all in favour of designing websites using CSS but a BBS system isn't just a website, it's an interface to a database.

You might be interest in this
http://css.nu/articles/table-in-css.html
The three column example can be adapted to recreate index.php and probably viewforum.php without tables. I have tried it and came up with a reasonbly accurate rendition of index.php at least at a fixed width.

chacmool wrote:

Yeah, one table per post should be enough to fix it. On CSpotkill's page the table have the right size, but the text expands outside the table instead (it's not finished yet either though).

That's probably the same solution I was thinking of. You let a box containing long text or an image expand beyond the side of the table. Much easier to do if you don't have any tables in the first place of course. Tables are remarkly robust at trapping elements inside them, which is why people like them.

Thanks. I knew there would be problems I hadn't considered. Some more work to do then. Though I still convinced that four tables per post is overkill.

I just tried using the code tag for a long post. I doesn't actually break the the board, it just causes the whole of the table to expand rather than just one row. However, I guess most people just want the one row to expand. I still think I can get it to work with a lot less tables than used currently but we shall see.

[edit]
It can be fixed using overflow:scroll/auto which gives a horizontal scrollbar or probably by using floats. The first solution is ugly and the second less stable than tables. I think I will put each post back into a table but only the one table, the inner tables stay out. Thats still a 75% reduction in the number of tables and associated tags so that will have to do. Anyway, the objective was to improve styling options, this was just a sideline.

Further to previous discussions on another thread I have been having a rethink regarding the styling of this board.

The situation it seems is that a significant number of users and potential users people would like to do some more advanced stying or thier own or download distributed styles (this is an assumption on my part largely because of the popularity of skinning forums for other boards). Using templating or anything else which either bloats PunBB or makes it harder to achieve site integration is out. Pure CSS is a possibility but my instinct is that is not something for v.1.2. That leaves one option, styling purely through the stylesheet. The good news is that it is possible to come up with some tasty styles with just a stylesheet to work with. The bad news is it is not possible with the stylesheet as it is now. In order to style something you have to have something to style. That means rather more board elements getting thier own class or id. The key is to identify what are distinct elements which are worthy of individual styling. It also means less use of a particular class for a large number of elements, punhead and punmain for example. To avoid people having to hack about with the php files it would also be desirable to  move as many of the inline styles as can be achieved to the stylesheet.

I have made a start on this and quite by accident discovered I could also remove whole chunks of code particularly nested tables without affecting the boards appearance or functioning in any way. In particular viewtopic.php generates a new table for each post which also contains 3 nested tables. On a page with 20 posts thats 80 tables (including nested tables) plus two tables for the header row. With a bit of tinkering I seem to have got this down to a grand total of 1 table irrespective fo the number of posts. In terms of file size the generated page from viewtopic.php with 5 posts is 12.5kb, my version 10.7kb. This is not a huge difference but the difference increases with the number of posts and removing the number of tables in itself should lead to a spead increase.

If you want to take a look go to

http://www.post21.co.uk/punbb

Be warned though, there is nothing exciting there, the whole point of the demo is to show that the board still looks the same despite my pruning of markup. Tested in IE5(win) IE5.5(win) Mozilla 1.4, Firebird 0.7, IE6(win) and Opera 7. Can anybody can test it in IE5(Mac), Safari or Linux browsers I would be grateful. The idea is that you should look at the source not just the page.

This is a list of the total changes to the board so far for those who may be even remotely interested.

1. Replace cellpadding="4" with cellpadding="0" throughout. All padding is now handled by the stylesheet.

2. Remove tables from viewtopic. The loop now renders each post in a new row rather than a new table. Nested tables removed. As a nice side effect, the double border between the header row and the first post has vanished.

3. Rewrite the functions for creating the main navbar and links appearing at the bottom of posts so all of the separator characters are handled by the implode function. The menu seperator character is now in the language file so it can be changed easily.

4. New classes/ids' introduced. At the moment there are only a couple the most significant of which is #punpostactions. This allows the styling of the links at the foot of each post. As a demo I have styled them as rollovers using nothing more than the stylesheet.

To Do

Split up .punmain into punmain_head, punmain_main, punmain_foot and punmain_copyright. This will allow seperate styling of the main board elements. Also makes it easier to seperate board elements using margin settings thus diposing of spacer tables (less tables = more speed).

New classes for the board header, .punheader, punlogo, puninfo.

New id for primary navigation .punnavbar.

A new class for the New Post links etc.

Get rid of all the other nested tables and replace them with Divs, Spans and paragraphs as appropriate and then assign appropriate new classes and id's. Users don't have to use the new classes and id's but if they are there to be used if required.

Apologies for another unduly verbose post. It may be of interest to someone and to others I offer it as a cure for insomnia smile

It's coming hopefully sooner rather than later.

2,816

(93 replies, posted in PunBB 1.2 discussion)

Kennel wrote:

ps21:
The layout you proposed is an alternative. However, I do prefer a solution where you can change styles by simply replacing the CSS file. Involving the templates complicates things a bit. Multiple styles would mean multiple templates. Multiple templates means more work for people who have made changes to their templates to integrate PunBB into their website design. Also, I really don't mind the fact that changing the design would involve a lot of work on the code. We'll worry about that later smile

Edit: One of the things I don't like about a lot of other BB software is the fact that everything is based on templates. Sure, it is powerful and you can change the appearance drastically for every single piece of information that is displayed, but it's a pain to work with. Anyone who has worked with vBulletin will agree with me on this. I'm not saying your proposal is anything like vBulletin, but it is a shift towards a more template based design.

Point taken. The only reason I was proposing it is I have become rather attached to this script and would like to see it in as wide a use as possible. I am just worried that the inability to distribute real skins could turn out to be PunBB's Achilles heel. Being able to make a board look unique is no longer seen as a geeky thing to do, it has become something of an essential feature for a lot of potential users. I am wondering how many people who were impressed with PunBB's speed, clean coding and lack of bloat and who really wanted to be able to use it ended up downloading phpBB simply because of styling capabilities. Of course the ideal solution is skinning via the stylesheet but even with a pure CSS layout there has to be a greater subdivision of board elements to make skinning viable.

Perhaps I should explain why I started tinkering with main.tpl. I tried to do something fairly simple which was to wrap pun_main and the other box elements in divs to create 3d borders which would look good in all browsers (insert/outset doesn't). I got frustrated when I realised that it couldn't be done because pun_main/pun_footer etc include spacer tables so the whole lot got wrapped up in the divs. I am not necessarily advocating moving to templating, my real aim was to point out that by subdividing board elements and adding a few extra items to main.tpl even if the markup is left in the php file you make a fairly dramatic improvement to the skinnability of the board. I don't see this as a barrier to integrating PunBB into sites because the users are already having to edit main.tpl to perform the integration in the first place. What you could end up with is something like

<pun_breadcrumbs>
<pun_pages_postlinks>
<pun_main>
<pun_pages_postlinks>
<pun_footer>
<pun_footerspacer>
<pun_copyright>

As I said previously, even a css based design requires the various elements that make up the board to be subdivided to a greater extent to allow styling, at least, styling without using some very convoluted selectors.

I noted your comment regarding pixel perfect design and not being to bothered about how it looked in IE5. Thats why I was advocating a redesign more suited to CSS. That way PunBB could look different in the various browsers without looking broken.

2,817

(19 replies, posted in PunBB 1.2 troubleshooting)

lukepuuk wrote:

Thanks, now it looks perfect!

http://www.raggers.net/ego/forum

Not quite, you have fallen victim of the IE5 bug. Your forum is aligning left in IE5. See the post Kennel referred you to and my solution.

2,818

(19 replies, posted in PunBB 1.2 troubleshooting)

chacmool wrote:

lukepuuk:
There's one more thing to do on the index page, you see the thick black line? You must change the "colspan" value for the Category-field:

From:
<td class="puncon3" colspan="6"><?php echo pun_htmlspecialchars($cur_forum['cat_name']) ?></td>

To:
<td class="puncon3" colspan="5"><?php echo pun_htmlspecialchars($cur_forum['cat_name']) ?></td>

Something else I forgot then.

2,819

(19 replies, posted in PunBB 1.2 troubleshooting)

I mean remove it completely. I really don't want or need to know who is moderating a forum. If this is a feature some people must have then you could always put "Moderated by xxxx" under the name of the forum. If there is a moderator this will increase the height of the row, if no moderator, no increase in height and no wasted space. It also has the knock on effect of making the topic description wider so less wrapping with long descriptions.

2,820

(19 replies, posted in PunBB 1.2 troubleshooting)

My apologies, I forgot all about the header colum.  Now at least you know that editing the code is not as difficult as you thought smile

Incidentally, I have been contemplating suggesting removal of the moderators column for ages. I am relieved I am not alone in thinking it was taking up screen real estate  without providing any real benefit.

2,821

(19 replies, posted in PunBB 1.2 troubleshooting)

lukepuuk wrote:

That's going to be hard for me, but I'll try. Another question: is it possible to adjust the width of the author column? I think same answer here, not? Thanks for the quick reply!

To remove the mods column just open index.php in a text editor with line numbers and remove line 121 (I am assuming v.1.1 of PunBB). The line to be removed reads

<td class="puncent"><?php echo $moderators ?></td>

You can alter the width of the authors column by editing viewforum.php. It is at line 110 and reads

<td class="punhead" style="width: 14%; white-space: nowrap"><?php echo $lang_common['Author'] ?></td>

Just alter the width percentage. This will however result in the topics column becoming wider or narrower as the case may be to compensate.

If you get stuck post back and I will email you altered copies of the two files.

2,822

(93 replies, posted in PunBB 1.2 discussion)

One slight concern is that althought a CSS design makes it much easier to make changes for the board it also creates more scope for CSS newbies to screw things up particularly if the stylesheet contains hacks. At the moment there is a limit to how badly the stylesheet could be messed up because the tables will still hold the whole thing together. A more advanced stylesheet could be bodged by an end user who most likely would not have the facilities to check it for cross browser compatability. However, that is a practical matter which could probably be overcome with a decent set of instructions and some decent comments on the stylesheet.

I was interested to see the comment regarding css navigation. By a strange coincidence I have come up with a navigation bar for PunBB which is based on Zeldmans menu as used on his site and ALA. The trick is to alter the function that generates the navbar so that it generates <li> tags rather than just links. The second trick is to set a variable in the function so that it can generate the links in reverse order to cope with floating right if required. I have even been playing with the sliding doors technique but as yet have not been able to eliminate the flicker in IE6 on XP.

2,823

(93 replies, posted in PunBB 1.2 discussion)

Kennel wrote:
Auron wrote:

Anyway i think you should keep it how it is Kennel, okay, maybe make it all XML/XHTML code but forget the CSS if Spot wants it to be all done in CSS then knock yourself out. I prefer desiging stuff with tables.

I will not make any decisions on what to do until I see the end result. If CSpotkill can show that it is indeed possible to create the same (or virtually the same) look, but with more modern techniques, and that this doesn't look crap for people not using the very latest in browser technology, I will very seriously consider it for PunBB 1.2.

The biggest advantage I see with the CSpotkill's approach is that styles for the forum will be much more flexible. It will be possible to create styles for PunBB that alter the appearance completely (not only colors and a few widths and height here and there). This will hopefully make PunBB more attractive.

But, as I said before, we'll see when he's finished. I don't want to jump to conclusions.

Actually there is a far simpler way to make major changes to the look of PunBB and to make it skinnable without major code changes. I am working on it right now. All you need do is to parse a few more of the boards elements to main.tpl and put some of the html from the php files to into main.tpl. In short, make main.tpl more fully reflect the structure of the board. The idea to be able to shuffle all the boards major elements around, set styles for a lot more individual elements and distribute quite advanced skins which consist simply of modified versions of main.tpl and a stylesheet. In other words, many of the advantages of a full templated skinning system without the performance overhead. You even end up with less code since a lot of the duplicated html from the various .php files is put in main.tpl only once. Of course you end up with a main.tpl which is about twice the size of the existing one but I don't see that is going to make any appreciable difference to performance and the output pages are exactly as they are now. I have barely started this but the following should give some indication of what I mean though now I look at it, all those tables except for pun_main could easily be replaced with CSS.

<pun_announcespacer>

<pun_announcement>

<table class="punspacer" cellspacing="1" cellpadding="4">
    <tr>
        <td>
            <pun_crumbs>
        </td>
    </tr>
</table>

<table class="punspacer" cellspacing="1" cellpadding="4">
    <tr>
        <td>
            <pun_pages>
        </td>
        <td>
            <pun_postlinks>
        </td>
    </tr>
</table>

<pun_main>

<table class="punspacer" cellspacing="1" cellpadding="4">
    <tr>
        <td>
            <pun_pages>
        </td>
    </tr>
</table>

BTW. There is actually a BBS system called ProxyBB which is tableless and which is XHTML 1.1 strict compliant. I got the details from Forum Insider. A link to the board is below but I warn you, it breaks in IE5. Strangely enough, it breaks IE5 in pretty much the same way as Spots re-coded PunBB does.
http://forums.proxywiregen.com/

Now for the minor rant. Even if friend Spot succeeds I still don't think its a good idea. I think a BBS system using CSS rather than tables is a great idea in its own right but simply using CSS to mimic an existing table based layout seems to be silly. A bit like installing Linux just to run a windows emulator. Much better to design a CSS based BBS from the ground up with a whole new approach to BBS design. You are also much less likely to encounter cross browser problems that way since they could be eliminated in the design itself rather than having to be coped with by hacks as an afterthought. A more practical approach for PunBb could be a hybrid solution. Remove tables for those elements that don't need them such as the header, spacers and probably the footers. Reduce the nesting of tables for the forum itself particularly where there only funciton is to create a border but keep the main output from the database in tabled.

2,824

(93 replies, posted in PunBB 1.2 discussion)

Kennel. Would it be a good idea to start a new topic in the Coding or Discussions forum and then move the last dozen or so posts since it has all got rather a long way from the purpose of this thread.

2,825

(93 replies, posted in PunBB 1.2 discussion)

I'm impressed though still not convinced.
IE5 - It falls apart
IE6 - The posts are expanding beyond the header row and left border next to email link is out of alignment.
Firebird 0.7 - Perfect so probably fine in Mozilla 1+ also.
Will test it in Opera 7 later.