April 15, 2009

sticky What is ZenMagick?

Tags: , , , ,
Filed under: ZenMagick — DerManoMann @ 5:50 am

About two years ago I wrote a post Is ZenMagick for you? This post is an updated version which is supposed to put things into perspectice, in particular the current status and future plans. (more…)

March 10, 2010

weekly update

Filed under: ZenMagick — DerManoMann @ 11:59 pm

I realized only yesterday that I completely missed last weeks update. So, I guess I should have twice as much to write this week :)

However, things have slowed down a bit, so there isn’t really that much to report this time.

  • Meta Tags
    Added support for product meta tags – this was overdue, I think
  • Category display
    Fixed a bug that would allow to display disabled categories
  • Added code to allow plugins to add to the extras menu
  • music product_info
    Upgraded and improved. The plugin now includes code to add/drop the extra menu entries. This means without the plugin installed the extra menu is hidden!
    Also, added SQL to create/drop the relevant database tables. The only thing left are the actual admin pages which still ship with zencart.
  • hoverbox3
    Upgraded
  • fualSlimbox
    Upgraded
  • admin
    Started working in getting the admin MVC code working properly. Right now there are still a few unsolved issues regarding code sharing with storefront. I have, however, already added code to access the admin user. Also, group/role support has been added to the already existing code. The authorisation code doesn’t handle that yet, though.
  • Last, but not least, I’ve added the option to configure additional url mappings via theme.yaml!

March 5, 2010

about: Chess

Tags: ,
Filed under: General — DerManoMann @ 2:33 am

Having just read the (very) last post on Joel on Software I decided to follow Joels advice to talk about more than just my *product*. I do that occasionally anyway and every time I am surprised how many hits posts unrelated to ZenMagick (but related to programming) actually get.

But today to something completely different: Chess. If you’ve browsed this site you might have found to Greasemonkey scripts that I’ve written that implement some sort of a practice board for online correspondence chess. I do play Correspondence Chess on two sites: chessworld.net and atlanticgames.net.

When I started, both sites where about even with features, perhaps with a slight advantage to chessworld.net. Now things have evolved a bit and chessworld.net is clearly richer in both game quality (ie. stronger opponents) and features. [Not that I need particularly strong opponents!]

One of my favourite thing, though, is to watch KingsCrusher, the guy running chessworld.net, play and comment! 5 minute chess.

If you don’t know what 5 minute Chess is, it’s Chess with a clock where each player has 5 minutes for all his moves. Together with his mostly insightful comments, watching KingsCrusher play International and even Grand Masters is a lot of fun, so if you want to improve your blitz and bullet chess, you should really try this.

March 4, 2010

sharing code between storefront and admin

Filed under: ZenMagick — DerManoMann @ 2:21 am

With my current investigation of using the ZenMagick MVC framework for admin pages I’ve finally hit the point where sharing all code (and configuration) hits a wall.

For example, url and sacs mappings have to be different, so there is no point loading the storefront mappings in admin (and vice versa).

Also, there is reason to have separate implementations of some classes. For example the current ZMController class uses $request->getAccount() to validate access. However, for admin requests this doesn’t make sense as there will never be an account instance, but an admin user reference.
The consequence is that a few more things need to be refactored to make the MVC code even more generic. It also means that it is now time to reorganize everything under the lib directory into shared and individual code for storefront and admin.

All this, or course, implies that storefront and admin stay within a single application – more to think about…

March 3, 2010

ZenMagick admin access control

Tags: , , ,
Filed under: ZenMagick — DerManoMann @ 11:13 pm

One feature requested for integration with ZenMagick is the admin profiles mod.

I think it is a really useful thing to have, in particular if the project is going to target not just one-man shops.

Since the admin UI will be based on the ZenMagick MVC code, I would suggest that access control is integrated there. Of the top of my head this is the list of requirements to get this implemented:

  • display/hide top level menus according to groups/roles
  • disable all pages unless explicitely enabled for group/role
  • assign admin user to role/group
  • implement using ZMSacsManager

So, I think the requirements are pretty much the same as for the existing mod. There would be one improvement, though: It will be possible to set up roles. Roles are a group of predefined permissions. Then a user can be assigned to one (or more) roles and automatically have the permissions of those roles. Permissions would be or’ed, so if one role gives permission to a particular page while the other doesn’t, then permission is granted.

Additional suggestions/improvements welcome…

Improving the ZenMagick admin UI

Tags: , , , ,
Filed under: ZenMagick — DerManoMann @ 10:44 pm

I’ve been slowly preparing things for a new admin UI for all ZenMagick admin pages. The biggest step has been to remove all individual admin pages (zmInstallation.php, etc) in favour of a single point of entry zmIndex.php.

Within that file, the main_page parameter is used to dispatch the request. Right now this is done manually and the layout is included in zmIndex.php. Views itself are already working the same as in storefront, so there is a content/views subdirectory containing views for all ZenMagick admin pages.

Now, to get to state where zmIndex.php becomes the sibling of zenmagick/store.php, only two things need to happen:

  1. A default_layout.php file needs to be added to admin/content
  2. zmIndex.php needs to be changed to call ZMDispatcher::dispatch($request);

