Description:
This package contains a set of demo actions that will present some commonest features
of the Freeform Framework
Classes:
-
FDAdvancedSelect
This is the advanced selet box demo showing how to use select multiple and optgroups with separators
-
FDBaseAction
This is the base class for every action in the freeformdemo package.
It takes care of preparing the responce document and setting the templates.
All demos will have templates that are named same as the action class plus the '.html'
extension.
-
FDCache
This class is the Cache Demo. It will display a page with the time of the request.
The page will have the lifetime of 5 seconds during which it will be stored in the
browser cache. It will also contain a link to refresh itself; clicking on it will
NOT force the browser to fetch the page from the server - the generation time will
not change during the 5 second period. If you enable server-side cache then
you can open the page with another browser to see that Freeform will return
the cached page for this another request too.
-
FDDemo
This is the base class for every demo action in this package. It will take care of
setting up the router (quick jump) form and preparing the 'next' and 'prev' links
-
FDForms
This class is the Forms Demo. It shows a simple form with several fields. The
processing of the form is made by this action also. Upon success, the form will be hidden,
and a thank-you message will be displayed. In case of errors, the error details will
be shown, followed by the form itself.
-
FDI18N
This is the I18N API demo that will allow you to select country, language, collation and timezone
and watch how the localized items will change. To successfully run this demo you will have
to correctly confogure the i18n package.
-
FDLinks
This is the Links demo to show the simplicity of making links to pages generated by
other actions
-
FDLocationRewriter1
This is a sample LocationRewriter implementation that will
rewrite the URLs of the Locations using the base64 recode
functions, so that un URL like http://localhost:80/index.php5?action=FDWelcome
will be rewritten to http://localhost:80/YWN0aW9uPUZEV2VsY29tZQ==.
To enable this rewriter, you'll have to modify the .htaccess or httpd.conf file
and add this line: ErrorDocument 404 /error.php5. This will redirect all
erroneous requests to a special wrapper launcher (error.php5, you can find it in the
resources folder of this package. It has to be placed in the same directory
where you placed the index.php5, Freeform loader file). Then open the .config file of the
freeform package (located at {FREEFORM_HOME_DIR}/packages/freeform) and add this line:
locationRewriter=FDLocationRewriter1. To disable the rewriter, simply undo the above
changes.
Note: if you employ this rewriter, please see the comments in the error.php5 file
to learn about possible modes of using that file and about possible side-effects of such use.
Also note that this rewriter cannot be used with GET forms as there is no way to
force the user agent to rewrite the query string. Either you will have to provide a way
of detecting whether the submitted URL is not encrypted or you should not use the
GET forms with this rewriter.
-
FDLocationRewriter2
This is a sample LocationRewriter implementation that will
rewrite the URLs of the Locations using the following scheme:
http://localhost:80/index.php5?action=ActionName¶m=value into
http://localhost:80/index.php5/ActionName/param=value.
To enable this rewriter, you'll have to modify the .htaccess or httpd.conf file
and add these lines:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ([^/]*)/?(.*) /index\.php5\?action=$1&$2 [QSA]
Then open the .config file of the freeform package (located at {FREEFORM_HOME_DIR}/packages/freeform) and add this line:
locationRewriter=FDLocationRewriter2. To disable the rewriter, simply undo the above
changes.
-
FDPI
This class is the PHP Processing Instructions Demo. It will present a page, part
of which will be produced by the PHP code embedded into the template.
-
FDRCContent
This class is the Repeatable and Conditional Content Demo. It shows how easy it is
to show iterable content, show/hide certain parts of the template and reuse regions.
-
FDRouter
-
FDRouterForm
-
FDViewSource
This class shows source or template of the specified demo.
-
FDWelcome
This is the 'splash' demo that will display some introductory information
|
|