[pmwiki-devel] getting started

dso dso at moosoft.com
Wed Nov 29 15:39:08 CST 2006


I have been looking at existing recipes and reading lots of
documentation and I find myself stuck anyway.

I am trying to make the most basic recipe possible.

Here's what I have:

in config.php:
include_once("$FarmD/cookbook/testdata.php");

testdata.php:
<?php if (!defined('PmWiki')) exit ();

define(TESTDATA_VERSION, '2006-11-29a');

Markup('testdata', 'directives',
  '/\\(:testdata (.*?)\\s*:\\)/ei',
   "GetTestData('$1'");

function GetTestData($str) {
   return "test";
}

I either get the directive as text or an error about evaluation.

What I am going for is a directive to gather data from a couple of
databases.

something like: (:getdata $name:)
and it will return markup with formatted data.

Thanks for any direction!



More information about the pmwiki-devel mailing list