示例#1
0
 public function main($parentObject)
 {
     if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('static_info_tables')) {
         $this->pluginButtons = \TYPO3\CMS\Core\Utility\GeneralUtility::rmFromList('language', $this->pluginButtons);
     }
     return parent::main($parentObject);
 }
示例#2
0
 /**
  * Returns TRUE if the plugin is available and correctly initialized
  *
  * @param array $configuration Configuration array given from calling object down to the single plugins
  * @return bool TRUE if this plugin object should be made available in the current environment and is correctly initialized
  */
 public function main(array $configuration)
 {
     if (!ExtensionManagementUtility::isLoaded('static_info_tables')) {
         $this->pluginButtons = GeneralUtility::rmFromList('language', $this->pluginButtons);
     }
     return parent::main($configuration);
 }
示例#3
0
 /**
  * Returns TRUE if the plugin is available and correctly initialized
  *
  * @param RteHtmlAreaBase $parentObject parent object
  * @return bool TRUE if this plugin object should be made available in the current environment and is correctly initialized
  */
 public function main($parentObject)
 {
     parent::main($parentObject);
     // Do not disable this plugin even if the chMode button is disabled
     $this->pluginAddsButtons = FALSE;
     return TRUE;
 }
示例#4
0
 /**
  * Returns TRUE if the plugin is available and correctly initialized
  *
  * @param array $configuration Configuration array given from calling object down to the single plugins
  * @return bool TRUE if this plugin object should be made available in the current environment and is correctly initialized
  */
 public function main(array $configuration)
 {
     parent::main($configuration);
     // Do not disable this plugin even if the chMode button is disabled
     $this->pluginAddsButtons = false;
     return true;
 }
示例#5
0
 public function main($parentObject)
 {
     $enabled = parent::main($parentObject);
     // Check if this should be enabled based on extension configuration and Page TSConfig
     // The 'Minimal' and 'Typical' default configurations include Page TSConfig that removes images on the way to the database
     $enabled = $enabled && !($this->thisConfig['proc.']['entryHTMLparser_db.']['tags.']['img.']['allowedAttribs'] == '0' && $this->thisConfig['proc.']['entryHTMLparser_db.']['tags.']['img.']['rmTagIfNoAttrib'] == '1') && !$this->thisConfig['buttons.']['image.']['TYPO3Browser.']['disabled'];
     return $enabled;
 }
 public function main($parentObject)
 {
     $enabled = parent::main($parentObject) && $this->htmlAreaRTE->isPluginEnabled('BlockElements');
     if ($enabled && is_object($this->htmlAreaRTE->registeredPlugins['BlockElements'])) {
         $this->htmlAreaRTE->registeredPlugins['BlockElements']->setSynchronousLoad();
     }
     return $enabled;
 }
示例#7
0
 /**
  * Returns TRUE if the plugin is available and correctly initialized
  *
  * @param array $configuration Configuration array given from calling object down to the single plugins
  * @return bool TRUE if this plugin object should be made available in the current environment and is correctly initialized
  */
 public function main(array $configuration)
 {
     $available = parent::main($configuration);
     if ($this->configuration['client']['browser'] === 'opera') {
         $this->configuration['thisConfig']['hideTableOperationsInToolbar'] = 0;
     }
     return $available;
 }
 public function main($parentObject)
 {
     $available = parent::main($parentObject);
     if ($this->htmlAreaRTE->client['browser'] == 'opera') {
         $this->thisConfig['hideTableOperationsInToolbar'] = 0;
     }
     return $available;
 }
示例#9
0
 public function main($parentObject)
 {
     $available = parent::main($parentObject);
     if ($this->thisConfig['disableSelectColor'] && $this->htmlAreaRTE->client['browser'] != 'gecko') {
         $this->requiredPlugins = 'DefaultColor';
     }
     return $available;
 }
