Topic: Recent Posts on Forum Index

I know it's rather an odd request, but I've been modifying (heavily!) a 1.1.5 punBB installation to replace the crufty phpbb installation my community site is currently operating on. While I am aware that I am in for serious headaches when punBB 1.2 comes out (oh my, even more code joy!) it is important for me to do what I'm doing right now. I would link to the site, but it's in something of an beta state at this time and not fit for human consumption.

And now, after that short digression, I would like th ask the question I registered for. Is there any easy way to display on the main forum index a summary of the last two posts in each forum?

While I am comfortable digging around in PHP, this particular task is eluding me. In extern.php there is a way to do something similar for pages outside the forum, but I cannot figure out how to make this happen on the forum index page.

Any help would be greatly appreciated!

Re: Recent Posts on Forum Index

It's not very difficult. However, I believe you will have to run run one extra query per forum on index.php, so the performance won't be that hot. I wouldn't recommend it.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

3 (edited by Mellaflusia 2004-12-20 15:22)

Re: Recent Posts on Forum Index

Are we talking about a major performance hit, or a 'punBB-level' performance hit. Because this board is already blistering compared to phpbb. I am curious if one more query per forum (10) is going to hurt the index that badly.

Thanks for the quick response though. Love the software. I'll be sure to link to it in the appropriate place when I have something.

Re: Recent Posts on Forum Index

Mellaflusia wrote:

Are we talking about a major performance hit, or a 'punBB-level' performance hit. Because this board is already blistering compared to phpbb. Thanks for the quick response though. Love the software. I'll be sure to link to it in the appropriate place when I have something.

big_smile

It shouldn't be too bad, couldn't you put it all into one query?

Indocron
$theQuestion = (2*b) || !(2*b);

Re: Recent Posts on Forum Index

I'm curious where you would fit in this summary on the index page.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

6

Re: Recent Posts on Forum Index

If you want to be really slick you put the summaries inside an absolutely position span inside the forum name <a> tags. Set it to display none for A:link, A:visited and display:inline or display:block for a:hover. Instant popup with no javascript.

7 (edited by Mellaflusia 2004-12-21 14:35)

Re: Recent Posts on Forum Index

Rickard wrote:

I'm curious where you would fit in this summary on the index page.


My forum is not layed out the way most are. As I said, it's a VERY modified punBB installation. On the Forum Index, each forum summary takes the full width (450px, it's a fixed-width design). it looks something like this (forgive the formatting, BBCode is only so flexible):


Forum Title 384 posts in 86 threads
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Last post by Mellaflusia on December 21, 2004


Now, what i'm hoping to do is replace that "last post" part with a summary of the two most recent posts in that forum:


Forum Title 384 posts in 86 threads
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Recent Activity:
Billy_Bob posted Yesterday at 9:58pm in Ten Reasons to Love your Mac
Well, I tell you this, I don't like that Apple has sed do eiusmod tempor incididunt ut labore et dolore magna aliqua...

Jesse_Bell, posted Yesterday at 7:32pm in Ten Reasons to Hate your Mac
Overpriced service and support on top of overpriced mechandise has sed do eiusmod tempor incididunt ut labore et ...

Re: Recent Posts on Forum Index

Paul wrote:

If you want to be really slick you put the summaries inside an absolutely position span inside the forum name <a> tags. Set it to display none for A:link, A:visited and display:inline or display:block for a:hover. Instant popup with no javascript.

I gave it some thought, and that would indeed be cool, except  that I am not generally a fan of "tool-tip" type functionality except as it applies to the title tag.

I'm pretty versed in xhtml/css, I work full time as a web developer. I'm looking forward to punbb 1.2. I've managed to make most of 1.1.5 xhtml/css and more or less semantically correct, but it's a little clumsy.

9

Re: Recent Posts on Forum Index

Interesting. If I were doing a totally tableless design thats how I would do it. Excellent way of doing it from an accessability standpoint and for converting to RTL layout. I even tried it just as an experirment. Only snag is it looks great on a narrow layout but not so nice at 1024px wide.

You might find 1.2 a problem at 450px. It uses opposing floats so you might find yourself having to stack things vertically rather than floated left and right but thats just a style sheet change.

Re: Recent Posts on Forum Index

would it be possible for us to see your forum? i would like to see what you've done

11

Re: Recent Posts on Forum Index

http://mellaflusia.com/forums/

Google is your friend, as is logical deduction big_smile

EDIT: Or maybe not, that seems to be phpBB smile

Re: Recent Posts on Forum Index

i guess hes still modding punbb to look like that

13 (edited by Mellaflusia 2004-12-21 15:58)

Re: Recent Posts on Forum Index

Paul wrote:

http://mellaflusia.com/forums/

Google is your friend, as is logical deduction big_smile

EDIT: Or maybe not, that seems to be phpBB smile


Indeed. the current site is a phpbb installation.

The punbb version is a LOT different than what you're looking at there. Much lighter, much more open, much more structured and readable.

Because of heavy integration with a CMS and Coppermine, the beta site is password protected and not currently available to show. I'm sorry.

Re: Recent Posts on Forum Index

ahh well we'll just have to wait