My test PDF

Page 22

Inside TYPO3 - doc_core_inside

Class

Backend

Included in

t3lib_cs

init.php

gzip_encode

init.php

Description

Avail. in FE YES

Output compression class by Sandy McArthur, Jr. Included if option is set in TYPO3_CONF_VARS.

(YES)

Possibly other classes could have been included in "ext_tables.php" files or "ext_localconf.php" files. This is OK for the "localconf.php" file, but not necessarily for extensions. Please see the Extension API description for guidelines on this.

System/PHP Variables A short notice on system variables: Don't use any system-global vars, except these: HTTP_GET_VARS, HTTP_POST_VARS, HTTP_COOKIE_VARS

Any other variables may not be accessible if php.ini-optimized is used! Environment / Server variables are also very critical! Since different servers and platforms offer different values in the environment and server variables, TYPO3 features an abstraction function you should always use if you need to get the REQUEST_URI, HTTP_HOST or something like that. At least never use the PHP function "getenv()" or take the values directly from HTTP_SERVER_VARS - rather call t3lib_div::getIndpEnv("name_of_sys_variable") to get the value (if it is supported by that function). You can rely on that function will deliver a consistent value independently of the server OS and webserver software. You should refer to the TYPO3 Coding Guidelines or TYPO3 Core API for more information about this or go directly to the source of class.t3lib_div.php.

The template class (template.php) Most backend scripts include another core script than "init.php". That is "template.php". require ('init.php'); require ('template.php');

"template.php" contains a class "template". This class is used to output HTML-header, footer and page content in the backend. template.php does this: •

Initially an obsolete function, fw($str), is defined. This just returns the input string un-altered. May be removed in the future as it's obsolete and here for backwards compatibility only. If you use this function in your modules, then stop doing that!

Defines the class "template" which contains the HTML output related methods for creating backend documents.

Defines four extension classes of the template class: bigDoc, noDoc, smallDoc, mediumDoc. Each of them presets a certain width of the outputted page by specifying a class for a wrapping DIV-tag.

Includes sysext/lang/lang.php which contains the class "language" for management of localized labels in the backend. It also contains an instance of the character set conversion class, "t3lib_cs".

Creates the global variables $TBE_TEMPLATE and $LANG as instances of the classes "template" and "language" respectively.

"template.php" requires init.php to have been included on beforehand.

This is the variables and classes available in addition after inclusion of "template.php":

Variables Global variable $TBE_TEMPLATE

Defined in template.php

Description

Avail. in FE

Global backend template object for HTML-output in backend modules

22


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.