示例#10
0
 public function main($parentObject)
 {
     if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('static_info_tables') && file_exists(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('static_info_tables') . 'class.tx_staticinfotables_div.php')) {
         require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('static_info_tables') . 'class.tx_staticinfotables_div.php';
     } else {
         $this->pluginButtons = \TYPO3\CMS\Core\Utility\GeneralUtility::rmFromList('language', $this->pluginButtons);
     }
     return parent::main($parentObject);
 }
示例#11
0
 public function main($parentObject)
 {
     $enabled = parent::main($parentObject) && $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['allowStyleAttribute'];
     if ($this->htmlAreaRTE->is_FE()) {
         $this->RTEProperties = $this->htmlAreaRTE->RTEsetup;
     } else {
         $this->RTEProperties = $this->htmlAreaRTE->RTEsetup['properties'];
     }
     return $enabled;
 }
示例#12
0
 /**
  * Returns TRUE if the plugin is available and correctly initialized
  *
  * @param array $configuration Configuration array given from calling object down to the single plugins
  * @return bool TRUE if this plugin object should be made available in the current environment and is correctly initialized
  */
 public function main(array $configuration)
 {
     $enabled = parent::main($configuration);
     // Hiding some buttons
     if ($enabled && is_array($this->hideButtonsFromClient[$this->configuration['client']['browser']])) {
         $this->pluginButtons = implode(',', array_diff(GeneralUtility::trimExplode(',', $this->pluginButtons, true), $this->hideButtonsFromClient[$this->configuration['client']['browser']]));
     }
     // Force enabling the plugin even if no button remains in the tool bar, so that hot keys still are enabled
     $this->pluginAddsButtons = false;
     return $enabled;
 }
示例#13
0
 public function main($parentObject)
 {
     $enabled = parent::main($parentObject);
     // Hiding some buttons
     if ($enabled && is_array($this->hideButtonsFromClient[$this->htmlAreaRTE->client['browser']])) {
         $this->pluginButtons = implode(',', array_diff(\TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->pluginButtons, 1), $this->hideButtonsFromClient[$this->htmlAreaRTE->client['browser']]));
     }
     // Force enabling the plugin even if no button remains in the tool bar, so that hot keys still are enabled
     $this->pluginAddsButtons = FALSE;
     return $enabled;
 }
示例#14
0
 /**
  * Returns TRUE if the plugin is available and correctly initialized
  *
  * @param array $configuration Configuration array given from calling object down to the single plugins
  * @return bool TRUE if this plugin object should be made available in the current environment and is correctly initialized
  */
 public function main(array $configuration)
 {
     $enabled = parent::main($configuration);
     // acronym button is deprecated as of TYPO3 CMS 7.0, use abbreviation instead
     // Convert the acronym button configuration
     if (isset($this->configuration['thisConfig']['buttons.']['acronym.']) && is_array($this->configuration['thisConfig']['buttons.']['acronym.'])) {
         if (!isset($this->configuration['thisConfig']['buttons.']['abbreviation.']) || !is_array($this->configuration['thisConfig']['buttons.']['abbreviation.'])) {
             $this->configuration['thisConfig']['buttons.']['abbreviation.'] = $this->configuration['thisConfig']['buttons.']['acronym.'];
         }
         unset($this->configuration['thisConfig']['buttons.']['acronym.']);
     }
     // Convert any other reference to acronym two levels down in Page TSconfig, except in processing options and removeFieldsets property
     foreach ($this->configuration['thisConfig'] as $key => $config) {
         if ($key !== 'proc.') {
             if (is_array($config)) {
                 foreach ($config as $subKey => $subConfig) {
                     if (is_array($subConfig)) {
                         foreach ($subConfig as $subSubKey => $subSubConfig) {
                             if ($subSubKey !== 'removeFieldsets') {
                                 $this->configuration['thisConfig'][$key][$subKey][$subSubKey] = str_replace('acronym', 'abbreviation', $subSubConfig);
                             }
                         }
                     } else {
                         if ($subKey !== 'removeFieldsets') {
                             $this->configuration['thisConfig'][$key][$subKey] = str_replace('acronym', 'abbreviation', $subConfig);
                         }
                     }
                 }
             } else {
                 if ($key !== 'removeFieldsets') {
                     $this->configuration['thisConfig'][$key] = str_replace('acronym', 'abbreviation', $config);
                 }
             }
         }
     }
     // Convert any reference to acronym in special configuration options
     if (is_array($this->configuration['specConf']['richtext']['parameters'])) {
         foreach ($this->configuration['specConf']['richtext']['parameters'] as $key => $config) {
             $this->configuration['specConf']['richtext']['parameters'][$key] = str_replace('acronym', 'abbreviation', $config);
         }
     }
     // Convert any reference to acronym in user TSconfig
     if (is_object($GLOBALS['BE_USER']) && isset($GLOBALS['BE_USER']->userTS['options.']['RTEkeyList'])) {
         $GLOBALS['BE_USER']->userTS['options.']['RTEkeyList'] = str_replace('acronym', 'abbreviation', $GLOBALS['BE_USER']->userTS['options.']['RTEkeyList']);
     }
     // Remove button if all fieldsets are removed
     $removedFieldsets = GeneralUtility::trimExplode(',', $this->configuration['thisConfig']['buttons.']['abbreviation.']['removeFieldsets'], true);
     return $enabled && ExtensionManagementUtility::isLoaded('static_info_tables') && count($removedFieldsets) < 4;
 }
