The b2 future – WordPress

Michel’s back, and announced details about the future of b2.
WordPress is going to be the next version of b2 and is developed by Mike Little and Matt Mullenweg. I’ve exchanged brief emails with both on different matters and hope to continue exchanging ideas and code as we’re working on a similar codebase. Tim has more on the announcement too.
With b2++ and WordPress around, the future of b2 looks good! 🙂
On another note, there’s a security hole in the blog import tools shipped with b2. I bundled these scripts with b2++. The easiest way of fixing that is by deleting gm-2-b2.php and blogger-2-b2.php.

b2++ documentation

I like Wikis. I use TWiki at work and it’s excellent. I think I need a wiki to document everything I’m doing in b2++, and I need it fast. Chances are I won’t use TWiki however, so I’m open to suggestions. If you’ve a favourite Wiki, then feel free to leave a comment. Applications that are written in PHP and use MySQL will get preference over others. Smarty support would be a bonus too. Tiki seems to fit the bill perfectly, but I haven’t tried it out yet.
Things to document:

  1. Import the b2 readme, and make a “tag/plugin” section for blog owners.
  2. How the weblog works, “always on” plugins, Smarty plugins, the flow of a weblog request.
  3. To do list.
  4. Bug tracker (should probably be seperate)
  5. Feature requests.
  6. And more..

b2++ – page freshness, last month? referers

Minor updates:

  1. Add the following code to index.tpl to list your weblog entries from a month ago.

    {todayayearago when='month' heading='<h1>A Month Ago</h1>'}

  2. I added headers to the site to make pages stale. Mail me if you notice a difference.
  3. Referer format has changed slightly. It requires a db update, so the next release will require upgrading users run upgrade.php
  4. Search pages are generated with a different Smarty key. This should remove any highlighting for users who come directly to this site.
  5. I fixed a small html bug in the lastupdated.php script. If URLs aren’t printed properly on the “Last updated” list, then change line 33 so it reads:

    $smarty->assign( "site", "http://" . $basesite );

  6. Added a list of clickable smilies to b2edit. Click to add them to your blog post! 8)

b2login, b2comments and cookies

The original b2 had a few bugs with regards to setting cookies – it would set cookies for authentication and comment author information, but without setting a url. This caused problems for Safari users who couldn’t login to their blogs!
I’ve modified the setcookies commands so that:

  1. Auth information is set only for the blog address – ie. /xeer/ for this blog
  2. Comment author information is set for the whole b2 site. You won’t have to keep entering your personal details to comment on other blogs once you’ve commented once on any particular site.

That’s the idea anyway. Leave a comment here if you discover any bugs with that.

b2 and Netscape 4.X

I know, I know. Netscape 4 isn’t used by many people these days but I had to use it this morning. I couldn’t login to edit this blog and the error log didn’t report any error. Then I tried “Mozilla Firebird” and it worked fine. *shrug*
I’ve got reports that “Logout” is broken, so I should look into both over the next few days.

Background tasks in PHP: pinging weblogs.com

A long time ago, Ivan looked at executing background tasks in PHP after the actual request by the browser was over. He explained that it disappeared in PHP 4.1, but should be (and is) part of PHP 4.3.1.
I modified b2edit.php to use the register_shutdown_function to call the pingWeblogs, and pingBlogs functions:
From (line 100 of b2edit.php):

rss_update($blog_ID);
pingWeblogs($blog_ID);
pingCafelog($cafelogID, $post_title, $post_ID);
pingBlogs($blog_ID);

to

//rss_update($blog_ID);
pingCafelog($cafelogID, $post_title, $post_ID);
register_shutdown_function( "pingWeblogs" );
register_shutdown_function( "pingBlogs" );

This probably won’t work if you’re using PHP 4.1, so test it after you make the change! Does it make posting to b2 faster? I’m not sure. I don’t think those functions “disconnect” from the browser completely. Of course, I could be mistaken and the delay could be in another part of the code! I don’t honestly know.
Final note – I made a quick optimization by removing the call to rss_update(). That function creates the b2rss.xml file. Since we don’t use that file (use b2rss2.php or b2rdf.php instead!), the function call isn’t required!

New b2++ release – 0.6.1

You can now download the new 0.6.1 release of b2++. I had to add a small fix this morning as I had forgotten that a few database tables had to be created.. Somehow the referer feeder script got left out too. One the disadvantages of doing “diff --brief -r . htdocs | grep -v Only” and releasing code late at night..

Anyway, this one is worth downloading:

1. Fixed random template selection when new blog created.
2. Added Template help template. (Thanks Jim!)
3. Docs to configure Apache were wrong in install.php
4. I’ll try and detect if mod_rewrite is off in the actual install, not after.
5. Added blo.gs “favourites” plugin.
6. Moved lots of backend text into templates.
7. Templatised archives code.
8. Comments popup redirects to a “fresh” url.
9. Added lastupdated templates to default themes.
10. Redirect doesn’t go to index.php now.
11. Added referer plugin.
12. Added option to display comments on weblog.
13. Added b2customfields plugin.
14. Enabled Smiley support.