Hello C5 community,
The topic of using Concrete5 for a blog comes up time and time again. C5 is not meant to be a blog (which is why it's so awesome for non-blog sites). As Franz has mentioned in the past, blogging is a verb, not a noun (see
http://www.concrete5.org/community/forums/customizing_c5/creating_a... and
http://www.concrete5.org/community/forums/chat/publish-edit-like-wo... ) -- meaning that you don't need a back-end to look exactly like wordpress in order to publish timely content on the web.
While I think this misses the point that most bloggers are focused on the ACTIVITY of writing as opposed to "editing their website" -- which is where a separate wordpress installation or the paid C5 blog add-ons come in -- it does make sense when you just need a basic blog in your otherwise-non-blog site.
And putting all philosophical and architectural concerns aside, let's be honest and admit that for *some* people, not seeing a free blog option turns them off from ever trying out C5 in the first place, which is a darn shame.
SO... let's do something about this! I have put together a lightweight blog package. It's really just a collection of blocks, page types and custom templates, but that's the whole point -- if you just need a basic blog on your otherwise-non-blog site, you should do it the "C5" way -- with in-context editing on the front-end, just like any other page on your site. This will have the side benefit of demonstrating to newcomers how content on a C5 site is managed differently from Wordpress and other CMS's (i.e. on the front-end with modular content blocks, not on the back-end with monolithic WYSIWYG editors).
Please take a look at the attached package file and test it out. Let me know if you see any bugs or other problems. I will be putting this on the marketplace soon, but wanted to get community feedback first (and hopefully some help building out additional features -- see below).
----
Here are the features currently in the package:
* Custom template for the page_list block that grabs actual content from each page and uses that for the excerpt (as opposed to the "description" custom attribute).
* Custom RSS output for the page_list that also grabs actual content from the page.
* Simple "Post Info" block that outputs the current page's title, author and publish date.
* Copy of Tony's "Next/Previous" block for navigation between blog posts. I literally copied Tony's block (with his permission, of course) and changed all the handles so there won't be a conflict if someone already has the next/previous block installed. Thanks Tony!
* A "Blog Post" page type is installed with bloggy Page Defaults (Post Info block, 2 sample content blocks, next/previous block, and guestbook block for comments [BTW, can anyone tell me why this block is named "Guestbook" instead of "Comments"??]).
* A "Blog Index" page type is installed, and the Page List block with the custom template mentioned above is added to its Page Defaults.
That's it! To write a new post, you simply navigate to your blog index page and click "Add Page" -- just like any other type of page on your site.
----
This package is admittedly missing some "bloggy" features, specifically: date-based archives, categories/tags, and URL's with the year and month in them. The first two items I think can be added, but the third is not really possible (but that's okay -- this is only intended to be a "lightweight" blog -- if you need heavy duty blogability, the paid addons are available).
Here is the list of things that I would like to see this package have. If you're interested in helping out with any of these (or have any ideas of your own), let me know:
* Good icons: It needs a package icon, and also 2 icons for the Page Types. Does anyone know if it's at all possible to install new page type icons programmatically?
* Documentation: Create a sample stylesheet with CSS selectors for all of the blog index id's and classes, so styling will be a lot easier. ALSO, write instructions on how to create your own page types for the blog index and blog post pages for situations where you want to have a different page structure for your blog (this package installs new page types without template files so that the current theme's default.php gets used -- this was the best way I could think of to ensure that it will look decent in any theme "out of the box").
* Prevent output of comment count in the blog index if there's no guestbook block on the blog post page (shouldn't be too hard -- need to add something to the comment_count() function in the packages/lightweight_blog/helpers/lightweight_blog.php file).
* Replace the sample content blocks with an "Image" or "YouTube" block on the second sample blog post page that's installed by the package -- this way the user can see that they are not limited to the "Content" block on their blog posts. I don't know how to programmatically remove a block from a page and then add a new block and change its position in the page (this needs to be done from the package controller -- I know how to add blocks to the page but not remove them or rearrange them into a different order).
* Date-based archive navigation: create a custom template for the auto-nav block that outputs a hierarchical year-and-month navigation for blog posts (not unlike the paid "Date Navigation" block on the marketplace, but of course specific to this usage so less versatile and customizable). I think this can be done rather easily if the autonav block has its "Order By" option set to "Chronologically Descending" by just checking the publish date of each page in the output loop and if you hit a new month or year, output that before outputting the link to the page.
EDIT: I've removed tagging, categories, and archives from the feature list because they would be very complicated to implement, and due to the amount of effort involved it wouldn't be fair to the paid blog addons to have a free version available.
----
Finally, if you're interested in seeing how I built this out or want to understand the code better, check out the recipe I wrote which this package is based on:
http://c5cookbook.com/recipes/make_a_blog... .
-Jordan
UPDATE: I've made some updates and implemented most of the features listed above -- see my comment dated "Aug 18, 2010 at 10:44 PM" for list of new features, and the updated attachment.