The WB classes and function libraries are stored in the folder framework/. The most important ones are summarised in the list below. Intented class names indicate that the class is extended from it´s parent . Such classes inherit all functions and properties of it´s parents and extends them by own function. The list below provides the most important classes and function libraries.
This class contains the core functions of WebsiteBaker. It is automatically loaded before any front- or backend page will be displayed. The class contains functions to obtain and filter data passed over via GET, POST or SESSION. This is the place where the $_SESSION variables introduced in the previous chapter are defined. Further on the class contains functions to check the access permissions of the current user.
This class is extended from class.wb.php. Here you can find all functions required to display a page in the frontend. Whenever a user types the URL https://domain.com or http://domwin.com/pages/xx.php in the browser, the file https://domain.com/index.php will be invoked. This file includes the class.frontend.php and invokes the functions contained in it. The schematic order of function calls is highlighted in the flowchart below.
Flowchart of classes/functions invoked while displaying a page on the frontend
This class is extended from class.wb.php. It is included before any page of the WB backend will be displayed. This class checks the permissions of the current loged in user and displays the areas of the WB backend the user is allowed to see. Users not loged in will automatically be redirected to the login page.
This class is extended from class.admin.php. It is invoked by https://domain.com/login/index.php or class.admin.php (if the user is not loged in). This class contains all functions required within the login process such as: verifying user inputs with database information, counting login trials, registering users, setting user informations ...
This file contains the two classes database und mysql. The class database contains functions to connect to the WB database, to execute databse queries and to close the database connection. The class mysqli contains useful functions which can be used in own modules. The most important functions contained in the class mysql are listed below.
This class was introduced with WB 2.6.5 and is extended from the class PHPMailer contained in /include/phpmailer. PHPMailer is an external Open Source Project which provides functions to send out emails. This class is also used in other projects like Joomla.
The class class.wbmailer.php reads the WB configuration settings and provides default values for language, charset (e.g. utf8), sender name, sender mail address (FROM:) and page break (default is after 80 characters).
This class contains functions to update the database entries if pages are moved (up/downs) via the WB backend. The contained functions are not that important for module developers.
This library contains useful functions which can be used in own modules or the index.php file of the template. The most interesting functions are listed below.
This library contains functions for the file handling. The functions can be used within own modules. The most interesting functions are summarised below.
Check the functions available in functions.php before you start programing own routines. Maybe there is already a function which solves your needs.