Features


Today I added some little files to add first XML export support to the new, cakephp-based Crisoft Ricette 2.0 branch. It is a stupid little layout file and a very basic function in the recipes controller to display the recipe as a pure XML page. It is based on RecipeML, but not on the full specification yet. Maybe I can blow it up this evening to support the complete RecipeML schema, but I’d be happy to go with just the sections head, ingredients and description.

The split of single ingredients and description steps makes it neccessary to have a format convention on the input fields of ingredients and description: Only one ingredient on a single line, only one step of description on a single line, each terminated with \n. Maybe this could be solved via multiple input fields for the ingredients, with an AJAX-style + button to add a new ingredient. This would lead to an AJAX autocomplete on that inputfield on already entered ingredients. That leads to a new database table, holding all entered ingredients or just their names. This would lead to another table with amount and ingredient connections… that would lead to a major stuck in my progress. :-) I think I’d go with the format convention of \n terminated lines for now.

I’d even like to have the recipes export themselves to RSS so anyone can include them in a feed or another mashup application. We’ll see how this will end.

Additionally I added a few layout pages, so the default scaffolding look of CakePHP is no more. :-) I try to setup a basic theme again, like the silverish slick I did while working on the pre1.0 version of Crisoft Ricette. It will be fully styleable via CSS too, to allow all users to adopt it to their own websites.

I connected Images to Recipes in my CakePHP models now, so if you open the recipe details page you can see all attached images. I want to use phpthumb to generated thumbnail for all images so I added the package to the vendor directory. The workflow for this should enable the user to upload an image while editing recipe details and phpthumbnail should then generate the thumbnail on the fly. This is only possible if the GD library is installed, so the user should disable this feature from the configuration page if neccessary. If it is turned off, the recipe details page could show the full image or just links to the image files.

Ok, there is a solution to the WYSIWYG editor in CVS now. I added a configuration option to turn it completly off. This is the best solution to incompability issues.

Disable WYSIWYG in Crisoft Ricette

After browsing through the CVS and reading some old docs, I want to let you as a user of Crisoft Ricette know why I decided to re-inserting GNU Gettext for internationalization of the software. There are several reasons for me to use Gettext for the language settings.

First of all, it is much more flexible than the previously used constants stored in a text file. I’ve translated the text file before and it was very unclear, which of the constants was used at which place in the application. I had to check the english translation each time I wanted to translate a constant. I had to get the name of the constant, jump over to the english file, look up the constant and try to translate the english sentence into my german language file. With Gettext this should be a single step.

But that’s not the most important part. For you as a user of our favorite recipe management software, it’s not important how the translation is created - it’s important that it works. And even more important: You want text that is meaningful.

And that was the problem with the constants: They are constant. You can’t insert a generated value (generated by the php backend)  at a variable position of your translation. The developer had to put it at the start or the end of the constant message. While translating the file into german language I had to construct strange sentences just to match this pattern. And here comes Gettext again: I’ll glue gettext into the source code in a way that allows the developer AND the translator to give the generated values (like recipe names or error messages) a variable position.

I want Gettext to help me (as the developer) to easily add output messages and help you (as the user/administrator) to get meaningful error or status messages. And I think Crisoft is on a good way to reach both of this needs. With help of our new development member, DrSweety, we hopefully can reach the next step of development soon.
Please, feel free to comment on my posts using the comment system of this weblog. Soon there will be a Wiki available that let you easily create feature requests or just discussion pages about Crisoft. If you really want to help us improve the software, help us with feedback, feedback and more feedback. :-)

Yesterday I implemented a new feature: Crisoft Ricette can now check for updates by itself. There is a new page in the admin area where you can let Crisoft check, if there is a newer version available. This feature is not yet completed nor is it included in the CVS, but it will come up soon.

And yes, I was very bored yesterday. ;-)

Today I added the WYSIWYG editor TinyMCE to Crisoft Ricette. You can edit your recipe text with a mouse click now. Here’s a first screenshot (you can spot the new aligned labels in the admin_insert page there):

TinyMCE support for Crisoft Ricette