JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
wfpl.git
14 years agoadded unit tests for format_options
Jason Woofenden [Fri, 9 Apr 2010 17:47:33 +0000 (13:47 -0400)]
added unit tests for format_options

14 years agorevamp metaform so php holds db/form data as hash
Jason Woofenden [Tue, 6 Apr 2010 03:30:21 +0000 (23:30 -0400)]
revamp metaform so php holds db/form data as hash

14 years agoadd: tem_sets()
Jason Woofenden [Tue, 6 Apr 2010 03:28:43 +0000 (23:28 -0400)]
add: tem_sets()

14 years agoadd db_insert_assoc() and db_update_assoc()
Jason Woofenden [Tue, 6 Apr 2010 01:15:10 +0000 (21:15 -0400)]
add db_insert_assoc() and db_update_assoc()

14 years agoadded ordinalize() and tests for it
Jason Woofenden [Thu, 1 Apr 2010 11:43:49 +0000 (07:43 -0400)]
added ordinalize() and tests for it

14 years agodb_reposition(): fixed error messages
Jason Woofenden [Mon, 29 Mar 2010 19:46:25 +0000 (15:46 -0400)]
db_reposition(): fixed error messages

14 years agofixed db_reposition(x, 0)
Jason Woofenden [Mon, 29 Mar 2010 19:42:02 +0000 (15:42 -0400)]
fixed db_reposition(x, 0)

14 years agoadded unit test for db_reposition()
Jason Woofenden [Mon, 29 Mar 2010 19:41:34 +0000 (15:41 -0400)]
added unit test for db_reposition()

14 years agomade format_int() fail for 1.0 -> 10
Jason Woofenden [Mon, 29 Mar 2010 19:16:58 +0000 (15:16 -0400)]
made format_int() fail for 1.0 -> 10

format_int() and friends strip all not-numeric characters. This leads to
unexpected results when the user enters something with a decimal point.

ie 1.0 -> 10,  12.5 -> 125, etc

14 years agoadded more unit tests
Jason Woofenden [Sat, 27 Mar 2010 06:44:01 +0000 (02:44 -0400)]
added more unit tests

14 years agoencode.php: update comments/examples
Jason Woofenden [Sat, 27 Mar 2010 04:42:38 +0000 (00:42 -0400)]
encode.php: update comments/examples

14 years agoadded: db_reposition() (renumbering not tested)
Jason Woofenden [Tue, 23 Feb 2010 19:25:47 +0000 (14:25 -0500)]
added: db_reposition() (renumbering not tested)

14 years agosessions: use $_COOKIE instead of $_REQUEST
Jason Woofenden [Tue, 2 Feb 2010 06:42:15 +0000 (01:42 -0500)]
sessions: use $_COOKIE instead of $_REQUEST

No idea why, but on some systems $_REQUEST fails to contain the $_COOKIE
variables. (Despite variables_order = "GPCS")

14 years agometaform e-mail updated for new template format
Jason Woofenden [Tue, 12 Jan 2010 10:29:06 +0000 (05:29 -0500)]
metaform e-mail updated for new template format

14 years agometaform e-mails default to from: noreply@[thisdomain]
Jason Woofenden [Tue, 12 Jan 2010 09:45:35 +0000 (04:45 -0500)]
metaform e-mails default to from: noreply@[thisdomain]

14 years agooops, was checking for login twice
Jason Woofenden [Tue, 12 Jan 2010 09:29:47 +0000 (04:29 -0500)]
oops, was checking for login twice

14 years agometaform css: oops, caption bold not field
Jason Woofenden [Fri, 20 Nov 2009 20:51:22 +0000 (15:51 -0500)]
metaform css: oops, caption bold not field

14 years agoadded missing css for new-layout forms
Jason Woofenden [Fri, 20 Nov 2009 07:03:18 +0000 (02:03 -0500)]
added missing css for new-layout forms

14 years agoadded tem_auto_nonempty()
Jason Woofenden [Fri, 20 Nov 2009 06:24:31 +0000 (01:24 -0500)]
added tem_auto_nonempty()

14 years agosections are shown if value is set, more &refs
Jason Woofenden [Fri, 6 Nov 2009 17:01:55 +0000 (12:01 -0500)]
sections are shown if value is set, more &refs

Previously, when deciding if a template section should be expanded/shown, this
logic was used: if($value). This does not always behave as expected. For
example if you set the value to the string "0" it will not be displayed.

With the new code, any string (including "") or integer (including 0) will
cause the template section to be displayed. To hide the section, set the value
to null or false (or unset it).

The commit after this one adds a template section argument "nonempty" which
will cause that template section not to be shown if the value is the empty
string.

