fusiongrokker

CFMenuCal alpha1 for ColdFusion MX7 now available!

When I wrote yesterday's post asking whether I should continue putting off porting the alpha1 code to pre-ColdFusion 8 syntax, I pretty much knew what the answer would be. It took me less than an hour to go through the whopping 9 files and convert things like --, <=, {}, and [] into =x-1, LTE, StructNew, and ArrayNew; and I'm going to have my hands full with the rewrite and new features for at least a few more months.

This is all just a roundabout way of saying that CFMenuCal alpha1 for MX7 is now available at RIAForge! I've put the code into the /versions/alpha1 for MX7/ folder in the Subversion repository, or if you're not interested in dealing with SVN, you can just download the zip!

It includes a readme.txt file that explains how to configure the application, but I'll give a bit more detail here. Everything you need to edit is in config.cfm.

The first thing you need to do is create a menu (think restaurant-style). Your menu is an array of meal structures. I've left some example data in the code so you can see how it's intended to be set up:

[viewcode] src="cfmenucalalpha11.cfm.txt" showsyntax=no geshi=cfm[/viewcode]

After you have your structures defined, just drop them into the menu array by making sure they're all appended:

[viewcode] src="cfmenucalalpha12.cfm.txt" showsyntax=no geshi=cfm[/viewcode]

Exceptions are what allow you to skip a specific day, and you can put the reason on your calendar. You configure them with the same general idea as setting up your menu:

[viewcode] src="cfmenucalalpha13.cfm.txt" showsyntax=no geshi=cfm[/viewcode]

The "exception" key is the "reason" that no meal is needed for the date, and the "date" key is the day of the month that the exception is for.

Don't forget to append all of your exception structures to the exception array:

[viewcode] src="cfmenucalalpha14.cfm.txt" showsyntax=no geshi=cfm[/viewcode]

And lastly, a few settings to define what month/year you want your calendar built for, and how close you want your dishes and side-dishes:

[viewcode] src="cfmenucalalpha15.cfm.txt" showsyntax=no geshi=cfm[/viewcode]

When you need a new calendar for the next month, the only things you need to change are your exceptions and the month/year variables. Then all you have to do is refresh the page (or click the randomize button - same thing) until you get a calendar you like.

Bon Appétit!

in CFMenuCal 2007-10-27 11:29