ewiki

Creating a "config.php"

Instead of including the plain "ewiki.php" script as shown in the
example above, many people may find it more useful to include_once()
a "config.php", which then itself loads the ewiki script.

Customization of ewiki takes place, by pre-defining() some of the
EWIKI_ configuration settings and loading extension plugins (see
README.config and README.plugins for a complete overview). To
not move that work and code into yoursite it is recommended to
create some sort of "config.php" script, which then contained the
various define() and include_once() commands.

It is sometimes even senseful to establish the database connection
(if you use SQL and not the flat_files backend) inside of such a
config script, if it wasn't already established in yoursite.

So such a config.php script could contain:
 - multiple define() commands, setting ewiki behaviour constants
 - include_once() commands to load extension plugins
 - evtl. some include_once() and define() for the db_flat_files plugin
   (if you don't have a SQL database)
 - and last but not least - an include_once("ewiki.php");

If you then include_once() such a config.php, you get a fully functional
and preconfigured Wiki to include into yoursite. By using this
approach, you still could override some of the EWIKI_ settings with
additional define() constants right before the include_once("config.php").

  <?php
     define("EWIKI_whatever", "...");
     include_once("includes/ewiki/myconfig.php");
  ?>
  <HTML>
  <BODY>
  <?php
     echo  ewiki_page();
  ?>
  </BODY>
  </HTML>

Note: All path names here are just examples, they will differ for
your setup!

But again, creating a "config.php" script is optional; it is
supplied in the ewiki tarball for convinience, not for reference.
You may however want to create one of your own, by simply using
the "SetupWizard+" script. Just point your web browser to
http://localhost/ewiki/tools/t_setup.php and chose the options and
extensions you want. Beware that while it provides a simplified
overview, it is not really short.

IMPORTANT: Please use "include_once()" instead of the "include()"
feature. This is to prevent accidential double loading of plugins.
We do this since R1.02b, and this is how the generated config scripts
will work.
prev << "What to do if images don't work"
next >> "flat file database"


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