', $id, $description );
}
/**
* Show a checkbox option
*
* @param string $id option id
* @param string $name descriptive option name
* @param string $description option description
* @param boolean $isHidden set to true to initially hide the option (default: false)
* @param string $groupName define a class name to access a group of option rows by javascript (default: empty)
* @param boolean $hideDescription $hideDescription set to false to show description initially (default: true)
* @param string $onChange javascript for onchange event (default: empty)
*/
private function showCheckbox($id, $name, $description, $isHidden = false, $groupName = '', $hideDescription = true, $onChange = '') {
printf ( '
', $name, $id, $onChange, $this->getDescription ( $id, $description, $hideDescription ) );
}
/**
* Show a textarea option
*
* @param string $id option id
* @param string $name descriptive option name
* @param int $rows number of rows to show
* @param string $description option description
* @param boolean $isHidden set to true to initially hide the option (default: false)
* @param string $groupName define a class name to access a group of option rows by javascript (default: empty)
* @param boolean $hideDescription $hideDescription set to false to show description initially (default: true)
* @param string $onChange javascript for onchange event (default: empty)
* @param boolean $isReadonly set textarea to read only (default: false)
* @param boolean $global set to false if the textarea shows a site-specific option (default: true)
*/
private function showTextarea($id, $name, $rows, $description, $isHidden, $groupName, $hideDescription = true, $onChange = '', $isReadonly = false, $global = true) {
printf (
'
:
%s
', $name, $id, $onChange, ($global ? self::$settings->getGlobalOption ( $id ) : self::$settings->getOption ( $id )), $this->getDescription ( $id, $description, $hideDescription ) );
}
/**
* Show a simple text
*
* @param string $text Text to show
*/
private function showText($text) {
printf ( '
%s
', $text );
}
/**
* Show an input option
*
* @param string $id option id
* @param string $name descriptive option name
* @param string $description option description
* @param boolean $isHidden set to true to initially hide the option (default: false)
* @param string $groupName define a class name to access a group of option rows by javascript (default: empty)
* @param string $rowName define a class name to access the specific option row by javascript (default: empty)
* @param boolean $hideDescription $hideDescription set to false to show description initially (default: true)
* @param boolean $wide Create a wide box (default: false)
*/
private function showInput($id, $name, $description, $isHidden = false, $groupName = '', $rowName = false, $hideDescription = true, $wide = false) {
printf ( '
%s
', $isHidden ? 'hidden ' : '', $groupName ? $groupName : '', $rowName ? ' id="' . $groupName . '-' . $rowName . '"' : '', $name, $id, htmlentities(self::$settings->getGlobalOption( $id ), ENT_QUOTES, 'UTF-8', false), !empty($description) ? $this->getDescription ( $id, $description, $hideDescription ) : '' );
}
/**
* Show a select box option
*
* @param string $id option id
* @param string $name descriptive option name
* @param array $options list of options to show array[](option id => descriptive name)
* @param string $description option description
* @param string $onChange javascript for onchange event (default: empty)
* @param boolean $isHidden set to true to initially hide the option (default: false)
* @param string $groupName define a class name to access a group of option rows by javascript (default: empty)
* @param boolean $hideDescription $hideDescription set to false to show description initially (default: true)
* @param boolean $global set to false if the textarea shows a site-specific option (default: true)
*/
private function showSelect($id, $name, $options = array(), $description = '', $onChange = '', $isHidden = false, $groupName = '', $hideDescription = true, $global = true) {
$optionList = '';
$default = $global ? self::$settings->getGlobalOption ( $id ) : self::$settings->getOption ( $id );
if (is_array ( $options ))
foreach ( $options as $key => $value )
$optionList .= sprintf ( '', $key, $value );
printf ( '