-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- removed core-bundle as requirement to be compatible with Contao 3.5 via composer - moved settings into a subpalette
- Loading branch information
Showing
7 changed files
with
29 additions
and
34 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,24 +3,22 @@ | |
/** | ||
* Contao Open Source CMS | ||
* | ||
* Copyright (c) 2005-2017 Leo Feyer | ||
* Copyright (c) 2005-2020 Leo Feyer | ||
* | ||
* @package ProperFilenames | ||
* @author Benny Born <[email protected]> | ||
* @license LGPL | ||
* @copyright 2017 numero2 - Agentur für Internetdienstleistungen | ||
* @copyright 2020 numero2 - Agentur für digitales Marketing GbR | ||
*/ | ||
|
||
|
||
/** | ||
* Namespace | ||
*/ | ||
namespace numero2\ProperFilenames; | ||
|
||
use Ausi\SlugGenerator\SlugGenerator; | ||
use Contao\CoreBundle\Slug\ValidCharacters; | ||
use Contao\System; | ||
|
||
|
||
class CheckFilenames extends \Frontend { | ||
|
||
|
||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,12 @@ | |
/** | ||
* Contao Open Source CMS | ||
* | ||
* Copyright (c) 2005-2017 Leo Feyer | ||
* Copyright (c) 2005-2020 Leo Feyer | ||
* | ||
* @package ProperFilenames | ||
* @author Benny Born <[email protected]> | ||
* @license LGPL | ||
* @copyright 2017 numero2 - Agentur für Internetdienstleistungen | ||
* @copyright 2020 numero2 - Agentur für digitales Marketing GbR | ||
*/ | ||
|
||
|
||
|
@@ -25,7 +25,7 @@ | |
/** | ||
* Register the classes | ||
*/ | ||
ClassLoader::addClasses( array | ||
ClassLoader::addClasses(array | ||
( | ||
// Classes | ||
'numero2\ProperFilenames\CheckFilenames' => 'system/modules/proper-filenames/classes/CheckFilenames.php', | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,12 @@ | |
/** | ||
* Contao Open Source CMS | ||
* | ||
* Copyright (c) 2005-2017 Leo Feyer | ||
* Copyright (c) 2005-2020 Leo Feyer | ||
* | ||
* @package ProperFilenames | ||
* @author Benny Born <[email protected]> | ||
* @license LGPL | ||
* @copyright 2017 numero2 - Agentur für Internetdienstleistungen | ||
* @copyright 2020 numero2 - Agentur für digitales Marketing GbR | ||
*/ | ||
|
||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,12 @@ | |
/** | ||
* Contao Open Source CMS | ||
* | ||
* Copyright (c) 2005-2017 Leo Feyer | ||
* Copyright (c) 2005-2020 Leo Feyer | ||
* | ||
* @package ProperFilenames | ||
* @author Benny Born <[email protected]> | ||
* @license LGPL | ||
* @copyright 2017 numero2 - Agentur für Internetdienstleistungen | ||
* @copyright 2020 numero2 - Agentur für digitales Marketing GbR | ||
*/ | ||
|
||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,43 +3,41 @@ | |
/** | ||
* Contao Open Source CMS | ||
* | ||
* Copyright (c) 2005-2017 Leo Feyer | ||
* Copyright (c) 2005-2020 Leo Feyer | ||
* | ||
* @package ProperFilenames | ||
* @author Benny Born <[email protected]> | ||
* @license LGPL | ||
* @copyright 2017 numero2 - Agentur für Internetdienstleistungen | ||
* @copyright 2020 numero2 - Agentur für digitales Marketing GbR | ||
*/ | ||
|
||
use Contao\System; | ||
use numero2\ProperFilenames\CheckFilenames; | ||
|
||
|
||
/** | ||
* Add palettes to tl_settings | ||
*/ | ||
$GLOBALS['TL_DCA']['tl_settings']['palettes']['__selector__'][] = 'checkFilenames'; | ||
$GLOBALS['TL_DCA']['tl_settings']['palettes']['default'] = str_replace( | ||
',imageHeight', | ||
',imageHeight,checkFilenames,doNotTrimFilenames,filenameValidCharacters,filenameValidCharactersLocale', | ||
',imageHeight,checkFilenames', | ||
$GLOBALS['TL_DCA']['tl_settings']['palettes']['default'] | ||
); | ||
|
||
$GLOBALS['TL_DCA']['tl_settings']['subpalettes']['checkFilenames'] = 'filenameValidCharacters,filenameValidCharactersLocale,doNotTrimFilenames'; | ||
|
||
|
||
/** | ||
* Add fields to tl_settings | ||
*/ | ||
$GLOBALS['TL_DCA']['tl_settings']['fields']['checkFilenames'] = array( | ||
'label' => &$GLOBALS['TL_LANG']['tl_settings']['checkFilenames'], | ||
'inputType' => 'checkbox', | ||
'eval' => array( 'tl_class' => 'w50 cbx' ), | ||
'eval' => array( 'submitOnChange'=>true, 'tl_class' => 'w50 cbx' ), | ||
'default' => true | ||
); | ||
|
||
$GLOBALS['TL_DCA']['tl_settings']['fields']['doNotTrimFilenames'] = array( | ||
'label' => &$GLOBALS['TL_LANG']['tl_settings']['doNotTrimFilenames'], | ||
'inputType' => 'checkbox', | ||
'eval' => array( 'tl_class' => 'w50 cbx' ), | ||
); | ||
|
||
$GLOBALS['TL_DCA']['tl_settings']['fields']['filenameValidCharacters'] = array( | ||
'label' => &$GLOBALS['TL_LANG']['tl_settings']['filenameValidCharacters'], | ||
'inputType' => 'select', | ||
|
@@ -56,3 +54,9 @@ | |
}, | ||
'eval' => array( 'tl_class' => 'w50', 'includeBlankOption' => true, 'chosen' => true ), | ||
); | ||
|
||
$GLOBALS['TL_DCA']['tl_settings']['fields']['doNotTrimFilenames'] = array( | ||
'label' => &$GLOBALS['TL_LANG']['tl_settings']['doNotTrimFilenames'], | ||
'inputType' => 'checkbox', | ||
'eval' => array( 'tl_class' => 'w50 cbx' ), | ||
); |