[Pmwiki-users] InterMap definitions

Patrick R. Michaud pmichaud at sci.tamucc.edu
Mon Feb 17 13:21:03 CST 2003


Well, a generic note about how I tend to configure PmWiki systems
(which I need to add to the documentation somewhere).

Usually within the pmwiki directory I create a directory named "local",
which is where I put all of my local-site-specific scripts.  I tend to
reserve the "scripts" directory for those things that come with the
PmWiki distribution, or are likely to make it into a distribution.  This
keeps the scripts directory clean, and we don't have to worry about a
future PmWiki distribution accidentally overwriting an existing script.

However, if someone wanted to put everything in the scripts directory,
we could adopt the "x-" convention that many other Internet standards
use; i.e., any scripts that aren't a part of the standard PmWiki distribution
should be named beginning with "x-" so that there won't be a conflict
(and PmWiki promises to never create scripts beginning with "x-").

I could do a "plugins.txt" file configuration, but it seems to me like
it's yet-another-configuration-file-format to have to remember and for
the system to have to be able to parse.  Can't I just get away with
the same thing by having a PmWiki-provided "plugins.php" file that looks 
something like the following?

   #include("scripts/maths.php");  // gives support for mathematical equations
   #include("scripts/sidebar.php"); // floating text that the main body wraps

and then tell people to uncomment the line if they want to include that
script?  This is certainly easier on the PHP processing and code, because
it can include the scripts directly rather than having to parse another
file to figure out which scripts to include.

Another possibility is to have a "plugins" directory and have PmWiki
automatically include any scripts it finds in that directory.  So, installing
a plugin script would simply be a matter of copying the into the plugins
directory.  No config file needed.  (I would probably want to name that
directory something other than "plugins" -- I haven't come up with the
correct name for these "add-on/plugin/whatever" scripts that are being
created.  Help!)

> (Maybe the answer is to tell people to save their plugins.txt file 
> before installing an upgrade)

As a general rule for configuration files I think this doesn't work, because
if someone forgets to save their file then any customizations they want
are lost forever.  (This is why PmWiki doesn't come with a file
named "local.php".)  

Also, in either the next release of PmWiki or the one following that, I
plan to have a "local.php-sample" script that will be distributed with
PmWiki that demonstrates some of the common variable configurations, how
to include plugin scripts (possibly/probably via the include excerpt 
listed above), and a few other local configuration notes.

Comments, ideas, suggestions?  This is where I can really use advice from
the "non-technical/programmer" folks out there who are using PmWiki who can
tell me what would be easiest for them.  :-)

Pm






More information about the pmwiki-users mailing list