logo-radria.gif
   
Blog Download Documentation Forum Tasks Home
Blog Download Documentation Forum Tasks Home
barside-right.gif
barside-left.gif
logo-sql.gif





Each new projects comes with a set of directory structures and scripts. These default folders and files are the base skeleton of a Radria Project.

Default Radria project

To get you started faster a base site template with commonly used features is preset for each new project you create. This base default site is in RadriaCore/sitetemplate/.

Folder structure

Description of each folder of a Radria Project.

class/: All the object classes used in the project docs/: Folder where the documentation of the application and related packages are stored events/: The Event Actions controlled by the Event Controller. form/: HTML templates of serialized form objects. images/: All the images of the project. includes/: php, js, css that are included with HTML pages or PHP scripts. package/: Package descriptions for uninstallation. registry/: Serialized Registry object for Field types description. report/: Serialized report objects for Data presentation. savedquery/: Serialized SQL Query objects.

Default files

By default a set of files are added when you created your project. The directory structure and files come from the RadriaCore/sitetemplate. They are the minimum set of files to get you started without too much trouble. The initial sitetemplate includes a configuration file, event controller and auto loading configuration.

  includes/extraconfig.inc.php
  includes/globalvar.inc.php
  includes/header.inc.php
  includes/style.css
  includes/extraconfig_postdb.inc.php
  eventcontroler.php
  index.php
  message.php
  config.php

This is the base skeleton of a Radria application.

config.php The config.php file contains configuration information such as the path to the Radria Core library, database connection information and session settings, and includes the additional configuration files.

eventcontroler.php This is a default instance of the EventControler object. For more information on the event controller and to customize it see the Events chapter.

index.php default index page. Just a blank with default includes.

message.php Default message page. This page is used to display messages.

includes/header.inc.php This is the default header for the project. It's used to include the HTML headers and it will also load all the additional headers from installed packages. All the files with .header.inc.php in the include folder will be loaded between the <head> </head> tag of the HTML document. No body content should be in this page.

includes/style.css This is the Cascading Style Sheet (CSS) that is included in the header.

includes/extraconfig.inc.php This script is executed from the config.php script used to allow packages to setup additional configuration parameters and class loading. It loads and executes configuration files before the session is started and before any database connections are set and started. It will include all the files that end with .conf.inc.php in the includes/ folder. It also defines all the Constants for the Radria Logs.

includes/extraconfig_postdb.inc.php Works like the extraconfing.inc.php but will include files after the session is started and the database connection is setup and open. It includes all the files that end with .postconf.inc.php in the includes/ folder.

File naming convention

Radria uses strict file naming conventions and more specifically file extensions and places them in specific folders.

PHP Files In general, PHP files that are accessed directly should end with .php

Cascading Style Sheet In general stored in the includes/ folder, but not a requirement. They end with .css

Javascript Stored in the includes folder or a js/ folder they end with .js

Included Scripts All PHP files that are included within another script and not directly accessed by a web browser should end with : .inc.php. In general they are stored in the includes/ folder.

Class Objects In general class objects are stored in the class/ folder and end with a .class.php extension.

Serialized Objects Radria Core uses XML files for serialized objects. All xml files end with .xml. Reports end with .report.xml, forms end with .form.xml, savedquery end with .sq.xml, registry files end with .reg.xml.

Report Templates They are part of the report template package and no longer part of the default file list package. They contain the HTML and User Events that will be used by the Report Object to generate data views. The are in the reports/ folder and end with .tpl.report.xml Check out the Views for more information on report templates.

System files They are PHP script files that are not web pages and should not be made visible or available to editing GUI tools like the PageBuilder. They are stored on the root of the project and end with .sys.php

Configuration files They are not part of the default script but are often added by Packages that need to load classes, define constants or global variables. They are automatically executed at run time. You have two types of configuration files in the general configuration that are executed before the session is started and database connection is done. The files are in the includes/ folders and end with the extension .conf.inc.php. Its a perfect way to load classes and define constants. The second type of configuration files are loaded and executed after the session is started and database connection done. The are in the includes/ folder and end with the extension .postconf.inc.php

Dynamic Headers Some Add-On packages need to dynamically load css style sheets or javascript files in the application header. (<head> HTML tag). All files with the .header.inc.php extension that are placed in the /includes/ folder will be included in the <head> tag of the application.

Content admin files File linked to the administration backend should start with the prefix “admin”. The files that will be included in the menu must be stored in the includes/ directory with the following prefix :”adminmenu”.

Pagebuilder files Pagebuilder related pages start with “pg_” prefix and .sys.php suffix in the root directory. In the event folder you will find pagebuilder related event actions starting with the prefix pagebuilder. They are used only on the development project and are not published on the live server. Pagebuilder uses a lot of files in the includes directory for script and tool lists.

PageBuilder Add-On Tool bar In the pagebuilder the list of addons on the left is generated by reading the files in the includes/ folder that ends with .tool.inc.php. They contain all the add-on scripts that are presented to the Pagebuilder user. PageBuilder Add-On scripts Each add-on script in the pagebuilder add-on list is a PHP script file in the includes/ folder and ends with .script.inc.php

 
core/sitetemplate.txt · Last modified: 2007/10/25 12:40 by 76.169.240.49
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki