From fe9a487e1b5ed0700481aee4609055dc6c47505d Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Mon, 2 Mar 2015 21:14:49 -0500 Subject: [PATCH] clean up include paths and docs --- INSTALL | 58 +++++++-------- encode.php | 8 +- examples/Makefile | 2 +- examples/config.php | 21 ++++++ examples/db_connect.php | 10 --- fdb.php | 2 +- main.php | 10 +-- messages.php | 2 +- metaform.php | 2 +- metaform/INSTALL | 46 ------------ metaform/Makefile | 4 +- metaform/preview.html | 2 +- metaform/styl.styl | 2 +- metaform/template.html | 2 +- metaform/template.php | 8 +- run2.php | 150 -------------------------------------- session.php | 2 +- stylus-helpers.styl | 2 +- tar.php | 4 +- test/session_test.html | 4 +- test/session_test.php | 14 ++-- test/session_test_db_connect.php | 2 +- test/tar_test.php | 2 +- test/tem_test.php | 132 +++++++++++++++++---------------- unit_tests.php | 10 +-- unit_tests/db.php | 6 +- unit_tests/encode.php | 6 +- unit_tests/format.php | 6 +- unit_tests/misc.php | 6 +- uploader.php | 8 +- 30 files changed, 168 insertions(+), 365 deletions(-) create mode 100644 examples/config.php delete mode 100644 examples/db_connect.php delete mode 100644 metaform/INSTALL delete mode 100644 run2.php diff --git a/INSTALL b/INSTALL index 09fa003..1f24907 100644 --- 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(); diff --git a/encode.php b/encode.php index ca4a919..9a9bdbc 100644 --- a/encode.php +++ b/encode.php @@ -268,7 +268,7 @@ function pulldown($name, $in_options, $multiple = false) { # output a bunch of