ewiki

spages (StaticPages+)

The "StaticPages+"-plugin allows ewiki to access files in a given
directory. If these files are in text format, ewiki will parse them
as WikiPages+. But if you put files with an extension .html, .htm or
.php into one of the specified StaticPages+` directories they will
be returned as is from ewiki_page() - the .php files will of course
get executed and their output is returned.

The basename of the files in the directories to be used by spages 
will make up the WikiPageName+ with which the files will be
accessible. 

Any given directory (see on top of plugins/spages.php) will be read
recursively. So files in a subdirectory will get available as a
page with a name like "subdir/FileName+". If the name of the
subdirectory contains a dot at the end, then the slash will be left
out in favour of a dot: resulted in "subdir.FileName+" for example.

PHP scripts in a spages directory however have some restrictions,
like not being able to return headers() or to access most global
variables without use of the $GLOBALS[] syntax. If you rely on
such functionality you should rather write an ordinary page plugin
(which in fact is often much easier).
From the output of .html and .php scripts only the parts between
<body> and </body> will be returned as page content. Any <html>
head area will get stripped, as it would lead to completely invalid
html code if it was returned as is by ewiki_page() into yoursite.

To let this plugin load pages from directories, you should either
edit the array on top of this plugin file, or define() the
EWIKI_SPAGES_DIR+ (before! including the spages.php script), which
then also would be read in.
Alternatively you could call the ewiki_init_spages() function
yourself to register a directory for processing (after! loading the
spages plugin):

  include("plugins/spages.php");
  ewiki_init_spages("/var/www/wiki/staticpages/");

You could also use this plugin to inline the ewiki database tools/
as virtual pages.

Btw, it is very easy to make a StaticPage+ from a ewiki page plugin
and vice versa. Please also note the 'tools/mkpageplugin' which can
convert anything used as StaticPage+ into a page plugin.
prev << "spages (StaticPages)"
next >> "pluginloader"


You cannot modify the README.plugins file, but anyhow any ideas or suggestion should as usually get filed on BugReports, UserSuggestions or even better the README.plugins.Discussion.