This is a great mod! I'm glad I ran across it.
I have a few suggestions:
- Allow the selection of multiple forums for news.
- Include the post date for news.
- Allow an optional image associated with the forumid (similar to what you see at www.neowin.net)
- Include the "news_bit" mod by Jugo
- Allow a starting number for your news array.
Why a starting number? Well...
I would love to have the most recent news story in full at the top of a page, followed by the next five (2-6) articles using the news_bit, followed by the next 10 articles (7-16) using just titles only. It's a great way to show a lot of information on a page without cluttering it up. Very similar to what you see at
Dave's iPAQ.
Obviously, it would be nice to automatically exclude private forums, but in addition to that, I've found another but that crops up with you use the news_bit modification. If you limit the characters, you could end up with unclosed tags and unpredictable formatting (especially with things like lists).
EDIT: I believe I'm on track to modify this to do the different ranges. I found this reference in the
MySQL Reference Manual:
Quote:
The LIMIT clause can be used to constrain the number of rows returned by the SELECT statement. LIMIT takes one or two numeric arguments, which must be integer constants.
With two arguments, the first argument specifies the offset of the first row to return, and the second specifies the maximum number of rows to return. The offset of the initial row is 0 (not 1):
mysql> SELECT * FROM table LIMIT 5,10; # Retrieve rows 6-15
|
So I can add a parameter that specifies the starting row. The next step is to parameterize the html "template" that is used. Then I can call the function three times and achieve something akin to what I mentioned above.