| | |
| | | * Configuration: |
| | | * // Minimum number of citation lines. Longer citation blocks will be hidden. |
| | | * // 0 - no limit (no hidding). |
| | | * $rcmail_config['hide_blockquote_limit'] = 0; |
| | | * $config['hide_blockquote_limit'] = 0; |
| | | * |
| | | * @version @package_version@ |
| | | * @license GNU GPLv3+ |
| | |
| | | && ($limit = $rcmail->config->get('hide_blockquote_limit')) |
| | | ) { |
| | | // include styles |
| | | $skin = $rcmail->config->get('skin'); |
| | | if (!file_exists($this->home."/skins/$skin/style.css")) { |
| | | $skin = 'default'; |
| | | } |
| | | $this->include_stylesheet("skins/$skin/style.css"); |
| | | $this->include_stylesheet($this->local_skin_path() . "/style.css"); |
| | | |
| | | // Script and localization |
| | | $this->include_script('hide_blockquote.js'); |
| | |
| | | $input = new html_inputfield(array('name' => '_'.$field_id, 'id' => $field_id, 'size' => 5)); |
| | | |
| | | $args['blocks']['main']['options']['hide_blockquote_limit'] = array( |
| | | 'title' => $this->gettext('quotelimit'), |
| | | 'content' => $input->show($limit ? $limit : '') |
| | | 'title' => $this->gettext('quotelimit'), |
| | | 'content' => $input->show($limit ?: '') |
| | | ); |
| | | |
| | | return $args; |
| | |
| | | function save_prefs($args) |
| | | { |
| | | if ($args['section'] == 'mailview') { |
| | | $args['prefs']['hide_blockquote_limit'] = (int) get_input_value('_hide_blockquote_limit', RCUBE_INPUT_POST); |
| | | $args['prefs']['hide_blockquote_limit'] = (int) rcube_utils::get_input_value('_hide_blockquote_limit', rcube_utils::INPUT_POST); |
| | | } |
| | | |
| | | return $args; |