示例#15
0
	/**
	 * Returns TRUE if the plugin is available and correctly initialized
	 *
	 * @param RteHtmlAreaBase $parentObject parent object
	 * @return bool TRUE if this plugin object should be made available in the current environment and is correctly initialized
	 */
	public function main($parentObject) {
		// Opera has no onPaste event to handle
		return parent::main($parentObject) && $this->htmlAreaRTE->client['browser'] != 'opera';
	}
示例#16
0
 public function main($parentObject)
 {
     return parent::main($parentObject) && $this->thisConfig['enableWordClean'] && !is_array($this->thisConfig['enableWordClean.']['HTMLparser.']);
 }
示例#17
0
 /**
  * Returns TRUE if the plugin is available and correctly initialized
  *
  * @param array $configuration Configuration array given from calling object down to the single plugins
  * @return bool TRUE if this plugin object should be made available in the current environment and is correctly initialized
  */
 public function main(array $configuration)
 {
     $enabled = parent::main($configuration) && $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['allowStyleAttribute'];
     $this->RTEProperties = $this->configuration['RTEsetup']['properties'];
     return $enabled;
 }
示例#18
0
 public function main($parentObject)
 {
     return parent::main($parentObject) && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('static_info_tables');
 }
示例#19
0
 /**
  * Returns TRUE if the plugin is available and correctly initialized
  *
  * @param array $configuration Configuration array given from calling object down to the single plugins
  * @return bool TRUE if this plugin object should be made available in the current environment and is correctly initialized
  */
 public function main(array $configuration)
 {
     return parent::main($configuration) && $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['allowStyleAttribute'];
 }
示例#20
0
 /**
  * Returns TRUE if the plugin is available and correctly initialized
  *
  * @param array $configuration Configuration array given from calling object down to the single plugins
  * @return bool TRUE if this plugin object should be made available in the current environment and is correctly initialized
  */
 public function main(array $configuration)
 {
     // Opera has no onPaste event to handle
     return parent::main($configuration) && $this->configuration['client']['browser'] !== 'opera';
 }
示例#21
0
 /**
  * Returns TRUE if the plugin is available and correctly initialized
  *
  * @param array $configuration Configuration array given from calling object down to the single plugins
  * @return bool TRUE if this plugin object should be made available in the current environment and is correctly initialized
  */
 public function main(array $configuration)
 {
     return parent::main($configuration) && isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['BlockElements']);
 }