14 years agomerge_templates now merges to any level, new api
Jason Woofenden [Fri, 6 Nov 2009 13:06:04 +0000 (08:06 -0500)]
merge_templates now merges to any level, new api

New api: first argument is edited, so it contains references to 2nd. (ie it's
fast, but you can't use what you pass as the 2nd argument anymore.

This could be fixed by careful copying and reference updating as sub-templates
are copied to the first argument.

14 years agoadded: tem_merge(), tem_merge_file()
Jason Woofenden [Fri, 6 Nov 2009 11:20:19 +0000 (06:20 -0500)]
added: tem_merge(), tem_merge_file()

14 years agometaform: fixed bug when first field was an image
Jason Woofenden [Wed, 11 Nov 2009 22:34:04 +0000 (17:34 -0500)]
metaform: fixed bug when first field was an image

14 years agometaform: take advantage of tem_auto_show()
Jason Woofenden [Sun, 8 Nov 2009 20:41:10 +0000 (15:41 -0500)]
metaform: take advantage of tem_auto_show()

14 years agofixed encoding of spaces in pulldown value
Jason Woofenden [Sun, 8 Nov 2009 20:26:44 +0000 (15:26 -0500)]
fixed encoding of spaces in pulldown value

14 years agometaform has option for a session-based login-required
Jason Woofenden [Sun, 8 Nov 2009 20:08:51 +0000 (15:08 -0500)]
metaform has option for a session-based login-required

14 years agometaform's updated for new template engine
Jason Woofenden [Sun, 8 Nov 2009 19:39:19 +0000 (14:39 -0500)]
metaform's updated for new template engine

14 years agoparse_template deleted "<!--" and "0" sections
Jason Woofenden [Sun, 8 Nov 2009 19:29:37 +0000 (14:29 -0500)]
parse_template deleted "<!--" and "0" sections

parse_template used to delete "<!--" or "0" when they occured in a place where
they were the entirity of a static string piece. Examples:

~a~0~b~

Template to output a template:

~a~<!--~~b~~-->~c~

15 years agoadded tem_auto_last() and tem_auto_first()
Jason Woofenden [Wed, 4 Nov 2009 11:14:09 +0000 (06:14 -0500)]
added tem_auto_last() and tem_auto_first()

15 years agofixed/rewrote display_messages(), added columnize
Jason Woofenden [Wed, 4 Nov 2009 09:29:52 +0000 (04:29 -0500)]
fixed/rewrote display_messages(), added columnize

15 years agosilenced warning when evenodd called with no data
Jason Woofenden [Wed, 4 Nov 2009 10:48:35 +0000 (05:48 -0500)]
silenced warning when evenodd called with no data

15 years agotem_auto_evenodd() starts on even
Jason Woofenden [Wed, 4 Nov 2009 09:29:23 +0000 (04:29 -0500)]
tem_auto_evenodd() starts on even

15 years agotem_show() fails quietly when the template section is missing
Jason Woofenden [Wed, 4 Nov 2009 00:41:13 +0000 (19:41 -0500)]
tem_show() fails quietly when the template section is missing

15 years agodon't try to merge in the html file if there isn't one
Jason Woofenden [Tue, 3 Nov 2009 23:56:50 +0000 (18:56 -0500)]
don't try to merge in the html file if there isn't one

15 years agotem() now produces a valid empty template object
Jason Woofenden [Tue, 3 Nov 2009 23:54:12 +0000 (18:54 -0500)]
tem() now produces a valid empty template object

15 years agometaform: display page has edit link at top
Jason Woofenden [Tue, 3 Nov 2009 22:34:16 +0000 (17:34 -0500)]
metaform: display page has edit link at top

15 years agoremoved debugging from format_image_w_h_thumb_w_h()
Jason Woofenden [Tue, 9 Jun 2009 15:39:51 +0000 (11:39 -0400)]
removed debugging from format_image_w_h_thumb_w_h()

15 years agoMerge commit 'josh/master'
Jason Woofenden [Tue, 3 Nov 2009 22:47:06 +0000 (17:47 -0500)]
Merge commit 'josh/master'

15 years agometaform forms now have captions above fields
Jason Woofenden [Thu, 8 Oct 2009 04:39:09 +0000 (00:39 -0400)]
metaform forms now have captions above fields

15 years ago* template.php (tem->merge): only append expansions for show()n templates.
Josh Grams [Sun, 23 Aug 2009 23:52:44 +0000 (19:52 -0400)]
* template.php (tem->merge): only append expansions for show()n templates.

15 years ago* db.php (db_update): don't assume has numeric keys.
Josh Grams [Sun, 23 Aug 2009 23:50:23 +0000 (19:50 -0400)]
* db.php (db_update): don't assume  has numeric keys.

15 years ago* run.php, run2.php: doc fixes.
Josh Grams [Sat, 22 Aug 2009 17:37:22 +0000 (13:37 -0400)]
* run.php, run2.php: doc fixes.

15 years ago* run.php: factor merge out to template.php (now supports both APIs).
Josh Grams [Sat, 22 Aug 2009 17:30:17 +0000 (13:30 -0400)]
* run.php: factor merge out to template.php (now supports both APIs).

15 years ago* db.php (db_get_assoc, db_get_assocs): new functions to ease use of new template...
Josh Grams [Sat, 22 Aug 2009 17:29:23 +0000 (13:29 -0400)]
* db.php (db_get_assoc, db_get_assocs): new functions to ease use of new template code.

15 years ago* run2.php (run_php): internal variable rename.
Josh Grams [Sat, 22 Aug 2009 17:28:18 +0000 (13:28 -0400)]
* run2.php (run_php): internal variable rename.

15 years ago* run.php: restored old run.php since it should work with both template APIs.
Josh Grams [Sat, 22 Aug 2009 16:22:59 +0000 (12:22 -0400)]
* run.php: restored old run.php since it should work with both template APIs.

15 years ago* run.php: moved to run2.php to make way for old one.
Josh Grams [Sat, 22 Aug 2009 16:20:26 +0000 (12:20 -0400)]
* run.php: moved to run2.php to make way for old one.

15 years ago* run.php: minor changes.
Josh Grams [Sat, 22 Aug 2009 16:20:09 +0000 (12:20 -0400)]
* run.php: minor changes.

15 years ago* template.php (tem_is_old_sub): oops, missed one rename.
Josh Grams [Sat, 22 Aug 2009 16:17:49 +0000 (12:17 -0400)]
* template.php (tem_is_old_sub): oops, missed one rename.

15 years ago* template.php: compatibility API, mods to auto functions.
Josh Grams [Thu, 20 Aug 2009 12:45:06 +0000 (08:45 -0400)]
* template.php: compatibility API, mods to auto functions.

15 years ago* db.php (db_get_row, db_get_rows): drop result type arg (conflicts with optional...
Josh Grams [Thu, 20 Aug 2009 10:02:05 +0000 (06:02 -0400)]
* db.php (db_get_row, db_get_rows): drop result type arg (conflicts with optional printf args).

15 years ago* template.php (parse_template): every tag preceded by string.
Josh Grams [Thu, 6 Aug 2009 14:08:24 +0000 (10:08 -0400)]
* template.php (parse_template): every tag preceded by string.

15 years ago* template.php: more renames (specify 'data').
Josh Grams [Thu, 6 Aug 2009 14:06:58 +0000 (10:06 -0400)]
* template.php: more renames (specify 'data').

15 years ago* template.php: rearrange; rename tem_get to avoid conflict with old system.
Josh Grams [Thu, 6 Aug 2009 12:17:11 +0000 (08:17 -0400)]
* template.php: rearrange; rename tem_get to avoid conflict with old system.

15 years agowfpl_template: renamed to wfpl_tem_data to avoid conflict with old system.
Josh Grams [Thu, 6 Aug 2009 12:09:27 +0000 (08:09 -0400)]
wfpl_template: renamed to wfpl_tem_data to avoid conflict with old system.

15 years ago* template.php (tem_auto_once): renamed to tem_auto_show.
Josh Grams [Wed, 5 Aug 2009 23:18:26 +0000 (19:18 -0400)]
* template.php (tem_auto_once): renamed to tem_auto_show.

15 years ago* template.php: switch to generic linked stack.
Josh Grams [Wed, 5 Aug 2009 23:17:32 +0000 (19:17 -0400)]
* template.php: switch to generic linked stack.

15 years ago* messages.php (display_messages): I don't know why this worked at all before...
Josh Grams [Tue, 4 Aug 2009 21:35:51 +0000 (17:35 -0400)]
* messages.php (display_messages): I don't know why this worked at all before...

15 years ago* db.php (db_get_row, db_get_rows): optional arg for result type.
Josh Grams [Tue, 4 Aug 2009 21:34:38 +0000 (17:34 -0400)]
* db.php (db_get_row, db_get_rows): optional arg for result type.

15 years ago* template.php: changed arg order, new context stack implementation.
Josh Grams [Tue, 4 Aug 2009 18:29:39 +0000 (14:29 -0400)]
* template.php: changed arg order, new context stack implementation.

15 years ago* template.php: doc fixes.
Josh Grams [Mon, 3 Aug 2009 10:57:13 +0000 (06:57 -0400)]
* template.php: doc fixes.

15 years ago* template.php: tem_get to tem_get_rows, _tem_get to tem_get.
Josh Grams [Mon, 3 Aug 2009 10:47:18 +0000 (06:47 -0400)]
* template.php: tem_get to tem_get_rows, _tem_get to tem_get.

15 years ago* New template system.
Josh Grams [Mon, 3 Aug 2009 10:38:11 +0000 (06:38 -0400)]
* New template system.

15 years agoadded unit testing framework
Jason Woofenden [Wed, 24 Jun 2009 04:41:26 +0000 (00:41 -0400)]
added unit testing framework

15 years agoFIXED format_decimal(), and format_dollars/money()
Jason Woofenden [Wed, 24 Jun 2009 04:38:34 +0000 (00:38 -0400)]
FIXED format_decimal(), and format_dollars/money()

15 years agometaform: allow spaces in display names (singular and plural)
Jason Woofenden [Sat, 20 Jun 2009 23:48:49 +0000 (19:48 -0400)]
metaform: allow spaces in display names (singular and plural)

15 years agometaform: fixed bug with listing but no display page (some links got an extra _edit...
Jason Woofenden [Sun, 14 Jun 2009 16:38:06 +0000 (12:38 -0400)]
metaform: fixed bug with listing but no display page (some links got an extra _edit in them)

15 years agoadded new_readable_password()
Jason Woofenden [Wed, 3 Jun 2009 05:00:35 +0000 (01:00 -0400)]
added new_readable_password()

15 years agocleaned up README a little
Jason Woofenden [Tue, 2 Jun 2009 15:15:39 +0000 (11:15 -0400)]
cleaned up README a little

15 years agoadded enc_s()
Jason Woofenden [Tue, 2 Jun 2009 11:19:12 +0000 (07:19 -0400)]
added enc_s()

15 years agometaform: in generated php file: template sub-section html-editor so it propogates...
Jason Woofenden [Fri, 29 May 2009 09:09:59 +0000 (05:09 -0400)]
metaform: in generated php file: template sub-section html-editor so it propogates to template.html and only displays when the form does

15 years agofix run.php for case where [basename].php and template.html exist, but not [basename...
Jason Woofenden [Thu, 28 May 2009 10:27:07 +0000 (06:27 -0400)]
fix run.php for case where [basename].php and template.html exist, but not [basename].html

15 years agorevamped uploaded image handling, added thumbnailing support to metaform
Jason Woofenden [Thu, 28 May 2009 10:25:22 +0000 (06:25 -0400)]
revamped uploaded image handling, added thumbnailing support to metaform

15 years agofixed metaform so the variables in the generated html template for the listing are...
Jason Woofenden [Tue, 5 May 2009 16:59:39 +0000 (12:59 -0400)]
fixed metaform so the variables in the generated html template for the listing are encoded properly

15 years agorun.php sets GLOBALS[basename] and handles 404 better
Jason Woofenden [Wed, 6 May 2009 18:17:19 +0000 (14:17 -0400)]
run.php sets GLOBALS[basename] and handles 404 better

15 years agoallowed file name and table name and pretty-print plural to differ
Jason Woofenden [Mon, 4 May 2009 07:13:06 +0000 (03:13 -0400)]
allowed file name and table name and pretty-print plural to differ

15 years agoAPI CHANGE for cms integration. Instead of calling cms_get() which should return...
Jason Woofenden [Fri, 10 Apr 2009 05:12:54 +0000 (01:12 -0400)]
API CHANGE for cms integration. Instead of calling cms_get() which should return a hash, we create the template from template.html and pass that to cms_display()

15 years agoCONFLICT WARNING: added: logged_in() and logged_in_as_admin()
Jason Woofenden [Thu, 19 Mar 2009 08:22:08 +0000 (04:22 -0400)]
CONFLICT WARNING: added: logged_in() and logged_in_as_admin()

15 years agoMerge branch 'master' of git@github.com:JasonWoof/wfpl
Jason Woofenden [Thu, 12 Mar 2009 01:25:36 +0000 (21:25 -0400)]
Merge branch 'master' of git@github.com:JasonWoof/wfpl

15 years agoadded http_cache_forever()
Jason Woofenden [Thu, 12 Mar 2009 01:25:21 +0000 (21:25 -0400)]
added http_cache_forever()

15 years agometaform: fixed typo (display of date format hint was wrong)
Jason Woofenden [Fri, 13 Feb 2009 20:07:53 +0000 (15:07 -0500)]
metaform: fixed typo (display of date format hint was wrong)

15 years agometaform: added pretty-printing for checkboxes and dates to listing
Jason Woofenden [Fri, 13 Feb 2009 04:00:33 +0000 (23:00 -0500)]
metaform: added pretty-printing for checkboxes and dates to listing

15 years agometaform: default listing page now contains all non-huge failds
Jason Woofenden [Fri, 13 Feb 2009 03:13:20 +0000 (22:13 -0500)]
metaform: default listing page now contains all non-huge failds

15 years agometaform: added nice allignment to display page, added proper formatting for checkbox...
Jason Woofenden [Thu, 12 Feb 2009 21:19:32 +0000 (16:19 -0500)]
metaform: added nice allignment to display page, added proper formatting for checkboxes and dates
added hidden div to make html template pass w3c xhtml 1.0 strict validator

15 years agowhen metaform's default php checks if the form is submitted, it checks for a value...
Jason Woofenden [Wed, 11 Feb 2009 21:15:52 +0000 (16:15 -0500)]
when metaform's default php checks if the form is submitted, it checks for a value in $_POST[] so you can pass values on the URL without triggering it

15 years agoadded code for 12 hour time formatting. Moved enc_mdy and format_ymd out of time.php
Jason Woofenden [Fri, 6 Feb 2009 20:39:02 +0000 (15:39 -0500)]
added code for 12 hour time formatting. Moved enc_mdy and format_ymd out of time.php

15 years agoenc_hhmm leaves a blank blank. remove extra whitespace from metaform templates
Jason Woofenden [Thu, 15 Jan 2009 02:50:19 +0000 (21:50 -0500)]
enc_hhmm leaves a blank blank. remove extra whitespace from metaform templates

15 years agoadded functions to edit hours in hh:mm and save them in decimal
Jason Woofenden [Thu, 15 Jan 2009 02:25:26 +0000 (21:25 -0500)]
added functions to edit hours in hh:mm and save them in decimal

15 years agoformat_decimal() improved (but not tested much). It now strips zeros from the end...
Jason Woofenden [Tue, 30 Dec 2008 06:10:44 +0000 (01:10 -0500)]
format_decimal() improved (but not tested much). It now strips zeros from the end after the decimal point, and always returns zero as 0 (never 0.0)

15 years agofixed enc_mmddyyyy() so it leaves a blank blank
Jason Woofenden [Tue, 30 Dec 2008 04:52:21 +0000 (23:52 -0500)]
fixed enc_mmddyyyy() so it leaves a blank blank

15 years agometaform's 'date' type uses correct snippet from html template
Jason Woofenden [Tue, 30 Dec 2008 04:50:23 +0000 (23:50 -0500)]
metaform's 'date' type uses correct snippet from html template

15 years agofixed broken <?php
Jason Woofenden [Thu, 11 Dec 2008 00:17:23 +0000 (19:17 -0500)]
fixed broken <?php

15 years agometaform lists types in alphabetical order
Jason Woofenden [Wed, 10 Dec 2008 21:58:42 +0000 (16:58 -0500)]
metaform lists types in alphabetical order

15 years agoadded "singular" field, so metaform can generate better messages, links and headers
Jason Woofenden [Tue, 9 Dec 2008 19:11:18 +0000 (14:11 -0500)]
added "singular" field, so metaform can generate better messages, links and headers

15 years agoadded: enc_cap(), enc_htmlbrtab()
Jason Woofenden [Tue, 9 Dec 2008 19:05:40 +0000 (14:05 -0500)]
added: enc_cap(), enc_htmlbrtab()

15 years agoSwitched to clean urls (no .html at the end)
Jason Woofenden [Mon, 8 Dec 2008 19:37:11 +0000 (14:37 -0500)]
Switched to clean urls (no .html at the end)

15 years agometaform redirects after successful submit. metaform can make a display page
Jason Woofenden [Mon, 8 Dec 2008 19:25:32 +0000 (14:25 -0500)]
metaform redirects after successful submit. metaform can make a display page

15 years agoMerge branch 'master' of git@github.com:JasonWoof/wfpl
Jason Woofenden [Wed, 3 Dec 2008 05:43:32 +0000 (00:43 -0500)]
Merge branch 'master' of git@github.com:JasonWoof/wfpl

15 years agorefactored date-mangling stuff a bit
Jason Woofenden [Wed, 3 Dec 2008 05:43:25 +0000 (00:43 -0500)]
refactored date-mangling stuff a bit

15 years agoupdated docs
Jason Woofenden [Fri, 21 Nov 2008 04:00:51 +0000 (23:00 -0500)]
updated docs