I am pleased to announce the first, very rough, release of my Newsbox plugin.
This plugin will allow you to remove all entries belonging to selected categories from the Serendipity frontpage. A configurable number of entries from those categories will then be displayed in a box with a configurable title on the frontpage. The box will be placed according to your selection: above the header, below the footer, above the entries, below the entries, or hidden altogether (thus removing entries of those categories from your frontpage without displaying them elsewhere).
Additionally, Newsboxes may be placed into other Newsboxes. The containing Newsbox must be configured to contain Newsboxes; it will ignore any category selections. You can even configure your Newsboxes to contain each other circularly, in which case nothing will be displayed.
Newsbox entry appearance can be handled in the newsbox.tpl template. If no such template exists, they'll be formatted just like entries. The appearance of the actual box can be handled with the newsbox, newsbox_container, and newsbox_title CSS classes.
The plugin does come with some CSS, which sucks: standalone Newsboxes are 100% wide, with a black 1-px border, and default left-justified <H3> titles. Contained Newsboxes are 48% wide, with no border and some padding, floated left (an attempt to produce a 2-column centered row). For best results, you are advised to add CSS styles for the newsboxes to your template. If someone wants to submit better CSS for the Newsboxes, I'd be happy to include it in an upgrade.
This plugin has been tested on a non-live site. It is released under the GPL, which includes NO WARRANTY. Please test and critique it.
You can download it from http://judebert.com/wasted_youth/plugin ... ewsbox.tgz. A lame example is on the currently-non-live site http://judebert.com/wasted_youth/index.php.
Good things happen when you're blogging with Serendipity.
Newsbox plugin
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Newsbox plugin
Hey, judebert!
Cool thing!
However your .tgz tarball does not have any template files contained in it?!
I must admit I've only quickly browsed through the code, but it looks very solid to me. You are using a different {} indenting style, which always confuses my eyes a bit.
On for the final question: Would you like me to add your plugin to our CVS, or would you like to do it yourself? I can give you CVS karma, if you give me your SourceForge.net username, so that you can maintain your plugin?
Only one wish: You have some english strings included in your plugin; maybe you can find the time to abstract them with Constants, so that it can better be used in other languages?
Many thanks for getting involved in Serendipity so much
Best regards,
Garvin
Cool thing!
I must admit I've only quickly browsed through the code, but it looks very solid to me. You are using a different {} indenting style, which always confuses my eyes a bit.
On for the final question: Would you like me to add your plugin to our CVS, or would you like to do it yourself? I can give you CVS karma, if you give me your SourceForge.net username, so that you can maintain your plugin?
Only one wish: You have some english strings included in your plugin; maybe you can find the time to abstract them with Constants, so that it can better be used in other languages?
Many thanks for getting involved in Serendipity so much
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Sharp eyes, Garvin. I thought I had caught all those language-specific things.
I didn't include any templates. If you create a newsbox.tpl for the active theme, it'll be used. Otherwise, the entries.tpl will be used. (So no template is really required.) The data format should be the same as the entries.tpl; I'll try to create an example file and include it in a plugin subdirectory.
I have the same trouble with those inline-braces; we call it "camel case". Many programmers I respect use camel case. To each his own, I guess.
On SourceForge, I'm slothman. I've only used CVS a few times, but I'd be happy to attempt my own CM. I understand SourceForge has plenty of documentation.
I didn't include any templates. If you create a newsbox.tpl for the active theme, it'll be used. Otherwise, the entries.tpl will be used. (So no template is really required.) The data format should be the same as the entries.tpl; I'll try to create an example file and include it in a plugin subdirectory.
I have the same trouble with those inline-braces; we call it "camel case". Many programmers I respect use camel case. To each his own, I guess.
On SourceForge, I'm slothman. I've only used CVS a few times, but I'd be happy to attempt my own CM. I understand SourceForge has plenty of documentation.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!

I've just added your CVS karma on the plugins directory, so have a try!
Regards,
Garvin
That's basically true. I try to apply PEAR guidelines to all of our plugins, so I often correct the coding style of smaller plugins. But since your plugin is a bit larger, and you sound as if you're going to maintain it on your own, I won't interfere with the Coding Style that you chose for yourself to be the best.I have the same trouble with those inline-braces; we call it "camel case". Many programmers I respect use camel case. To each his own, I guess.
I've just added your CVS karma on the plugins directory, so have a try!
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Slowly. I stayed up too late watching movies with my wife (she's been getting upset that I've been developing so much at home), so now I'm just exhausted.
I'm developing the example template in conjunction with a theme that I intend to submit for the Serendipity 1.0 release as my entry into the branding contest. I'm a pretty poor web designer, though, so don't expect too much.
I already added the plugin to SourceForge CSV. Did it work?
I'm developing the example template in conjunction with a theme that I intend to submit for the Serendipity 1.0 release as my entry into the branding contest. I'm a pretty poor web designer, though, so don't expect too much.
I already added the plugin to SourceForge CSV. Did it work?