March 16, 2009

another release

Last night ZenMagick 0.9.5 was finally released! I am quite excited about this particular release, because it includes a couple things that make ZenMagick a lot more attractive to existing Zen Cart installations.

For one thing, there is a new patch that allows plugins to access the final HTML content of Zen Cart templates. This has been around in ZenMagick (for themes) for quite a while and proves to be very powerful.

A lot of the storefront plugins (page stats, page caching, google analytics) depend on this feature and now they can be used with Zen Cart templates too!
If you head over to the demo store you’ll see that the HTML generated by the default Zen Cart template is caches like any other page, following the same rules!

Another quite surprising thing (at least  for me!) is the new PDO based ZMDatabase implementation. It seems to be the fastest implementation so far and the demo store seems to do fine using it, so I might make it the default implementation for the next release.

There are also improvements to existing plugins and, of course, a couple new ones. The most interesting one is probably the phpBB3 plugin. It provides the same features as Zen Cart’s phpBB support, just for phpBB3.

I also really like the new theme toggle plugin that allows to switch between Zen Cart and ZenMagick. Probably not very useful for a production environment, but good to compare features, displayed values, etc.

Of course, this is not the end, and I’ve already started working on the next version. In that context a reminder that with 0.9.6 I’ll be removing a lot of the deprecated stuff. Also, the deprecated API support will be removed before a 1.0.0 release, but most likely not before 0.9.8.

February 25, 2009

more on phpbb support

There is constant interest in my last post about phpBB support. Seeing that phpBB2 is getting a bit old and phpBB3 the way to go I decided to have another stab at phpBB3 integration.

Rather than write just some straight SQL I’ve played a bit with using phpBB code directly from a plugin. Had I seen earlier that phpBB3 also uses a global $db (same as Zen Cart) it might have saved some valuable time :/

Anyhow, I am happy to announce that some critical progress has been made and a solution is within reach. There is working validation code (email address, nickname) and yesterday I managed to get the create account code to work.

The trickiest bit was actually to get the password hash to work. Since the phpBB code needs database access (no, no, $db!) I had to find another way.

Luckily, the hash code in phpBB is based on phpass without any major modifications. So, I’ve added phpass to core (just the one class PasswordHash) and added a generic new authentication provider using it.

The new phpBB3 plugin will have its own implementation,. though, as it needs to generate hashes with a different identifier. Yay!

Next on my list are updates and logoff. In the long run there might also be code to handle session timeouts and auto login to phpBB, but I haven’t done any research on that yet.

So far, like most integration mods/plugins, this is one way only (from ZenMagick to phpBB). If anyone could point me to a phpBB mod that tracks user actions (registration/modification/logoff) that I could use to implement the reverse (profile changes in phpBB) that would be great.