Go to the source code of this file.
Data Structures | |
| class | claro_datagrid |
Namespaces | |
| namespace | HTML |
Functions | |
| claro_html_menu_vertical ($itemList, $attrBloc=array(), $attrItem=array()) | |
| claro_html_menu_vertical_br ($itemList, $attrBloc=array()) | |
| claro_html_menu_horizontal ($itemList) | |
| prepared_section_to_tabs ($section_list, $section_selected='', $url_params=null, $currentClassName='current') | |
| claro_html_tool_link ($url, $label, $attributeList=array()) | |
| claro_html_cmd_link ($url, $label, $attributeList=array()) | |
| claro_html_link ($url, $label, $attributeList=array()) | |
| claro_html_button ($url, $text, $confirmMessage= '') | |
| claro_html_title ($title, $level) | |
| claro_html_tool_title ($titlePart, $helpUrl=false) | |
| claro_html_message_box ($message) | |
| claro_html_breadcrumbtrail ($nameList, $urlList, $separator= '> ', $homeImg=null) | |
| claro_html_progress_bar ($progress, $factor) | |
| claro_html_msg_list ($msgArrBody, $return=true) | |
| claro_html_nestedArrayToOptionList ($elementList, $deepness=0) | |
| claro_html_mailTo ($mail, $mailLabel=null) | |
| claro_html_textarea_editor ($name, $content= '', $rows=20, $cols=80, $optAttrib='', $type='advanced') | |
| claro_html_simple_textarea ($name, $content= '') | |
| claro_html_advanced_textarea ($name, $content= '') | |
| claro_disp_auth_form ($cidRequired=false) | |
| claro_build_nested_select_menu ($name, $elementList) | |
| prepare_option_tags ($elementList, $deepness=0) | |
| is_htmlspecialcharized ($string) | |
| clean_str_for_javascript ($str) | |
| cleanup_mso2007_text ($string) | |
| claro_parse_user_text ($userText) | |
| make_spoiler ($text) | |
| clean_spoilerStart ($match) | |
| clean_spoilerEnd ($match) | |
| add_spoiler ($match) | |
| renderTex ($text) | |
| renderTexCallback ($matches) | |
| make_clickable ($text) | |
| claro_disp_html_area ($name, $content= '', $rows=20, $cols=80, $optAttrib='') | |
| htmlize ($phrase) | |
| claro_disp_duration ($duration) | |
| claro_html_duration ($duration) | |
| claro_html_breadcrumb () | |
| claro_html_tab_bar ($section_list, $section_selected_id=null, $url_params=array(), $section_request_var_name= 'section', $baseUrl=null) | |
| add_spoiler | ( | $ | match | ) |
Callback function used by make_spoiler function
| array | $match |
Definition at line 1332 of file html.lib.php.
| claro_build_nested_select_menu | ( | $ | name, | |
| $ | elementList | |||
| ) |
function claro_build_nested_select_menu($name, $elementList) Build in a relevant way 'select' menu for an HTML form containing nested data
| string | $name, name of the select tag | |
| array | nested data in a composite way |
$elementList[1]['name' ] = 'level1'; $elementList[1]['value' ] = 'level1';
$elementList[1]['children'][1]['name' ] = 'level2'; $elementList[1]['children'][1]['value'] = 'level2';
$elementList[1]['children'][2]['name' ] = 'level2'; $elementList[1]['children'][2]['value'] = 'level2';
$elementList[2]['name' ] = 'level1'; $elementList[2]['value'] = 'level1';
Definition at line 1144 of file html.lib.php.
| claro_disp_auth_form | ( | $ | cidRequired = false |
) |
Route the script to an auhtentication form if user id is missing. Once authenticated, the system get back to the source where the form was trigged
| boolean | $cidRequired - if the course id is required to leave the form |
Definition at line 1084 of file html.lib.php.
| claro_disp_duration | ( | $ | duration | ) |
convert a duration in seconds to a human readable duration
| integer | duration time in seconds to convert to a human readable duration |
Definition at line 1520 of file html.lib.php.
| claro_disp_html_area | ( | $ | name, | |
| $ | content = '', |
|||
| $ | rows = 20, |
|||
| $ | cols = 80, |
|||
| $ | optAttrib = '' | |||
| ) |
Deprecated functions Some function still present to prevent local developpement
They would be removed after 1.8 Enhance a simple textarea with an inline html editor.
| string | $name name attribute for <textarea> tag | |
| string | $content content to prefill the area | |
| integer | $rows count of rows for the displayed editor area | |
| integer | $cols count of columns for the displayed editor area | |
| string | $optAttrib optional - additionnal tag attributes (wrap, class, ...) |
Definition at line 1490 of file html.lib.php.
| claro_html_advanced_textarea | ( | $ | name, | |
| $ | content = '' | |||
| ) |
Definition at line 644 of file html.lib.php.
| claro_html_breadcrumb | ( | ) |
Return the breadcrumb to display in the header
string $nameTools array $interbredcrump boolean $noPHP_SELF boolean $noQUERY_STRING
Definition at line 1565 of file html.lib.php.
| claro_html_breadcrumbtrail | ( | $ | nameList, | |
| $ | urlList, | |||
| $ | separator = ' > ', |
|||
| $ | homeImg = null | |||
| ) |
Allows to easily display a breadcrumb trail
| array | $nameList bame of each breadcrumb | |
| array | $urlList url corresponding to the breadcrumb name above | |
| string | $separator (optionnal) element which segregate the breadcrumbs | |
| string | $homeImg (optionnal) source url for a home icon at the trail start |
Definition at line 390 of file html.lib.php.
| claro_html_button | ( | $ | url, | |
| $ | text, | |||
| $ | confirmMessage = '' | |||
| ) |
Prepare the display of a clikcable button
This function is needed because claroline buttons rely on javascript. The function return an optionnal behavior fo browser where javascript isn't available.
| string | $url url inserted into the 'href' part of the tag | |
| string | $text text inserted between the two ... tags (note : it could also be an image ...) | |
| string | $confirmMessage (optionnal) introduce a javascript confirmation popup |
Definition at line 246 of file html.lib.php.
| claro_html_cmd_link | ( | $ | url, | |
| $ | label, | |||
| $ | attributeList = array() | |||
| ) |
Return the claroline sytled url for a link to a tool
| string | $url | |
| string | $label | |
| array | $attributeList array of array(attributeName,attributeValue) |
Definition at line 186 of file html.lib.php.
| claro_html_duration | ( | $ | duration | ) |
Definition at line 1530 of file html.lib.php.
| claro_html_link | ( | $ | url, | |
| $ | label, | |||
| $ | attributeList = array() | |||
| ) |
Return the claroline sytled url for a link to a tool
| string | $url | |
| string | $label | |
| array | $attributeList array of array(attributeName,attributeValue) |
Definition at line 210 of file html.lib.php.
| claro_html_mailTo | ( | $ | mail, | |
| $ | mailLabel = null | |||
| ) |
prepare a mailto link
| string | ||
| string | $mailLabel |
Definition at line 562 of file html.lib.php.
| claro_html_menu_horizontal | ( | $ | itemList | ) |
display a item list as vertical menu.
| array | $itemList each item are include in a list. |
Definition at line 94 of file html.lib.php.
| claro_html_menu_vertical | ( | $ | itemList, | |
| $ | attrBloc = array(), |
|||
| $ | attrItem = array() | |||
| ) |
Display a item list as vertical menu.
| array | $itemList each item are include in a list. |
Definition at line 28 of file html.lib.php.
| claro_html_menu_vertical_br | ( | $ | itemList, | |
| $ | attrBloc = array() | |||
| ) |
display a item list as vertical menu.
| array | $itemList each item are include in a list. |
Definition at line 64 of file html.lib.php.
| claro_html_message_box | ( | $ | message | ) |
Prepare display of the message box appearing on the top of the window, just below the tool title. It is recommended to use this function to display any confirmation or error messages, or to ask to the user to enter simple parameters.
| string | $message include your self any additionnal html tag if you need them |
Definition at line 361 of file html.lib.php.
| claro_html_msg_list | ( | $ | msgArrBody, | |
| $ | return = true | |||
| ) |
Display list of messages in substyled boxes in a message_box
In most of cases function message_box() is enough.
| array | $msgArrBody of array of blocs containing array of messages |
code for using this in your tools: $msgArrBody["nameOfCssClass"][]="foo"; css class can be defined in script but try to use class from generic css () error success warning ...
Definition at line 490 of file html.lib.php.
| claro_html_nestedArrayToOptionList | ( | $ | elementList, | |
| $ | deepness = 0 | |||
| ) |
prepare the 'option' html tag for the claro_disp_nested_select_menu() function
| array | $elementList | |
| integer | $deepness (optionnal, default is 0) |
Definition at line 536 of file html.lib.php.
| claro_html_progress_bar | ( | $ | progress, | |
| $ | factor | |||
| ) |
Function used to draw a progression bar
| integer | $progress progression in pourcent | |
| integer | $factor will be multiply by 100 to have the full size of the bar (i.e. 1 will give a 100 pixel wide bar) |
Definition at line 443 of file html.lib.php.
| claro_html_simple_textarea | ( | $ | name, | |
| $ | content = '' | |||
| ) |
Definition at line 639 of file html.lib.php.
| claro_html_tab_bar | ( | $ | section_list, | |
| $ | section_selected_id = null, |
|||
| $ | url_params = array(), |
|||
| $ | section_request_var_name = 'section', |
|||
| $ | baseUrl = null | |||
| ) |
Create a navigation tab bar
| array | $section_list associative array of tabs tab id => tab label | |
| string | $section_selected_id selected tab id | |
| array | $url_params associative array of additionnal parameters name => value | |
| string | $section_request_var_name name of the HTTP GET variable to store the current tab id | |
| string | $baseUrl base url of the navigation tab bar |
Definition at line 1705 of file html.lib.php.
| claro_html_textarea_editor | ( | $ | name, | |
| $ | content = '', |
|||
| $ | rows = 20, |
|||
| $ | cols = 80, |
|||
| $ | optAttrib = '', |
|||
| $ | type = 'advanced' | |||
| ) |
Insert a Wysiwyg editor inside a form instead of a textarea A standard textarea is displayed if the Wysiwyg editor is disabled or if the user's browser have no activated javascript support
| string | $name content for name attribute in textarea tag | |
| string | $content optional content previously inserted into the area | |
| int | $rows optional textarea rows | |
| int | $cols optional textarea columns | |
| string | $optAttrib optional - additionnal tag attributes (wrap, class, ...) |
Definition at line 586 of file html.lib.php.
| claro_html_title | ( | $ | title, | |
| $ | level | |||
| ) |
Displays a title inc claroline wich can be relooked by css
| string | $title | |
| string | $level 1->7 |
Definition at line 276 of file html.lib.php.
| claro_html_tool_link | ( | $ | url, | |
| $ | label, | |||
| $ | attributeList = array() | |||
| ) |
Return the claroline sytled url for a link to a tool
| string | $url | |
| string | $label | |
| array | $attributeList array of array(attributeName,attributeValue) |
Definition at line 158 of file html.lib.php.
| claro_html_tool_title | ( | $ | titlePart, | |
| $ | helpUrl = false | |||
| ) |
Displays the title of a tool. Optionally, there can be a subtitle below the normal title, and / or a supra title above the normal title.
e.g. supra title: group GROUP PROPERTIES
e.g. subtitle: AGENDA calender & events tool
| mixed | $titleElement - it could either be a string or an array containing 'supraTitle', 'mainTitle', 'subTitle' |
Definition at line 300 of file html.lib.php.
| claro_parse_user_text | ( | $ | userText | ) |
Parse the user text (e.g. stored in database) before displaying it to the screen For example it change new line charater to
tag etc.
| string | $userText original user text |
Definition at line 1261 of file html.lib.php.
| clean_spoilerEnd | ( | $ | match | ) |
Definition at line 1321 of file html.lib.php.
| clean_spoilerStart | ( | $ | match | ) |
Definition at line 1308 of file html.lib.php.
| clean_str_for_javascript | ( | $ | str | ) |
function that cleans php string for javascript
This function is needed to clean strings used in javascript output Newlines are prohibited in the script, specialchar are prohibited quotes must be addslashes
| $str | string original string |
Definition at line 1212 of file html.lib.php.
| cleanup_mso2007_text | ( | $ | string | ) |
Remove comments and noise from MS Office 2007 pasted-text that causes Internet Explorer rendering engine to halt
| string | original text |
Definition at line 1234 of file html.lib.php.
| htmlize | ( | $ | phrase | ) |
transform content in a html display
| - | string $string string to htmlize |
Definition at line 1508 of file html.lib.php.
| is_htmlspecialcharized | ( | $ | string | ) |
Checks if the string has been written html style (ie é etc)
| string | $string |
Definition at line 1194 of file html.lib.php.
| make_clickable | ( | $ | text | ) |
Completes url contained in the text with "<a href ...". However the function simply returns the submitted text without any transformation if it already contains some "<a href:" or "<img src=".
Actually this function is taken from the PHP BB 1.4 script
Notes: the email one might get annoying - it's easy to make it more restrictive, though.. maybe have it require something like xxxx@yyyy.zzzz or such. We'll see.
| string | $text text to be converted |
Definition at line 1418 of file html.lib.php.
| make_spoiler | ( | $ | text | ) |
Find all spoiler tags in text and replace them by html
| string | $text text in which replace spoiler tags |
Definition at line 1285 of file html.lib.php.
| prepare_option_tags | ( | $ | elementList, | |
| $ | deepness = 0 | |||
| ) |
prepare the 'option' html tag for the claro_disp_nested_select_menu() function
| array | $elementList | |
| int | $deepness (optionnal, default is 0) |
Definition at line 1164 of file html.lib.php.
| prepared_section_to_tabs | ( | $ | section_list, | |
| $ | section_selected = '', |
|||
| $ | url_params = null, |
|||
| $ | currentClassName = 'current' | |||
| ) |
Prepare an array of link following a list of section
| array | $section_list array('section_name'=> of section array ('label','description','properties','..'.)); | |
| string | $section_selected section_name | |
| string | $url_params query string append | |
| string | $currentClassName css class name |
Definition at line 120 of file html.lib.php.
| renderTex | ( | $ | text | ) |
Parse the user text to transform bb code style tex tags to embedded tex plugin or tex generated image depending on campus config
| string | $text original user text |
Definition at line 1355 of file html.lib.php.
| renderTexCallback | ( | $ | matches | ) |
Definition at line 1380 of file html.lib.php.
1.6.3