JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
clean up include paths and docs
[wfpl.git] / INSTALL
diff --git a/INSTALL b/INSTALL
index 09fa003..1f24907 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,46 +1,40 @@
-INSTALLING WFPL
+Installing WFPL
+===============
 
-This directory must be accessible to your PHP files via the relative path: code/wfpl/
+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.
 
-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.
 
-Install wfpl within that "code" directory. That is, these files should be in a
-directory named "wfpl" in the "code" directory described above.
+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.)
 
+You are free to use the installation of metaform here:
 
-INSTALLING METAFORM on apache (OPTIONAL)
+https://jasonwoof.com/metaform/
 
-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.
-
-metaform.php unfortunately has a couple extra steps.
+However, if you'd like to run your own (possibly modified) version, read on for
+how to set up your own:
 
-1) make a directory (named "metaform" in this example) for metaform.
 
-2) make sure code/wfpl is accessible in this directory (link to your main
-"code" directory) as described above
+Installing Metaform on apache (OPTIONAL)
+=========================================
 
-3) make a symbolic link to metaform.php called index.php:
-
-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:
 
-php_flag register_globals off
-php_flag magic_quotes_gpc off
-AddDefaultCharset UTF-8
-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 occurrences 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();