b2-smarty – !EOLF

Damn, I thought I had dropped enough hints and mistakes in my previous post to make it clear it was an April Fools! Sorry if anyone was alarmed! Read through the post again and note some of the pure bulls**t I’ve spouted to argue why I’m giving up!
So, I’ll be around for a long while yet. Expect lots more changes from me, I want to make b2 a hell of a lot better than it currently is and that’s going to be difficult!
I’m toying with the idea of rebranding my project b2++ or something similar. The scope of the project has gone far beyond Smarty, and I’d also like to get some of the b2 hackers on-board. It may even require a new Sourceforge project as I’d like to introduce more design concepts such as OO, and some of the patterns mentioned on sites like phppatterns.com. This will necessetate making the project more complicated for developers to pick up but Rev Jim’s review (linked yesterday) is scathing and has some merit.

b2-smarty – EOL

I’m sorry to say this but due to overwhelming time constraints I won’t be able to work on the b2 mod running here any more.
I’ve spent quite a lot of time adding new features to b2 and pushing it out there but the resulting feedback isn’t worth it. I’m concerned about remarks that “b2 is dead”, and “the code is crap” so I’m going to call it a day and work on Moveable Type instead.

First off will be a template system using the PHP Smarty Templates System. It should be very easy to integrate the Smarty PHP code into the Perl code of Moveable Type as neither are finicky about whitespace unlike a certain other language I could mention.

I’d also like to support the new IPV4 Security Flag so that Movable Type will know when a posting is simply normal run of the mill text, uninformed rant, or flame-bait material. This really will work wonders for Internet security and it’s important that all applications support it.

Also, the fact that many, many Mac users use Moveable Type has convinced me that this is the way to go.

I considered abandoning Vi, but Emacs simply didn’t have the features I wanted. I’ll be using the Linux port of BBedit instead.

revjim.net: cafelog: a look at bad code

revjim reviewed Cafelog/b2 here. I have to be honest here and admit I haven’t looked at, or been concerned much with the internal workings of b2 yet.
I’ve worked on adding features I saw as vital to any blogging software I wanted to use. Now that those are in place (namely various template enhancements) I have to look seriously at the backend code.
On another note, can anyone access the Cafelog forum or Cafelog itself? I suspect the domains weren’t renewed and now they’re innaccessible.

b2 web-based installer/configurater

I’ve just finished work on a web based installer for b2. It should make it much easier to install b2-smarty.
All you’ll have to do is copy the files from the tarball to where you want b2 to live, and point your browser at install.php there. It’ll present you with a simple form to fill out and then configure the server for you!
After some testing I should have another release out shortly with this and the editor updates mentioned below.

Template Editor Updated

The template editor has been updated! Here’s a list of changes:

  1. Everytime you edit any template file a backup is made before the file is changed. Up to 5 backups can be made and these are put into a FIFO queue.
  2. The display of “editable files” has changed. A list of backups now follows each file. If a backup exists you can click on the number to edit it. If you save the backup again it will overwrite the template, thus restoring the backup.
  3. If no changes are made to a file then it won’t be saved when you try to save it.

Be aware that these single file backups are alse backed up when you backup the whole template via the “Template Changer” page. When you restore a template backup from that page those backups will also be restored.

Template Editor Updates Soon

The next version of b2template.php will be a major upgrade!
It’ll keep seperate backups of each file edited. It will also allow you to edit and restore old backups. Currently I’m thinking of having up to 5 backups for each file, with a FIFO queue to handle them. (brought me back to my demo days figuring out the for loop -> it’s the same technique as a scrolly-message!)
Watch this space!

b2 template changer

I’ve just about finished a template changer. I just need some templates to throw in there!
You can download the default template to see what a template looks like and if you’re handy with the ol’ html skills you might think about contributing a design? With each author’s permission designs will be distributed with the b2-smarty package, and placed under the GPL. If you don’t want it included just say so. Here’s an email I sent to a few guys working on designs as we speak.

index.tpl is the main page. b2userslist also uses it to render it’s content.
post.tpl renders a single post. index.php calls this template file multiple times and the output is printed in index.tpl via the variable {$content}

popup-end.tpl and popup-top.tpl are generic top/end files that appear on each popup. I may eventyually seperate out index.tpl into a top and end too.
Probably should do it soon though..

b2commentspopup.tpl is the main comments popup.
b2comments.tpl is the file that renders each comment.
b2commentheader.tpl should have been dumped and replaced with an {if}{/if} statement in b2commentspopup.tpl – empty it if you want as I’ll probably get rid of it in the future.

b2pingbackpopup.tpl – main pingback popup page. This shows how I’ll finally get rid of b2commentheader.tpl using an if-else.
b2pingbackpopups.tpl – individual pingback renderer.

b2trackbackpopup.tpl – as b2pingbackpopup.tpl above.
b2trackbackpopups.tpl – as b2pingbackpopups.tpl above.

b2rss2*.tpl should probably be left alone because they render xml..

site.css is the css style sheet. On the blogs site this is accessed from index.tpl by calling it “templates/site.css” because mod_rewrite rewrites that as /username/templates/site.css