in file url.class.php, method Url::absolute() Returns the absolute url
ACCES_DENIED
in file module_interface.class.php, constant ACCES_DENIED
act
in file session.class.php, method Session::act() Manage the actions for the session caused by the user (connection, disconnection).
add
in file breadcrumb.class.php, method BreadCrumb::add() Adds a link in the bread crumb. This link will be put at the end of the list.
add
in file categories_manager.class.php, method CategoriesManager::add() Adds a category. We can decide if it will be visible and what its position will be
add
in file comments.class.php, method Comments::add() Add a comment
in file administrator_alert.class.php, class AdministratorAlert This class represents an alert which must be sent to the administrator. It allows to the module developers to handle the administrator alerts. The administrator alerts can be in the administration panel and can be used when you want to signal an important event to the administrator(s).
in file administrator_alert_service.class.php, class AdministratorAlertService This static class allows you to handler easily the administrator alerts which can be made in PHPBoost.
in file template.class.php, method Template::assign_block_vars() Assigns a template block. A block represents a loop and has a name which be used in your template file to indicate which loop you want to browse. To know what syntax to use to browse a loop, see the class description, there are examples.
in file template.class.php, method Template::assign_vars() Assigns some simple template vars. Those variables will be accessed in your template with the {var_name} syntax.
ATOM
in file atom.class.php, class ATOM This class could load a feed by its url or by a FeedData element and export it to the ATOM format
ATOM
in file atom.class.php, method ATOM::ATOM() Builds a new ATOM object
Authorizations
in file authorizations.class.php, class Authorizations This class contains only static methods, it souldn't be instantiated.
auth_array_simple
in file authorizations.class.php, method Authorizations::auth_array_simple() Returns an array with the authorizations given by variable number of arrays passed in argument.
in file mysql.class.php, method Sql::auto_connect() Connects automatically the application to the DBMS by reading the database configuration file whose path is /kernel/db/config.php. If an error occures while connecting to the server, the script execution will be stopped and the error will be written in the page.
in file bbcode_highlighter.class.php, class BBCodeHighlighter This class is a highlighter for the PHPBoost BBCode language. It supplies the highlighted code written in XHTML.
in file bbcode_parser.class.php, class BBCodeParser Converts the PHPBoost BBCode language to the XHTML language which is stocked in the database and can be displayed nearly directly. It parses only the authorized tags (defined in the parent class which is ContentParser).
BBCodeUnparser
in file bbcode_unparser.class.php, class BBCodeUnparser BBCode unparser. It converts a content using the PHPBoost HTML reference code (for example coming from a database) to the PHPBoost BBCode syntax.
in file breadcrumb.class.php, class BreadCrumb This class is used to represent the bread crumb displayed on each page of the website. It enables the user to locate himself in the whole site. A bread crumb can look like this: Home >> My module >> First level category >> Second level category >> Third level category >> .. >> My page >> Edition
in file administrator_alert.class.php, method AdministratorAlert::build() Builds an alert from its whole parameters.
build
in file event.class.php, method Event::build() Builds an event object from its whole parameters.
build
in file contribution.class.php, method Contribution::build() Builds a contribution object from its whole parameters.
build_administration_interface
in file categories_manager.class.php, method CategoriesManager::build_administration_interface() Builds the list of categories and links to makes operations to administrate them (delete, move, add...), it supplies a string ready to be displayed. It uses AJAX, read the class description to understand this user interface.
build_auth_array_from_form
in file authorizations.class.php, method Authorizations::build_auth_array_from_form() Returns an array with the authorizations given by variable number of arrays passed in argument. This returned array is used to be serialized.
in file categories_manager.class.php, method CategoriesManager::build_select_form() Builds a formulary which allows user to choose a category in a select form.
in file cache.class.php, method Cache::Cache() Builds a Cache object. Check if the directory in which the cache is written is writable.
cache
in file feed.class.php, method Feed::cache() Send the feed data in the cache
Cache
in file cache.class.php, class Cache This class is the cache manager of PHPBoost. Its functioning is very particular. Loading a file is equivalent to include the file. The cache file must define some PHP global variables. They will be usable in the execution context of the page. You should read on the PHPBoost website the documentation which explains you how to integrate a cache for you module, it's too much complex to be explained here.
in file links_menu_element.class.php, method LinksMenuElement::cache_export_begin() returns the string to write in the cache file at the beginning of the Menu element
in file links_menu_element.class.php, method LinksMenuElement::cache_export_end() returns the string to write in the cache file at the end of the Menu element
in file captcha.class.php, method Captcha::Captcha() Captcha constructor. It allows you to create multiple instance of captcha, and check if GD is loaded.
Captcha
in file captcha.class.php, class Captcha This class provide you an easy way to prevent spam by bot in public formular.
in file authorizations.class.php, method Authorizations::capture_and_shift_bit_auth() Capture authorizations and shift a particular bit to an another bit (1 is used by default).
CategoriesManager
in file categories_manager.class.php, class CategoriesManager This class enables you to manage easily the administration of categories for your modules. It's as generic as possible, if you want to complete some actions to specialize them for you module, you can create a new class inheritating of it in which you call its methods using the syntax parent::method(). /!\ Warning : /!\
Your DB table must respect some rules :
You must have an integer attribute whose name is id and which represents the identifier of each category. It must be a primary key.
You also must have an integer attribute named id_parent which represents the identifier of the parent category (it will be 0 if its parent category is the root of the tree).
To maintain order, you must have a field containing the rank of the category which be an integer named c_order.
A field visible boolean (tynint 1 sur mysql)
A field name containing the category name
In this class the user are supposed to be an administrator, no checking of his auth is done.
To be correctly displayed, you must supply to functions a variable extracted from a file cache. Use the Cache class to build your file cache. Your variable must be an array in which keys are categories identifiers, an values are still arrays which are as this :
key id_parent containing the id_parent field of the database
key name containing the name of the category
key order
key visible which is a boolean
You can also have other fields such as auth level, description, visible, that class won't modify them.
To display the list of categories and actions you can do on them, you may want to customize it. For that you must build an array that you will give to set_display_config() containing your choices :
Key 'xmlhttprequest_file' which corresponds to the name of the file which will treat the AJAX requests. We usually call it xmlhttprequest.php.
Key 'url' which represents the url of the category (it won't display any link up to categories if you don't give this field). Its structure is the following :
key 'unrewrited' => string containing unrewrited urls (let %d where you want to display the category identifier)
Key administration_file_name which represents the file which allows you to update category
rewrited url (optionnal) 'rewrited' => string containing rewrited urls (let %d where you want to display the category identifier and %s the category name if you need it)
If you need more informations to use this class, we advise you to look at the wiki of PHPBoost, in which there is a tutorial explaining how to use it step by step.
in file categories_manager.class.php, method CategoriesManager::check_error() Checks if an error has been raised on the last reported error. At each call of a method of this class which can raise an error, the last error is erased.
in file comments.class.php, class Comments This class manages comments everywhere in phpboost Simplyfied use with the display_comments function: //news is the name of the modue, $idnews is the id in database for this item. display_comments('news', $idnews, url('news.php?id=' . $idnews . '&com=%s', 'news-0-' . $idnews . '.php?com=%s'))
compress
in file url.class.php, method Url::compress() Compress a url by removing all "folder/.." occurrences
compute_heritated_auth
in file categories_manager.class.php, method CategoriesManager::compute_heritated_auth() Computes the global authorization level of the whole parent categories. The result corresponds to all the category's parents merged.
compute_number_contrib_for_each_profile
in file contribution_service.class.php, method ContributionService::compute_number_contrib_for_each_profile() Computes the number of contributions available for each profile. It will count the contributions for the administrator, the moderators, the members, for each group and for each member who can have some special authorizations.
in file mysql.class.php, method Sql::concat() Generates the syntax to use the concatenation operator (CONCAT in MySQL). The MySQL fields names must be in a PHP string for instance between simple quotes: 'field_name' The PHP variables must be bordered by simple quotes, for example: '\'' . $my_var . '\''
in file content_formatting_factory.class.php, class ContentFormattingFactory This class is approximatively a factory which provides objets capable to format some content. The text formatting uses a syntax, PHPBoost supports both the BBCode syntax and a WYSIWYG tool syntax (TinyMCE). You can choose the formatting type you want to deal with.
in file content_second_parser.class.php, class ContentSecondParser This class ensures the real time processing of the content. The major part of the processing is saved in the database to minimize as much as possible the treatment when the content is displayed. However, some tags cannot be cached, because we cannot have return to the original code. It's for instance the case of the code tag which replaces the code by a lot of html code which formats the code. This kind of tag is treated in real time by this class. The content you put in that parser must come from a ContentParser class (BBCodeParser or TinyMCEParser) (it can have been saved in a database between the first parsing and the real time parsing).
ContentUnparser
in file content_unparser.class.php, class ContentUnparser This class is an abstract class. It contains the common elements needed by all the unparsers of PHPBoost.
in file contribution.class.php, class Contribution This class represents a contribution made by a user to complete the content of the website. All the contributions are managed in the contribution panel.
ContributionService
in file contribution_service.class.php, class ContributionService This service allows developers to manage their contributions.
in file session.class.php, method Session::csrf_get_protect() Check the session against CSRF attacks by GET. Checks that GETs are done from this site with a correct token.
csrf_post_protect
in file session.class.php, method Session::csrf_post_protect() Check the session against CSRF attacks by POST. Checks that POSTs are done from this site. 2 different cases are accepted but the first is safer:
The request contains a parameter whose name is token and value is the value of the token of the current session.
If the token isn't in the request, we analyse the HTTP referer to be sure that the request comes from the current site and not from another which can be suspect
If the request doesn't match any of these two cases, this method will consider that it's a CSRF attack.
in file date.class.php, method Date::Date() Builds and initializes a date. It admits a variable number of parameters depending on the value of the first one. The second parameter allows us to chose what time referential we use to create the date:
TIMEZONE_SYSTEM if that date comes from for example the database (dates must be stored under this referential).
TIMEZONE_SITE if it's an entry coming from the site (nearly never used).
TIMEZONE_USER if it's an entry coming from the user (it's own timezone will be used)
The first parameter determines how to initialize the date, here are the rules to use for the other parameters:
DATE_NOW will initialize the date to the current time.
$date = new Date(DATE_NOW); will build a date with the current date.
DATE_YEAR_MONTH_DAY if you want to build a date from a specified day (year, month, day). In this case the following parameters are:
int The year (for instance 2009)
int The month (for example 11)
int The day (for example 09)
For example, $date = new Date(DATE_YEAR_MONTH_DAY, TIMEZONE_USER, 2009, 11, 09);
DATE_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND if you want to build a date from a specified time. Here is the rule for the following parameters:
int The year (for instance 2009)
int The month (for instance 11)
int The day (for instance 09)
int The hour (for instance 12)
int The minutes (for instance 34)
int The seconds (for instance 12)
For instance $date = new Date(DATE_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, 2009, 11, 09, 12, 34, 12);
DATE_TIMESTAMP which builds a date from a UNIX timestamp.
For example $date = new Date(DATE_TIMESTAMP, time()); is equivalent to $date = new Date(DATE_NOW);
DATE_FROM_STRING which decodes a date written in a string by matching a pattern you have to specify.
The pattern is easy to write: d for day, m for month and y for year.
For instance, if your third parameter is '24/12/2009' and the fourth is 'm/d/y', it will be the december 24th of 2009.
Here are the rules:
Date
in file date.class.php, class Date This class allows you to handle easily some dates. A date is a day and an hour (year, month, day, hour, minutes, seconds). It supports the most common formats and manages timezones. Here are the definitions of the 3 existing timezones:
System timezone: it's the timezone of the server, configured by the hoster. For instance, if your server is in France, it should be GMT+1.
Site timezone: it's the timezone of the central place of the site. For example, if your site deals with the italian soccer championship, it will be GMT+1.
User timezone : each registered user can specify its timezone. It's particulary useful for people who visit some sites from a foreign country.
date_diff
in file mysql.class.php, method Sql::date_diff() Generates the MySQL syntax which enables you to compute the number of years separating a date in a data base field and today.
in file mini_calendar.class.php, method MiniCalendar::display() Displays the mini calendar. You must call the display method in the same order as the calendars are displayed, because it requires a javascript code loading.
display
in file pagination.class.php, method Pagination::display() Returns a list of links between pages.
display
in file menu.class.php, method Menu::display() Display the menu
in file functions.inc.php, function display_comments() Returns the HTML code of the comments manager.
display_editor
in file functions.inc.php, function display_editor() Returns the HTML code of the user editor. It uses the ContentFormattingFactory class, it allows you to write less code lines.
in file note.class.php, method Note::display_form() Display the ajax notation form.
display_img
in file note.class.php, method Note::display_img() Static method which display the notation with images, you can restrain the number of images displayed with the argument $num_stars_display
in file errors.class.php, class Errors This class is the error manager of PHPBoost. It is designed to collect and store all errors occurs in the projet.
in file site_map_section.class.php, method SiteMapSection::export() Exports the section according to the given configuration. You will use the following template variables:
SECTION_NAME which contains the name of the section
SECTION_URL which contains the URL of the link associated to the section
DEPTH which contains the depth of the section in the site map tree (useful for CSS classes names)
LINK_CODE which contains the code got by the associated link export
C_SECTION, boolean meaning that it's a section (useful if you want to use a sigle template for the whole export configuration)
A loop "element" containing evert element of the section (their code is available in the CODE variable of the loop)
in file feed.class.php, method Feed::export() Exports the feed as a string parsed by the <$tpl> template
export
in file module_map.class.php, method ModuleMap::export() Exports the sitemap (according to a configuration of templates). In your template, you will be able to use the following variables:
MODULE_NAME which contains the name of the module
MODULE_DESCRIPTION which contains the description of the module
MODULE_URL which contains the URL of the module root page
DEPTH which is the depth of the module map in the sitemap (generally 1).
It might be usefull to apply different CSS styles to each level of depth.
LINK_CODE which contains the code of the link associated to the module root exported with the same configuration.
C_MODULE_MAP which is a boolean whose value is true, this will enable you to use a single template for the whole export configuration
The loop "element" for which the variable CODE contains the code of each sub element of the module (for example categories)
export
in file site_map.class.php, method SiteMap::export() Exports a SiteMap. You will be able to use the following variables into the templates used to export:
C_SITE_MAP which is a condition indicating if it's a site map (useful if you want to use a sigle template
for the whole export configuration)
SITE_NAME which contains the name of the site
A loop "element" in which the code of each element is in the variable CODE
export
in file site_map_link.class.php, method SiteMapLink::export() Exports the section according to the given configuration. You will use the following template variables:
LOC containing the URL of the link
TEXT containing the name of the target page
C_DISPLAY_DATE indicating if the date is not empty
DATE containing the date of the last modification of the target page, formatted for the sitemap.xml file
ACTUALIZATION_FREQUENCY corresponding to the code needed in the sitemap.xml file
PRIORITY corresponding to the code needed in the sitemap.xml file to indicate the priority of the target page.
C_LINK indicating that we are displaying a link (useful if you want to use a signe template export configuration)
export_file
in file backup.class.php, method Backup::export_file() Writes the backup script in a text file.
export_html_text
in file content_second_parser.class.php, method ContentSecondParser::export_html_text() Transforms a PHPBoost HTML content to make it exportable and usable every where in the web.
in file mysql.class.php, method Sql::fetch_assoc() Browses a MySQL result resource row per row. When you call this method on a resource, you get the next row.
fetch_row
in file mysql.class.php, method Sql::fetch_row() Browses a MySQL result resource row per row. When you call this method on a resource, you get the next row.
in file file.class.php, method File::finclude() Includes the file. Executes its PHP content here. Equivalent to the PHP include function.
find_by_criteria
in file contribution_service.class.php, method ContributionService::find_by_criteria() Builds a list of the contributions matching the required criteria(s). All the parameters represent the criterias you can use. If you don't want to use a criteria, let the null value. The returned contribution match all the criterias (it's a AND condition).
find_by_criteria
in file administrator_alert_service.class.php, method AdministratorAlertService::find_by_criteria() Builds a list of alerts matching the required criteria(s). You can specify many criterias. When you use several of them, it's a AND condition. It will only return the alert which match all the criterias.
in file functions.inc.php, function find_require_dir() Finds a folder according to the user language. You find the file in a folder in which there is one folder per lang. If it doesn't exist, you want to choose the file in another language. This function returns the path of an existing file (if the required lang exists, it will be it, otherwise it will be one of the existing files).
in file form_checkbox_option.class.php, class FormCheckboxOption This class manages the checkbox fields. It provides you some additionnal field options:
optiontitle : The option title
checked : Specify it whether the option has to be checked.
FormField
in file form_field.class.php, class FormField Abstract class which manage Fields. You can specify several option with the argument $fieldOptions :
title : The field title
subtitle : The field subtitle
value : The default value for the field
id : The field identifier
class : The css class used for the field
required : Specify if the field is required.
onblur : Action performed when cursor is clicked outside the field area. (javascript)
in file form_hidden_field.class.php, class FormHiddenField This class manage hidden input fields.
FormRadioChoice
in file form_radio_choice.class.php, class FormRadioChoice This class manage radio input fields.
FormRadioChoice
in file form_radio_choice.class.php, method FormRadioChoice::FormRadioChoice() constructor It takes a variable number of parameters. The first two are required.
FormRadioChoiceOption
in file form_radio_choice_option.class.php, class FormRadioChoiceOption This class manage radio input field options. It provides you additionnal field options :
optiontitle : The option title
checked : Specify if the option has to be checked.
in file module_interface.class.php, method ModuleInterface::functionality() Check the existance of the functionality and if exists call it. If she's not available, the FUNCTIONNALITY_NOT_IMPLEMENTED flag is raised.
in file cache.class.php, method Cache::generate_all_files() Regenerates all the cache files managed by the PHPBoost cache manager. This method needs a lot of resource, call it only when you are sure you need it.
in file backup.class.php, method Backup::generate_drop_table_query() Concatenates the query which drops the PHPBoost tables only if they exist to the backup SQL script.
generate_file
in file cache.class.php, method Cache::generate_file() Generates a file according to the specified method.
in file authorizations.class.php, method Authorizations::generate_select() Generate a multiple select field for the form which create authorization for ranks, groups and members.
get
in file file_system_element.class.php, method FileSystemElement::get() Initializes the file system element just before to be read.
in file administrator_alert_service.class.php, method AdministratorAlertService::get_all_alerts() Lists all the alerts of the site. You can order them. You can also choose how much alerts you want.
get_all_content
in file folder.class.php, method Folder::get_all_content() Returns all the file system elements contained by the folder.
in file modules_discovery_service.class.php, method ModulesDiscoveryService::get_all_modules() Returns a list with all the modules in it, even with those that have no ModuleInterface. Useful to do generic operations on modules.
in file content_formatting_factory.class.php, method ContentFormattingFactory::get_available_tags() Returns the map of all the formatting types supported by the PHPBoost formatting editors and parsers. The keys of the map are the tags identifiers and the values the tags names.
in file mail.class.php, method Mail::get_content() Returns the mail content.
get_content
in file parser.class.php, method Parser::get_content() Returns the content of the parser. If you called a method which parses the content, this content will be parsed.
get_contents
in file file.class.php, method File::get_contents() Returns the content of the file.
in file content_formatting_factory.class.php, method ContentFormattingFactory::get_editor() Returns an editor object which will display the editor corresponding to the language you chose.
get_entitled
in file event.class.php, method Event::get_entitled() Returns the entitled of the event.
in file categories_manager.class.php, method CategoriesManager::get_feeds_list() Computes the list of the feeds corresponding to each category of the category tree.
get_feed_menu
in file feed.class.php, method Feed::get_feed_menu() Generates the code which shows all the feeds formats.
in file folder.class.php, method Folder::get_files() Lists the files contained in this folder.
get_first_folder
in file folder.class.php, method Folder::get_first_folder() Returns the first folder present in this folder
get_first_msg
in file pagination.class.php, method Pagination::get_first_msg() Returns the first message of the current page displayed. It usually used in SQL queries. Example : $Sql->query_while("SELECT n.contents FROM " . PREFIX . "news n " . $Sql->limit($Pagination->get_first_msg($CONFIG_NEWS['pagination_news'], 'p'), $CONFIG_NEWS['pagination_news']), __LINE__, __FILE__); For further informations, refer to the db package documentation.
in file event.class.php, method Event::get_identifier() Gets the identifier of the event. To retrieve your event, you might need to have a field in which you put some informations, for example a hash or an identifier. It's that identifier which can be used to filter the events.
get_ids
in file search.class.php, method Search::get_ids() Returns the search id
get_id_in_module
in file event.class.php, method Event::get_id_in_module() Gets the id in the module. This value corresponds to the id of the daba base entry associated to the event.
in file functions.inc.php, function get_ini_config() Returns the config field of a module configuration file. In fact, this field contains the default module configuration in which we can find some " characters. To solve the problem, this field is considered as a comment and when we want to retrieve its value, we have to call this method which returns its value.
in file site_map_export_config.class.php, method SitemapExportConfig::get_link_stream() Returns the Template object to use while exporting a SiteMapLink object.
in file bench.class.php, method Bench::get_microtime() computes the time with a microsecond precision
get_mime
in file mail.class.php, method Mail::get_mime() Returns the MIME type of the mail content
get_minutes
in file date.class.php, method Date::get_minutes() Returns the minutes of the date
get_module
in file contribution.class.php, method Contribution::get_module() Gets the module in which the contribution is used.
get_module
in file modules_discovery_service.class.php, method ModulesDiscoveryService::get_module() Returns the ModuleInterface of the module which id is $module_id.
get_module_data_path
in file template.class.php, method Template::get_module_data_path() Retrieves the path of the module. This path will be used to write the relative paths in your templates.
in file administrator_alert.class.php, method AdministratorAlert::get_priority_name() Gets the priority name. It's automatically translater to the user language, ready to be displayed.
in file search.class.php, method Search::get_results() Puts results from the search results in the $results parameter and returns the number of results. Query complexity: 1 query.
get_results_by_id
in file search.class.php, method Search::get_results_by_id() Puts results from the search results identified by the $id_search parameter in the $results parameter and returns the number of results. Query complexity: 2 queries.
get_script
in file backup.class.php, method Backup::get_script() Returns the current backup script.
get_seconds
in file date.class.php, method Date::get_seconds() Returns the seconds of the date
in file site_map_export_config.class.php, method SitemapExportConfig::get_section_stream() Returns the Template object to use while exporting a SiteMapSection object.
in file functions.inc.php, function get_start_page() Retrieves the site start page.
get_status
in file event.class.php, method Event::get_status() Gets the status of the event. The status is one of those elements: ul> <li>EVENT_STATUS_UNREAD if it's not read.</li> <li>EVENT_STATUS_BEING_PROCESSED if the event is beeing processed</li> <li>EVENT_STATUS_PROCESSED if the event is processed. </ul>
get_status_name
in file contribution.class.php, method Contribution::get_status_name() Gets the contribution status name. It's automatically translated in the user language, ready to be displayed.
get_status_name
in file event.class.php, method Event::get_status_name() Gets the event status name. It's automatically translated in the user language.
get_tables_list
in file backup.class.php, method Backup::get_tables_list() Retrieves the list of the tables used by PHPBoost.
in file backup.class.php, method Backup::get_tables_properties_list() Lists the tables (name and informations relative to each table) of the data base at which is connected this SQL object. This method calls the SHOW TABLE STATUS MySQL query, to know more about it, see http://dev.mysql.com/doc/refman/5.1/en/show-table-status.html
in file event.class.php, method Event::get_type() Gets the type of the event. To retrieve your event, you might need to have a type of event, for example if your module has differents kinds of events. With this field, you can specify it.
in file feeds_cat.class.php, method FeedsCat::get_url() Returns the feed url
get_user_editor
in file content_formatting_factory.class.php, method ContentFormattingFactory::get_user_editor() Returns the name of the editor of the current user (chosen in its profile).
get_utheme
in file functions.inc.php, function get_utheme() Returns the current user's theme.
in file date.class.php, method Date::get_year() Returns the year of the date
gmdate_format
in file functions.inc.php, function gmdate_format() Formats a date according to a specific form.
got_error
in file module_interface.class.php, method ModuleInterface::got_error() Returns the last error. If called with no arguments, returns true if an error has occured otherwise, false. If the method got an argument,
Group
in file groups.class.php, class Group This class provides methods to manage user in groups.
Group
in file groups.class.php, method Group::Group() Constructor. Loads informations groups.
in file url.class.php, method Url::html_convert_root_relative2relative() Transforms the relative URL whose base is the site root (for instance /images/mypic.png) to the real relative path fited to the current page.
in file mysql.class.php, method Sql::insert_id() Gets the ID generated from the previous INSERT operation.
insert_results
in file search.class.php, method Search::insert_results() Inserts search results in the database cache in order to speed up next searches. Query complexity: 1 + k / 10 queries. (k represent the number of results to insert in the database)
in file mysql.class.php, method Sql::list_databases() Lists the existing data bases on the DBMS at which the object is connected. Only the data bases visible for the user connected will be returned.
list_db_tables
in file backup.class.php, method Backup::list_db_tables() Retrieves the list of the tables present on the database used.
list_fields
in file mysql.class.php, method Sql::list_fields() Lists all the columns of a table.
list_tables
in file mysql.class.php, method Sql::list_tables() Lists the tables (name and informations relative to each table) of the data base at which is connected this SQL object. This method calls the SHOW TABLE STATUS MySQL query, to know more about it, see http://dev.mysql.com/doc/refman/5.1/en/show-table-status.html
load
in file session.class.php, method Session::load() Get informations from the user, and set it for his session.
load
in file cache.class.php, method Cache::load() Loads a file file.
load
in file menu_service.class.php, method MenuService::load() Retrieve a Menu Object from the database by its id
load
in file application.class.php, method Application::load() Loads an XML description
LOAD_CACHE
in file categories_manager.class.php, constant LOAD_CACHE
load_data
in file images_stats.class.php, method Stats::load_data() Load data for the charts.
load_data
in file feed.class.php, method Feed::load_data() Loads a FeedData element
load_file
in file rss.class.php, method RSS::load_file() Loads a feed by its url
load_file
in file atom.class.php, method ATOM::load_file() Loads a feed by its url
load_file
in file feed.class.php, method Feed::load_file() Loads a feed by its url
load_ini_file
in file functions.inc.php, function load_ini_file() Loads a configuration file. You choose a bases path, and you specify a folder name in which you file should be found, if it doesn't exist, it will take a file in another folder. It's very interesting when you want to
load_menu_lang
in file functions.inc.php, function load_menu_lang() Loads a menu lang file. It will load alone the file corresponding to the user lang, but if it doesn't exist, another lang will be choosen. An error will be displayed on the page and the script execution will be stopped if no lang file is found for this menu.
load_module_lang
in file functions.inc.php, function load_module_lang() Loads a module lang file. It will load alone the file corresponding to the user lang, but if it doesn't exist, another lang will be choosen. An error will be displayed on the page and the script execution will be stopped if no lang file is found for this module.
lock
in file comments.class.php, method Comments::lock() Lock or unlock comments for an item.
lock
in file file.class.php, method File::lock() Locks the file (it won't be readable by another thread which could try to access it).
in file menu_service.class.php, class MenuService This service manage kernel menus by adding the persistance to menus objects. It also provides all moving and disabling methods to change the website appearance.
in file authorizations.class.php, method Authorizations::merge_auth() Merge two authorizations array, first is the parent, second is the inherited child.
in file mini_calendar.class.php, method MiniCalendar::MiniCalendar() Builds a calendar which will be displayable.
MiniCalendar
in file mini_calendar.class.php, class MiniCalendar This class enables you to retrieve easily a date entered by a user. If the user isn't in the same timezone as the server, the hour will be automatically recomputed.
in file module_interface.class.php, class ModuleInterface This Class allow you to call methods on a ModuleInterface extended class that you're not sure of the method's availality. It also provides a set of generic methods that you could use to integrate your module with others, or allow your module to share services.
in file module_map.class.php, class ModuleMap The ModuleMap class represents the map of a module. It has a description (generally the module description) and contains some elements which can be some simple links or some sections (which can match the categories for example).
in file modules_discovery_service.class.php, class ModulesDiscoveryService This class is a ModuleInterface factory providing some services like mass operations (on several modules at the same time) or identifications methods to get all modules that provide a given functionality
in file module_interface.class.php, constant MODULE_NOT_AVAILABLE module_interface. ------------------- begin : January 15, 2008 copyright : (C) 2008 Loïc Rouchon email : horn@phpboost.
###################################################
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
in file menu_service.class.php, method MenuService::move() Move a menu into a block and save it. Enable or disable it according to the destination block
move
in file categories_manager.class.php, method CategoriesManager::move() Moves a category (makes it gone up or down)
in file categories_manager.class.php, method CategoriesManager::move_into_another() Moves a category into another category. You can specify its future position in its future parent category.
in file packages_manager.class.php, class PackagesManager This class enables you to manages the PHPBoost packages which are nothing else than the modules.
pages_displayed
in file functions.inc.php, function pages_displayed() This function is called by the kernel on each displayed page to count the number of pages seen at each hour.
in file pagination.class.php, class Pagination This class enables you to manage easily a pagination system. It's very useful when you have a lot of items and you cannot display all of them. It also can generate the where clause to insert in your SQL query which selects the items.
parse
in file template.class.php, method Template::parse() Parses the file. It will use the variables you assigned.
parse
in file bbcode_parser.class.php, method BBCodeParser::parse() Parses the parser content from BBCode to XHTML.
parse
in file mysql.class.php, method Sql::parse() Parses a SQL file. The SQL file contains the name of the tables with the prefix phpboost_.
parse
in file bbcode_unparser.class.php, method BBCodeUnparser::parse() Unparses the content of the parser. Converts it from HTML syntax to BBcode syntax
parse
in file template_highlighter.class.php, method TemplateHighlighter::parse() Highlights the code. It uses the geshi HTML syntax highlighter and then it highlights the specific template syntax.
parse
in file bbcode_highlighter.class.php, method BBCodeHighlighter::parse() Highlights the content of the parser.
parse
in file tinymce_unparser.class.php, method TinyMCEUnparser::parse() Unparses the content of the parser. It goes from the PHPBoost reference formatting syntax to the TinyMCE one.
parse
in file tinymce_parser.class.php, method TinyMCEParser::parse() Parses the content of the parser. Translates the whole content from the TinyMCE syntax to the PHPBoost one.
parse
in file content_second_parser.class.php, method ContentSecondParser::parse() Parses the content of the parser. The result will be ready to be displayed.
parse
in file content_parser.class.php, method ContentParser::parse() Parses the content of the parser
Parser
in file parser.class.php, method Parser::Parser() Builds a Parser object.
Parser
in file parser.class.php, class Parser This class is the basis of all the formatting processings that exist in PHPBoost.
in file functions.inc.php, function parse_ini_array() Parses a table written in a special syntax which is user-friendly and can be inserted in a ini file (PHP serialized arrays cannot be inserted because they contain the " character). The syntax is very easy, it really looks like the PHP array declaration: key => value, key2 => value2 You can nest some elements: key => (key1 => value1, key2 => value2), key2 => value2
path_to_root
in file url.class.php, method Url::path_to_root() Overrides the used PATH_TO_ROOT. if the argument is null, the value is only returned. Please note this is a PHP4 hack to allow a Class variable.
in file template.class.php, method Template::pparse() Parses the file whose name is $parse_name and which has been declared with the set_filenames_method. It uses the variables you assigned (when you assign a variable it will be usable in every file handled by this object).
PrivateMsg
in file pm.class.php, class PrivateMsg This class provides methods to manage private message.
PRODUCTION_MODE
in file categories_manager.class.php, constant PRODUCTION_MODE
in file mysql.class.php, method Sql::query() Sends a simple selection query to the DBMS and retrieves the result. A simple query selects only one field in one row.
query_array
in file mysql.class.php, method Sql::query_array() This method makes automatically a query on several fields of a row. You tell it in which table you want to select, which row you want to use, and it will return you the values. It takes a variable number of parameters.
query_close
in file mysql.class.php, method Sql::query_close() Frees the memory allocated for a resource.
query_inject
in file mysql.class.php, method Sql::query_inject() This method enables you to execute CUD (Create Update Delete) queries in the database, and more generally, any query which has not any return value.
query_while
in file mysql.class.php, method Sql::query_while() This method enables you to execute a Retrieve query on several rows in the data base.
in file functions.inc.php, function req() Requires a file
retrieve
in file functions.inc.php, function retrieve() Retrieves an input variable. You can retrieve any parameter of the HTTP request which launched the execution of this page.
in file breadcrumb.class.php, method BreadCrumb::reverse() Reverses the whole list of the links. It's very useful when it's easier for you to make the list in the reverse way, at the end, you only need to reverse the list and it will be ok.
root_to_local
in file url.class.php, method Url::root_to_local() Returns the relative path from the website root to the current path if working on a relative url
RSS
in file rss.class.php, class RSS This class could load a feed by its url or by a FeedData element and export it to the RSS format
RSS
in file rss.class.php, method RSS::RSS() Builds a new RSS object
in file menu_service.class.php, method MenuService::save() save a Menu in the database
save_alert
in file administrator_alert_service.class.php, method AdministratorAlertService::save_alert() Create or updates an alert in the database. It creates it whether it doesn't exist or updates it if it already exists.
in file search.class.php, method Search::Search() Builds a search object. Query Complexity: 6 + k / 10 database queries. (k represent the number of module without search cache)
in file functions.inc.php, function second_parse() Second parses a string with several default parameters. This methods exists to lighten the number of lines written.
second_parse_url
in file functions.inc.php, function second_parse_url() Second parses relative urls to absolute urls.
securit_register_globals
in file unusual_functions.inc.php, function securit_register_globals() Unsets all the variables automatically set by the register_globals option. This function must be called only if the register_globals option is enable, otherwise it is useless.
send
in file mail.class.php, method Mail::send() Sends the mail.
send
in file pm.class.php, method PrivateMsg::send() Answers to a conversation
in file url.class.php, method Url::server_url() Overrides the used SERVER URL. if the argument is null, the value is only returned. Please note this is a PHP4 hack to allow a Class variable.
Session
in file session.class.php, class Session This class manages all sessions for the users.
set_arg
in file comments.class.php, method Comments::set_arg() Set argument for the comments system.
set_attribute
in file module_interface.class.php, method ModuleInterface::set_attribute() Set the $value of the attribute identified by the string $attribute.
set_auth
in file feed_item.class.php, method FeedItem::set_auth() Sets the feed item auth, useful to check authorizations
in file contribution.class.php, method Contribution::set_auth() Sets the authorization of the contribution. It will determine who will be able to treat the contribution.
set_auth_bit
in file feed_data.class.php, method FeedData::set_auth_bit() Sets the feed auth bit, useful to check authorizations
in file parser.class.php, method Parser::set_content() Sets the content of the parser. When you will call a parse method, it will deal with this content.
in file event.class.php, method Event::set_fixing_url() Sets the URL corresponding to the event. For the contributions and the administrator alerts it's the number URL at which the problem can be solved.
set_font
in file captcha.class.php, method Captcha::set_font() Modify font used for the text on the image.
in file content_parser.class.php, method ContentParser::set_html_auth() Sets the required authorizations that are necessary to post some HTML code which will be displayed by the web browser.
set_id
in file event.class.php, method Event::set_id() Sets the id of the event. The id is the corresponding data base entry one.
set_identifier
in file editor.class.php, method ContentEditor::set_identifier() Set the html identifier of the textarea field which contain the content to edit.
set_identifier
in file event.class.php, method Event::set_identifier() Sets the event identifier. To retrieve your event, you might need to have a field in which you put some informations, for example a hash or an identifier. It's that identifier which can be used to filter the events. You don't have to use it, you can let it blank.
set_id_in_module
in file event.class.php, method Event::set_id_in_module() Sets the id in module parameter. It corresponds to the id of the element corresponding to the event in your data base tables. For example, il you use the events to allow user to purpose some news in your web site, it will be the id of the news added.
in file feed_item.class.php, method FeedItem::set_link() Sets the feed item link
set_link_stream
in file site_map_export_config.class.php, method SitemapExportConfig::set_link_stream() Sets the Template object to use while exporting a SiteMapLink object.
set_mime
in file mail.class.php, method Mail::set_mime() Sets the MIME type of the mail content
set_module
in file contribution.class.php, method Contribution::set_module() Sets the module in which the contribution is used.
in file event.class.php, method Event::set_must_regenerate_cache() Sets a private property indicating if the changes made on this event imply the regeneration of the events cache.
set_name
in file site_map_link.class.php, method SiteMapLink::set_name() Sets the name of the element
in file site_map.class.php, method SiteMap::set_site_name() Sets the name of the site. The default value is the name of the site taken from the site configuration.
set_status
in file event.class.php, method Event::set_status() Set the status of the event.
in file mini_calendar.class.php, method MiniCalendar::set_style() Sets the CSS properties of the element. You can use it if you want to customize the mini calendar, but the best solution is to redefine the template in your module. The template used is framework/mini_calendar.tpl.
set_subregex_multiplicity
in file functions.inc.php, function set_subregex_multiplicity() Returns the sub-regex with its multiplicity option
set_template
in file errors.class.php, method Errors::set_template() Set a personnal template for the handler methods.
in file links_menu.class.php, method LinksMenu::set_type() Sets the type of the menu
set_type
in file event.class.php, method Event::set_type() Sets the type of the event. To retrieve your event, you might need to have a type of event, for example if your module has differents kinds of events. With this field, you can specify it.
in file captcha.class.php, method Captcha::set_width() Modify width of the image.
SiteMap
in file site_map.class.php, class SiteMap Describes the map of the site. Can be exported according to any text form by using a template configuration. A site map contains some links, some link sections and some module maps (which also contain links and sections).
SiteMap
in file site_map.class.php, method SiteMap::SiteMap() Builds a SiteMap object with its elements
SiteMapElement
in file site_map_element.class.php, class SiteMapElement This abstract is the root of every object which can be contained by a SiteMap object. Some SiteMapElements objects can contain one or many SiteMapElement objects therefore the elements can be represented by a tree an each element has a depth in the tree.
in file site_map_export_config.class.php, class SitemapExportConfig Configuration used to export a SiteMap. It contains some Template objects which are used to export each kind of elements of a sitemap. Using different configurations will enable you for example to export in HTML code to be displayed in a page of the web site (the site map) or to be written in the sitemap.xml file at the root of your site, this file will be read by the search engines to optimize the research of your site.
SiteMapLink
in file site_map_link.class.php, class SiteMapLink This class represents a link of a site map.
in file site_map.class.php, constant SITE_MAP_SEARCH_ENGINE_MODE It will be for the search engines (sitemap. can be forgotten in that case.
SITE_MAP_USER_MODE
in file site_map.class.php, constant SITE_MAP_USER_MODE It will be a page of the site containing the site map
Sql
in file mysql.class.php, class Sql This class manages all the database access done by PHPBoost. It currently manages only one DBMS, MySQL, but we made it as generic as we could. It doesn't support ORM (Object Relationnal Mapping). On PHPBoost, all the table which are used contain a prefix which enables for example to install several instances of the software on the same data base. When you execute a query in a table, concatenate the PREFIX constant before the name of your table. Notice also that the kernel tables can have their name changed. You must not use their name directly but the constants which are defined in the file /kernel/db/tables.php.
If you encounter any problem when writing queries, you should search what you need in the MySQL documentation, which is very well done: http://dev.mysql.com/doc/
Sql
in file mysql.class.php, method Sql::Sql() Builds a MySQL connection.
start
in file session.class.php, method Session::start() Start the session
in file functions.inc.php, function strhash() Return a SHA256 hash of the $str string [with a salt]
strparse
in file functions.inc.php, function strparse() Parses a string with several default parameters. This methods exists to lighten the number of lines written.
strprotect
in file functions.inc.php, function strprotect() Protects an input variable. Never trust user input!
strtodate
in file functions.inc.php, function strtodate() Converts a formatted date to the SQL date format.
strtotimestamp
in file functions.inc.php, function strtotimestamp() Parses a formatted date
in file feed_data.class.php, method FeedData::subitems() Returns a items list containing $number items starting from the $begin_at one
substr_html
in file functions.inc.php, function substr_html() Cuts a string containing some HTML code which contains some HTML entities. The substr PHP function considers a HTML entity as several characters. This function allows you to consider them as only one character.
in file template.class.php, method Template::Template() Builds a Template object.
Template
in file template.class.php, class Template This class allows you to handle a template file. Your template files should have the .tpl extension. <h1>The PHPBoost template syntax</h1> <h2>Simple variables</h2> A simple variable is accessible with the {NAME} syntax where NAME is its template name. If the variable is not assigned, nothing will be displayed (no error message). Simple variables are assigned by the assign_vars() method. <h2>Loops</h2> You can make some loops to repeat a pattern, those loops can be nested. A loop has a name (name) and each iteration contains some variables, for example, the variable VAR.
START name #
My variable is {name.VAR}
END name #
To nest loops, here is an example:
START loop1 #
I write my loop1 var here: {loop1.VAR}.
START loop1.loop2 #
I can write my loop2 var here: {loop1.loop2.VAR} but also my loop1 var of the parent loop: {loop1.VAR}.
END loop1 #
To assign the variable, see the assign_block_vars() method which creates one iteration. <h2>Conditions</h2> When you want to display something only in particular case, you can use some condition tests.
IF C_MY_TEST #
This text will be displayed only if the C_MY_TEST variable is true
ENDIF #
You can nest some conditions.</li> </ul> To be more efficient, this class uses a cache and parses each file only once. <h1>File paths</h1> The web site can have several themes whose files aren't in the same folders. When you load a file, you just have to load the generic file and the good template file will be loaded dinamically. <h2>Kernel template file</h2> When you want to load a kernel template file, the path you must indicate is only the name of the file, for example header.tpl loads /template/your_theme/header.tpl and if it doesn't exist, it will load /template/default/header.tpl. <h2>Module template file</h2> When you want to load a module template file, you must indicate the name of you module and then the name of the file like this: module/file.tpl which will load the /module/templates/file.tpl. If the user themes redefines the file.tpl file for the module module, the file templates/your_theme/modules/module/file.tpl will be loaded. <h2>Menu template file</h2> To load a file of a menu, use this kind of path: menus/my_menu/file.tpl which will load the /menus/my_menu/templates/file.tpl file. <h2>Framework template file</h2> To load a framework file, use a path like this: framework/package/file.tpl which will load /templates/your_theme/framework/package/file.tpl if the theme overrides it, otherwise /templates/default/framework/package/file.tpl will be used.
TemplateHighlighter
in file template_highlighter.class.php, class TemplateHighlighter This is a syntax highlighter for the PHPBoost template syntax.
in file tinymce_parser.class.php, class TinyMCEParser This class enables to use TinyMCE without breaking the compatibility with the BBCode formatting. PHPBoost has a reference syntax, it in HTML with specific CSS classes. The HTML code generated by TinyMCE must be modified to conform itself to this specific syntax. This class makes the translation from the TinyMCE HTML to the PHPBoost HTML.
in file tinymce_unparser.class.php, class TinyMCEUnparser This class enables to translate the content formatting from the PHPBoost standard one to the TinyMCE one. The PHPBoost one is historically the one corresponding to the BBCode translation in HTML and is now the reference. TinyMCE has a particular syntax and it must be respected if we want to make a formatting which can be edited after having beeing written, enough what using a WYSIWYG editor hasn't any advantage.
in file file.class.php, method File::unlock() Unlocks a file. The file must have been locked before you call this method.
unparse
in file functions.inc.php, function unparse() Unparses a string with several default parameters. This methods exists to lighten the number of lines written.
in file url.class.php, class Url This class offers a simple way to transform an absolute or relative link to a relative one to the website root. It can also deals with absolute url and will convert only those from this site into relatives ones. Usage :
In content, get the url with the absolute() method. It will allow content include at multiple level
In forms, get the url with the relative() method. It's a faster way to display url
Url
in file url.class.php, method Url::Url() Build a Url object. By default, builds an Url object representing the current path. If the url is empty, no computation is done and an empty string will be returned when asking for both relative and absolute form of the url.
url
in file functions.inc.php, function url() Adds the session ID to an URL if the user doesn't accepts cookies. This functions allows you to generate an URL according to the site configuration concerning the URL rewriting.
url_encode_rewrite
in file functions.inc.php, function url_encode_rewrite() Prepares a string for it to be used in an URL (with only a-z, 0-9 and - characters).
in file user.class.php, method User::User() Sets global authorizations which are given by all the user groups authorizations.
User
in file user.class.php, class User This class manage user, it provide you methods to get or modify user informations, moreover methods allow you to control user authorizations
in file upload.class.php, method Upload::validate_img() Checks whether an image is compliant to an maximum width and height, otherwise is $delete value is true delete it.
VERTICAL_MENU
in file links_menu.class.php, constant VERTICAL_MENU
in file functions.inc.php, function wordwrap_html() Inserts a carriage return every $lenght characters. It's equivalent to wordwrap PHP function but it can deal with the HTML entities. An entity is coded on several characters and the wordwrap function counts several characters for an entity whereas it represents only one character.
write
in file file_system_element.class.php, method FileSystemElement::write() Does the necessary treatment to apply at each writing operation
in file menu.class.php, method Menu::_assign() Assign tpl vars
_check_cache_file
in file template.class.php, method Template::_check_cache_file() Allows you to know if the cache file is still valid or if it has to be removed because the source file has been updated.
_check_file
in file template.class.php, method Template::_check_file() Computes the path of the file to load dinamycally according to the user theme and the kind of file (kernel, module, menu or framework file).
in file template.class.php, method Template::_include() Include a file in another file. You can access to the same variables in the two variables, it's just as if you had copied the content of the included file in the includer.
_load
in file template.class.php, method Template::_load() Loads a template file.
_parent
in file links_menu_element.class.php, method LinksMenuElement::_parent() Increase the Menu Depth and set the menu type to its parent one
_parent
in file links_menu.class.php, method LinksMenu::_parent() Increase the Menu Depth and set the menu type to its parent one