[phpWebApp-commits] CVS: documentation/templates/user_manual/manual_pages misc.txt,NONE,1.1 recordse
Brought to you by:
dashohoxha
|
From: Dashamir H. <das...@us...> - 2003-02-23 14:33:12
|
Update of /cvsroot/phpwebapp/documentation/templates/user_manual/manual_pages
In directory sc8-pr-cvs1:/tmp/cvs-serv14671
Added Files:
misc.txt recordset.txt webclass.txt
Removed Files:
boxes.txt
Log Message:
--- NEW FILE: misc.txt ---
-------- constructing an HTML page -----------
* - WebApp::getHtmlPage($tpl)
Constructs the page given as a parameter and returns
it as an HTML string. It saves whatever is constructed
in the current page and then resumes it again after
constructing the requested page, so it can be called from
anywhere in the application, e.g. from an event handler.
This function is usefull when you want to construct a page
for sending it by e-mail.
-------- external link to an application page -----------
* - The function WebApp::external_page() returns a link that can
be used to jump to this page of the application from any
external page. Also the constant "SHOW_EXTERNAL_LINK", which
is defined in 'config/const.Settings.php' makes possible to
display the external link to the end of the page.
The external links are useful e.g. for generating an index
page for search engines, so that they can access and index
the content pages of the application.
* - The framework defies a constant UNDEFINED (which has the value
"UNDEFINED" or something else) and is used in the framework
and in the application whenever a variable has no value.
E.g. if the function WebApp::getWBox("wb_id") returns UNDEFINED,
it means that such a webbox does not exist in the application,
or if the function Recordset::Field($fld_name) returns UNDEFINED,
it means that such a field does not exist or it has no value, etc.
------------------- WebApp::message() ---------------------------
* - The function: WebApp::message("msg") can be used in PHP code to
display a message to the user after the page is loaded in browser.
This can be used to display an error message, e.g. "Wrong username
or password", or an information message, e.g. "Project Data Saved".
* - The function:
WebApp::debug_msg($msg, $comment);
is added to the framework. It makes the framework to display
the given message after the page is rendered. The comment is
optional. You can also print a debug message like this:
print "$comment: $msg<br>\n";
but the output of this statement may be mixed with the HTML
code and sometimes it may break the page, so the first
method is safer and cleaner. The message $msg can be a large
message that contains tags, e.g.
WebApp::debug_msg($tpl->toHtmlTable());
WebApp::debug_msg($rs->toHtmlTable(), "The content of recordset");
WebApp::debug_msg($tplVars->toHtmlTable(),
"The content of varstack at this point");
WebApp::debug_msg($webPage->template_list(),
"All the templates parsed up to this point");
etc.
-----------------------------------------------------------------
* $webPage->append_to_head($line);
$webPage->append_to_body($line);
These functions can be used to add more lines to the content
of the <head> and <body> elements of a web page. The first
one (that appends to <head>) cannot be used inside onRender(),
because the <head> of the page has been already sent to the
browser.
-----------------------------------------------------------------
--------------------------------------------------------------------
* - define("VAR_NOT_FOUND", "{var_name}");
is added to 'config/const.Settings.php'
This constant sets the format of the error message that is displayed
when a {{variable}} is not found. 'var_name' is replaced by
the actual variable name. Examples: "'var_name' is not defined",
"", "undefined", etc. It cannot contain "{{var_name}}" inside.
---------------- NULL values -----------------------------------------
* - For a DB value that was NULL, the framework used to return UNDEFINED
and, as a result, in the page was displayed {var_name}.
Now, the constant NULL_VALUE is returned, which can be specified
in the file 'config/const.Settings.php'. It can be "", "NULL", NULL, etc.
--------------------------------------------------------------------
* - config/const.Debug.php: define("SHOW_ERROR_MESSAGES", true);
If this constant is 'false' than the framework suppresses
all the error and warning messages (that are generated by the
framework). Usually it should be 'true' during the development and
should be switched to 'false' when the application is deployed,
in order not to confuse the users of the application with error
messages that have no meaning for them.
--------------------------------------------------------------------
* - define("DISPLAY_CGI_VARS", false); (at 'config/const.Options.php')
When this constant is true, then the CGI vars are displayed
at the URL window of the browser. See also SHOW_EXTERNAL_LINK
at const.Debug.php.
--- NEW FILE: recordset.txt ---
recordset.txt
--- NEW FILE: webclass.txt ---
webclass.txt
--- boxes.txt DELETED ---
|