[pmwiki-users] some variable issues

V.Krishn mistyfire at autograf.pl
Fri Mar 25 14:36:05 CST 2005


On Saturday 26 March 2005 00:48, you wrote:
> On Fri, Mar 25, 2005 at 06:31:12AM +0530, V.Krishn wrote:
> > Are these variables available.
> > How can I create or make use of these variables:
> >
> > $FarmDUrl
> > $CookBookDir
> > $CookBookDirUrl
>
> PmWiki doesn't define any of these variables (nor will it), 
:-) no offence please, was just a question.
> but you 
> can define them yourself in config.php if you need them.
>
> $FarmDUrl and $CookbookDirUrl would assume that these directories are
> somehow accessible via the web.  This isn't always the case, and in fact
> it's often better if they are not accessible (or accessed) via the web.
>
> In my scripts I tend to use either "cookbook/" or "$FarmD/cookbook"
> to access the per-field and per-farm cookbooks as appropriate, rather
> than trying to assign it to a specific variable.
Ok, I was trying to create a cookbook receipe:
Here are the files that are to be packed:
receipe.php
receipe.css
receipe1.gif
receipe.gif

In .php file I use $HTMLHeaderFmt[] to load the .css file.

What what would be the best method for packing.
I was thinking since all files are specific to this receipe, I would put them 
into a /receipe folder and instruct user to copy it under /cookbook 
directory.
With this mode if any time in future he need to upgrade he just need to take 
care one directory.
Then all he needs to do is
include_once("cookbook/receipe/receipe.php")

Now the moot question is "Will this receipe work from both FARM as well as any 
FIELD"?

quote from http://www.pmwiki.org/wiki/Cookbook/ModuleGuidelines
------ But then I guess I should follow this pattern 
  package-0.1/
      COPYING.package (license info)
      README.package (install & other instructions)
      cookbook/
          package.php (single script, loads others if necessary)
          package/
             bar.php
             baz.php
      pub/
          package/
             [any skins, images, etc.]
      wikilib.d/
          Package.HomePage (documentation in PmWiki format)
          Package.OtherDocumentation


Method one is Windoze method installation, While the later is *nix method.
:-)
>
> Pm



More information about the pmwiki-users mailing list