示例#22
0
 /**
  * Returns TRUE if the plugin is available and correctly initialized
  *
  * @param array $configuration Configuration array given from calling object down to the single plugins
  * @return bool TRUE if this plugin object should be made available in the current environment and is correctly initialized
  */
 public function main(array $configuration)
 {
     return parent::main($configuration) && ExtensionManagementUtility::isLoaded('static_info_tables') && !in_array($this->configuration['language'], GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['plugins']['SpellChecker']['noSpellCheckLanguages']));
 }
示例#23
0
 /**
  * Returns TRUE if the plugin is available and correctly initialized
  *
  * @param array $configuration Configuration array given from calling object down to the single plugins
  * @return bool TRUE if this plugin object should be made available in the current environment and is correctly initialized
  */
 public function main(array $configuration)
 {
     return parent::main($configuration) && !($this->configuration['client']['browser'] === 'opera' || $this->configuration['thisConfig']['contextMenu.']['disabled']);
 }
示例#24
0
 /**
  * Returns TRUE if the plugin is available and correctly initialized
  *
  * @param array $configuration Configuration array given from calling object down to the single plugins
  * @return bool TRUE if this plugin object should be made available in the current environment and is correctly initialized
  */
 public function main(array $configuration)
 {
     // Check if this should be enabled based on Page TSConfig
     return parent::main($configuration) && !$this->configuration['thisConfig']['buttons.']['link.']['TYPO3Browser.']['disabled'];
 }
示例#25
0
 /**
  * Returns TRUE if the plugin is available and correctly initialized
  *
  * @param array $configuration Configuration array given from calling object down to the single plugins
  * @return bool TRUE if this plugin object should be made available in the current environment and is correctly initialized
  */
 public function main(array $configuration)
 {
     // Check if this should be enabled based on extension configuration and Page TSConfig
     // The 'Minimal' and 'Typical' default configurations include Page TSConfig that removes images on the way to the database
     return parent::main($configuration) && !($this->configuration['thisConfig']['proc.']['entryHTMLparser_db.']['tags.']['img.']['allowedAttribs'] == '0' && $this->configuration['thisConfig']['proc.']['entryHTMLparser_db.']['tags.']['img.']['rmTagIfNoAttrib'] == '1');
 }
示例#26
0
 /**
  * Returns TRUE if the plugin is available and correctly initialized
  *
  * @param RteHtmlAreaBase $parentObject parent object
  * @return bool TRUE if this plugin object should be made available in the current environment and is correctly initialized
  */
 public function main($parentObject)
 {
     return parent::main($parentObject) && $this->htmlAreaRTE->isPluginEnabled('BlockElements');
 }
示例#27
0
 public function main($parentObject)
 {
     $enabled = parent::main($parentObject);
     // Check if this should be enabled based on Page TSConfig
     return $enabled && !$this->thisConfig['buttons.']['link.']['TYPO3Browser.']['disabled'];
 }
示例#28
0
 /**
  * Returns TRUE if the plugin is available and correctly initialized
  *
  * @param array $configuration Configuration array given from calling object down to the single plugins
  * @return bool TRUE if this plugin object should be made available in the current environment and is correctly initialized
  */
 public function main(array $configuration)
 {
     return parent::main($configuration) && $this->configuration['thisConfig']['enableWordClean'] && !is_array($this->configuration['thisConfig']['enableWordClean.']['HTMLparser.']);
 }
示例#29
0
 /**
  * Returns TRUE if the plugin is available and correctly initialized
  *
  * @param RteHtmlAreaBase $parentObject parent object
  * @return bool TRUE if this plugin object should be made available in the current environment and is correctly initialized
  */
 public function main($parentObject)
 {
     return parent::main($parentObject) && $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rtehtmlarea']['allowStyleAttribute'];
 }
示例#30
0
 public function main($parentObject)
 {
     return parent::main($parentObject) && \TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('static_info_tables') && !in_array($this->htmlAreaRTE->language, \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->htmlAreaRTE->ID]['plugins'][$pluginName]['noSpellCheckLanguages'])) && ($this->htmlAreaRTE->contentCharset == 'iso-8859-1' || $this->htmlAreaRTE->contentCharset == 'utf-8');
 }