Right now this does work with one major exception: the included zencart header.php relies on globals (as does the whole init process).

I do hope that for the new admin UI the header will not have to contain a lot of code. All the stuff currently displayed above the navigation should move into the dashboard to make things more consistent. It would also be nice to have a dynamic dashboad where things can be moved around and enabled/disabled.

For example, the update check should be just another option in the dashboard. That would also mean that automatic checks will only happen on the index page and not on other pages. Furthermore, that should be doe via ajax to avoid delays loading one of the central pages.

Once we are that point, I’d really like to get the login process upgraded. Not only would that avoid some of the current code mess, but it would also allow to redirect after the login, just like the storefront does.

We’ll see…

March 2, 2010

TortoiseGit

Tags: , , ,
Filed under: General — DerManoMann @ 10:39 am

Since I started using git (and github), i’ve struggled with the fact there wasn’t a single client that could matchexisting svn or hg clients.

I tried TortoiseGit – hoping that it would be up to par with TortoiseSVN, but that was not the case (I thingk that would have been somewhere around version 1.2.??).
So, I ended up using mysysgit like most of the other windows users, looking at the number of posts about that particular topic.

Then, recently I thought it might be interesting to see how TortoiseGit has improved. And I was impressed. Pretty much everything (at least the stuff I use) seems to be working. However, there still was the issue with using ssh. I didn’t really have the patience to get to the bottom right away, so ended up using TortoiseGit locally and mysysgit (bash) to push and pull.

Today I did some more research and while there is lots of stuff about how to download putty et al, there isn’t really a lot about TortoiseGit. Then, there is also the issue that the default is plink instead of openssl, which means different keystore structure etc.

Eventually, I figured I  should perhaps look at the help – and lo and behold – there it was. All I needed was:

  1. To use puttygen.exe (comes with TortoiseGit) to convert my openssl private key to a .ppk file
  2. Configure the remote with the newly created .ppk file

And now there isn’t a single reason to use anything else! After using TortoiseSVN for so long I feels instantly at home. Beside the push and pull I can use it pretty much the same like SVN. It’s perhaps not that simple, but it makes migrating from SVN to git a lot less painful.

March 1, 2010

product_music_info

Tags: , , , ,
Filed under: ZenMagick — DerManoMann @ 4:07 am

I’ve started looking at resurrecting the product_music_info plugin. Not only is it defunct as far as the recent changes to plugin conventions are concerned, it is also the last remaining piece of code that still uses zencart’s $db.

Apart from that I think the plugin should contain a lot more than it does right now. For example:

  • Controlling the admin menu items – without the plugin the extra menu should not be displayed at all!
  • admin pages – currently, those come as part of zc-base
  • SQL to create/drop the music specific tables – that is actually quite a lot and without that the database would be a bit cleaner, IMHO

There might be more, but that is already more than I can handle right now…

February 25, 2010

adwords suggestions

Tags: , ,
Filed under: General — DerManoMann @ 12:39 pm

I’ve got some ZenMagick money to spend on Google Adwords. It’s a voucher that expires March 31, so there still a bit of time. Perhaps I’ll get 0.9.9 ready until then and we could try to do ’some’ adverts in combination with the release. Any suggestions welcome…

weekly update

Filed under: ZenMagick — DerManoMann @ 5:20 am

During the last week I’ve been switching between a number of different things. Beside the (now) usual traffic on the forum there have been numerous changes to a wide area of code.

  • SEORewriter
    I’ve moved the current net->url() code into a custom ZMSEORewriter implementation. That means that all urls are handled by a SEO rewriter instance and there isn’t any custom code left in ToolboxNet.
  • Improved error handling for missing/inactive categories and products
    There are now mappings to handle missing products or categories with a custom template. There is still a bit left to try to give the template as much details as possible to allow to offer alternatives, etc. but it’s already an improvement as it is.
  • refactored i18n code
    In fact, the current i18n got dropped completely. There is a minor template change (to pull the charset), but that affects only layout files, so not a big issue, I hope.
  • Moved store config files into a config subdirectory
    This cleans up the store folder and also brings the directory structure in line with the envisaged structure of the generic MVC code.
  • Plugins
    Some improvements to existing plugins, plus more work to convert bit rotting plugins (in the request directory)
  • redirector
    A new plugin that allows to customize redirects when hitting non existing products or categories. It’s not finished, but already allows to map bad product/category ids to good ones.
  • Dropped ZMPluginView
    This means that all resources/templates in plugin directories are available to all requests and pages

February 22, 2010

locale changes

Tags: , ,
Filed under: ZenMagick — DerManoMann @ 4:19 am

I’ve started working on the locale code again, in particular i18n. Also, I’ll have a serious go at adding support for gettext via pomo (also used in Wordpress). It’s a bit tricky and will probably require changing everything at the same time, so this might not make it into the very next release.

Also, since the date handling in ZenMagick is currently somewhat esoteric, to say the least, I’ll be looking into using the newish (>=PHP5.2.0) datetime features. Should there be any know issues, obviously I’d love to hear about those…

For gettext I also ponder renaming the current zm_l10n functions to something like _zm and __zm – some people really dig short function names (and some are just  lazy).

Comments welcome.

Next Page »