-
-
Save emanuele45/e95df396adbf7397722a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Initializes signature settings form. | |
*/ | |
private function _initSignatureSettingsForm($return = false) | |
{ | |
global $txt; | |
$config_vars = array( | |
// Are signatures even enabled? | |
array('check', 'signature_enable'), | |
'', | |
// Tweaking settings! | |
array('int', 'signature_max_length', 'subtext' => $txt['zero_for_no_limit']), | |
array('int', 'signature_max_lines', 'subtext' => $txt['zero_for_no_limit']), | |
array('int', 'signature_max_font_size', 'subtext' => $txt['zero_for_no_limit']), | |
array('check', 'signature_allow_smileys', 'onclick' => 'document.getElementById(\'signature_max_smileys\').disabled = !this.checked;'), | |
array('int', 'signature_max_smileys', 'subtext' => $txt['zero_for_no_limit']), | |
'', | |
// Image settings. | |
array('int', 'signature_max_images', 'subtext' => $txt['signature_max_images_note']), | |
array('int', 'signature_max_image_width', 'subtext' => $txt['zero_for_no_limit']), | |
array('int', 'signature_max_image_height', 'subtext' => $txt['zero_for_no_limit']), | |
'', | |
array('bbc', 'signature_bbc'), | |
); | |
call_integration_hook('integrate_signature_settings', array(&$config_vars)); | |
if ($return) | |
return $config_vars; | |
// we're working with them settings. | |
require_once(SUBSDIR . '/Settings.class.php'); | |
// instantiate the form | |
$this->_signatureSettings = new Settings_Form(); | |
return $this->_signatureSettings->settings($config_vars); | |
} | |
[...] | |
/** | |
* Return signature settings. | |
* Used in admin center search. | |
*/ | |
public function signatureSettings() | |
{ | |
return $this->_initSignatureSettingsForm(true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, I understand the temptation. :) I have preferred not to do this, even though for many it's possible right now: I am changing the internal implementation of _initSignatureSettingsForm(), and I'd prefer to not affect anything else.