From 12e78ffb41a8036716ac635dba80f30c370e2141 Mon Sep 17 00:00:00 2001 From: Daniel Lienert Date: Wed, 3 Apr 2013 18:58:10 +0200 Subject: [PATCH] [FEATURE] Using a checkbox in the YAG extension configuration, you can now configure YAG to flush its resolution file cache with the TYPO3 cache clear command. --- ext_conf_template.txt | 9 ++++++--- ext_localconf.php | 16 ++++++++++++++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ext_conf_template.txt b/ext_conf_template.txt index 24454d20..ed3becf2 100755 --- a/ext_conf_template.txt +++ b/ext_conf_template.txt @@ -1,5 +1,8 @@ - # cat=basic; type=string; label=Path of directory where YAG should store all cached images generated for albums - relative to Typo3 base path. This path should not be changed unless you know what you do! (Image base path) +# cat=basic; type=string; label=Path of directory where YAG should store all cached images generated for albums - relative to Typo3 base path. This path should not be changed unless you know what you do! (Image base path) hashFilesystemRoot = typo3temp/yag - # cat=basic; type=string; label=Path of directory where YAG stores all original files. -origFilesRoot = fileadmin/yag \ No newline at end of file +# cat=basic; type=string; label=Path of directory where YAG stores all original files. +origFilesRoot = fileadmin/yag + +# cat=basic; type=boolean; label=Clear the resolution file cache with the TYPO3 cache clear command. +clearResFileCacheWithCacheClearCommand = false \ No newline at end of file diff --git a/ext_localconf.php b/ext_localconf.php index 25df5d3e..ae5ebeb5 100755 --- a/ext_localconf.php +++ b/ext_localconf.php @@ -59,22 +59,34 @@ ); + if(TYPO3_MODE == 'BE') { + $yagExtConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['yag']); + // Hooks $TYPO3_CONF_VARS['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info']['yag_pi1']['yag'] = 'EXT:yag/Classes/Hooks/CMSLayoutHook.php:user_Tx_Yag_Hooks_CMSLayoutHook->getExtensionSummary'; + // Clear resFileCache with clearCacheCommand + if((int) $yagExtConfig['clearResFileCacheWithCacheClearCommand'] === 1) { + $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables']['tx_yag_domain_model_resolutionfilecache'] = 'tx_yag_domain_model_resolutionfilecache'; + } + // Flexform general require_once t3lib_extMgm::extPath('yag').'Classes/Utility/Flexform/Div.php'; + // Flexform typoScript data provider require_once t3lib_extMgm::extPath('yag').'Classes/Utility/Flexform/TyposcriptDataProvider.php'; - - // Flexform record selctor + + + // Flexform record selector require_once t3lib_extMgm::extPath('yag').'Classes/Utility/Flexform/RecordSelector.php'; $TYPO3_CONF_VARS['BE']['AJAX']['txyagM1::getGalleryList'] = t3lib_extMgm::extPath('yag').'Classes/Utility/Flexform/RecordSelector.php:user_Tx_Yag_Utility_Flexform_RecordSelector->getGallerySelectList'; $TYPO3_CONF_VARS['BE']['AJAX']['txyagM1::getAlbumList'] = t3lib_extMgm::extPath('yag').'Classes/Utility/Flexform/RecordSelector.php:user_Tx_Yag_Utility_Flexform_RecordSelector->getAlbumSelectList'; $TYPO3_CONF_VARS['BE']['AJAX']['txyagM1::getImageList'] = t3lib_extMgm::extPath('yag').'Classes/Utility/Flexform/RecordSelector.php:user_Tx_Yag_Utility_Flexform_RecordSelector->getImageSelectList'; $TYPO3_CONF_VARS['BE']['AJAX']['yagAjaxDispatcher'] = t3lib_extMgm::extPath('yag').'Classes/Utility/AjaxDispatcher.php:Tx_Yag_Utility_AjaxDispatcher->dispatch'; + + } ?> \ No newline at end of file