X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=messages.php;h=a762e5ed7429270e393d63e4b752b08f0f16ac4d;hb=90448b433585ec63832845ae50deb01b4124adc0;hp=826cb6e23df5a2cc38a59018b6070134d42deaf4;hpb=190f7cd55eb57df70388557c44667ac01494ebd1;p=wfpl.git diff --git a/messages.php b/messages.php index 826cb6e..a762e5e 100644 --- a/messages.php +++ b/messages.php @@ -1,71 +1,77 @@ . +# This program is in the public domain within the United States. Additionally, +# we waive copyright and related rights in the work worldwide through the CC0 +# 1.0 Universal public domain dedication, which can be found at +# http://creativecommons.org/publicdomain/zero/1.0/ -# This file is useful for putting message box(es) on the screen. +# This file is useful for putting message box(es) on the screen. If you include +# session_messages.php these messages can even persist accross http redirects +# (such as you should do after receiving a POST. # # Just call message("message here") whenever you have something to report. # -# Once a template is loaded, call display_messages(). Your template should have -# a section with a ~text:html~ tag in it. # -# If you want a divider (any text between message boxes when there are -# multiple boxes) provide a sub-template section named "separator" -# INSIDE "message" at the begining of it. +# Once a template is loaded, call display_messages(). run.php will call +# display_messages() for you automaticallly after your main function returns +# (so long as you require_once this file.) If you want these messages to +# persist accross browser redirects, then you should +# require_once(__DIR__.'/'.'lib/wfpl/session_messages.php') +# +# Just make sure your template has a section with a +# ~message html~ tag in it. # -# If you'd like something around the group of all message boxes, you can put -# the whole thing in a sub-template section called "messages" - # Simple example: # -# -#
~text:html~
-# - +# +#~message html~
+# +# # Full-featured example: # -# -#~text:html~
-# -#~message html~
+# +#