-This directory must be accessible to your PHP files vie the relative path: code/wfpl/
+Installing WFPL
+===============
-The recommended way to do this is to create a directory named "code" in the
-main folder of your website. And make symbolic links to that "code" directory
-from all directories in your website where you run PHP.
+Just unpack the file somewhere that php has access to. It's recomended to have
+php at ``inc/wfpl/`` relative to your site php files, so you can use
+wfpl_main() and files from metaform without modification.
-Install wfpl within that "code" directory.
+Metaform
+========
+Metaform is a code generator. Specifically, it generates the files that for a
+web page with a form (which, optionally saves to a database, emails, etc.)
-INSTALLING METAFORM on apache
+You are free to use the installation of metaform here:
-metaform.php unfortunately has a couple extra steps.
+https://jasonwoof.com/metaform/
-1) make a directory (named "metaform" in this example) for metaform.
+However, if you'd like to run your own (possibly modified) version, read on for
+how to set up your own:
-2) make sure code/wfpl is accessible in this directory (link to your main
-"code" directory) as described above
-3) make a symbolic link to metaform.php called index.php:
+Installing Metaform on apache (OPTIONAL)
+=========================================
-ln -s code/wfpl/metaform.php index.php
+Note: metaform is a code generator. It is NOT required to use wfpl. It is a
+tool for auto-generating code for your site which makes use of wfpl.
-4) make a file named .htaccess that looks like this:
+You'll need some directives in your .htaccess:
-RewriteEngine on
-RewriteBase /metaform/
-RewriteRule .*\.tgz$ /metaform/index.php
+ php_flag register_globals off
+ php_flag magic_quotes_gpc off
+ AddDefaultCharset UTF-8
+ RewriteEngine on
+ RewriteRule .*\.tgz$ /metaform/index.php
-Note: the above .htaccess file assumes that the "metaform" directory you
-created in step one is in the root www directory. If it's in a sub directory
-(for example you access it via: http://example.com/my/sub/dir/metaform/) then
-replace the two occurences of "metaform" in the .htaccess file with the path to
-that directory (for example "my/sub/dir/metaform").
+And a PHP file with:
-5) If php can't write to /tmp then you'll have to fix the $tmp_dir in
-code/wfpl/tar.php
+ require_once(__DIR__.'/'.'inc/wfpl/metaform.php);
+ metaform_main();