On Sun, Mar 4, 2012 at 11:32 PM, <[email protected]> wrote: > Hi everyone, > > I found the http://www.pmwiki.org/wiki/PmWiki/Functions page and > the http://www.pmwiki.org/wiki/PmWiki/Variables page. I also notice the > http://www.pmwiki.org/wiki/Cookbook/ModuleGuidelines (not usefull to > begin...) and the PmWiki Internals PmWiki Developer categories. > > But this is very confusing. The only way I can figure out something for now > is by looking existing recipes and by trying to understand / copiing > lines... With a lot of searching, I finally understand who > to use $EditFunctionse. I also put a lot of echo and print_r in code to have > cues but this is really painfull. > > How do YOU begins to write recipe for PmWiki?
Hi, Caroline, First off, I have to admit I have not written a completely new recipe for PmWiki (yet!). I have taken some of the existing ones, however, and modified them to fit my needs. I am currently in the throws of starting to write a completely new recipe that I can use to capture entire web pages (with images and links) to use as a clipping service (something similar to how I use Evernote today, but store in my wikis instead). For me, it starts off with an idea of something I want to do in my wiki. First I scan as many of the existing recipes in the cookbook that I can, and start to pull together ideas of how I might implement what I want using the recipes as is, simply changing configurations if at all possible. If I can't find exactly what I need, I look for something close, get the source, and put the source in a subdirectory of my Projects folder. The first thing I do is check that into a repository so I have a base to start from. Then I create a branch, and start making changes as I need to, testing the changes on a local version of my wiki. Once I'm satisfied that the branch is what I want, thoroughly tested on my local system, I merge the branch back into the trunk. Then I upload the new version of the recipe to my staging server, and test again in that environment (duplicate of my producgtion environment). Once I'm satisfied that's all working, I go ahead and upgrade production and test that. As far as other aspects of writing a new recipe, I am following the guidelines in http://www.pmwiki.org/wiki/Cookbook/ModuleGuidelines for structuring the subdirectories and files for the recipe, using the "Simpler Packaging Method" at this point. To develop a recipe for PmWiki, I feel one should have a very firm grasp on PHP development. PmWiki is a pretty great example of PHP coding, but if you don't know how to design and write software, and do not understand how to write PHP code, hacking out even a simple recipe is going to be quite difficult, I think. The best recipes make meticulous use of the existing structures and idioms built into PmWiki, and it takes (I feel) quite a bit of study to understand them. _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users
