Last active
March 12, 2021 12:08
-
-
Save maddy2101/5668835 to your computer and use it in GitHub Desktop.
Revisions
-
maddy2101 revised this gist
Feb 15, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -97,6 +97,6 @@ public function getImages() { Fluid View (this is a Partial, providing all images with a link to open it in a lightbox, classic clickenlarge): <f:for each="{images}" as="image" > <a href="{f:uri.image(src:image.uid,treatIdAsReference:1)}" class="lightbox" rel="gallery"> <f:image src="{image.uid}" alt="{image.originalResorce.alternative}" width='101' height="67" treatIdAsReference="1"/> </a > </f:for > -
maddy2101 revised this gist
Feb 15, 2014 . 1 changed file with 35 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,41 @@ 'height' => '100', ), 'createNewRelationLinkTitle' => 'LLL:EXT:your_extension/Resources/Private/Language/locallang_db.xlf:tx_yourextension_db_table.add-images' ), // custom configuration for displaying fields in the overlay/reference table // to use the imageoverlayPalette instead of the basicoverlayPalette 'foreign_types' => array( '0' => array( 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette' ), \TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => array( 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette' ), \TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array( 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette' ), \TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => array( 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette' ), \TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => array( 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette' ), \TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array( 'showitem' => ' --palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette, --palette--;;filePalette' ) ), ), $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] ) -
maddy2101 revised this gist
Feb 15, 2014 . 1 changed file with 9 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,15 @@ 'label' => 'images', 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( 'images', array( 'appearance' => array( 'headerThumbnail' => array( 'width' => '100', 'height' => '100', ), 'createNewRelationLinkTitle' => 'LLL:EXT:your_extension/Resources/Private/Language/locallang_db.xlf:tx_yourextension_db_table.add-images' ) ), $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] ) ), -
maddy2101 revised this gist
Feb 15, 2014 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,11 @@ 'images' => array( 'exclude' => 0, 'label' => 'images', 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( 'images', array(), $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] ) ), ... ============================================================================ -
maddy2101 revised this gist
Jun 10, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ 'images' => array( 'exclude' => 0, 'label' => 'images', 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagerUtility::getFileFieldTCAConfig('images') ), ... ============================================================================ -
maddy2101 revised this gist
May 31, 2013 . 1 changed file with 0 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -45,9 +45,6 @@ public function setImages($images) { * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage */ public function getImages() { return $this->images; } ============================================================================== -
maddy2101 revised this gist
May 31, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public function setImages($images) { * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage */ public function getImages() { if ($this->images instanceof \TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingStorage) { $this->images->_loadRealInstance(); } return $this->images; -
maddy2101 revised this gist
May 31, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public function setImages($images) { * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage */ public function getImages() { if ($this->images instanceof \TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy) { $this->images->_loadRealInstance(); } return $this->images; -
maddy2101 renamed this gist
May 29, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
maddy2101 revised this gist
May 29, 2013 . 1 changed file with 1 addition and 53 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,59 +6,7 @@ TCA 'images' => array( 'exclude' => 0, 'label' => 'images', 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagerUtility::getFileFieldTCA('images') ), ... ============================================================================ -
maddy2101 revised this gist
May 29, 2013 . 1 changed file with 3 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ SQL: images int(11) unsigned DEFAULT '0', ======================================================= TCA .... 'images' => array( @@ -61,9 +61,8 @@ TCA ), ), ... ============================================================================ Model: /** * images to use in the gallery * @@ -103,9 +102,8 @@ public function getImages() { } return $this->images; } ============================================================================== Fluid View (this is a Partial, providing all images with a link to open it in a lightbox, classic clickenlarge): <f:for each="{images}" as="image" > <a href="{f:uri.image(src:image.uid,treatIdAsReference:1)}" class="lightbox" rel="gallery"> <f:image src="{image.uid}" alt="" width='101' height="67" treatIdAsReference="1"/> -
maddy2101 revised this gist
May 29, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -107,7 +107,7 @@ public function getImages() { Fluid View (this is a Partial, providing all images with a link to open it in a lightbox, classic clickenlarge): <f:for each="{images}" as="image" > <a href="{f:uri.image(src:image.uid,treatIdAsReference:1)}" class="lightbox" rel="gallery"> <f:image src="{image.uid}" alt="" width='101' height="67" treatIdAsReference="1"/> </a > </f:for > -
maddy2101 revised this gist
May 29, 2013 . 1 changed file with 55 additions and 61 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,63 +4,62 @@ images int(11) unsigned DEFAULT '0', TCA .... 'images' => array( 'exclude' => 0, 'label' => 'images', 'config' => array( 'type' => 'inline', 'foreign_table' => 'sys_file_reference', 'foreign_field' => 'uid_foreign', 'foreign_sortby' => 'sorting_foreign', 'foreign_table_field' => 'tablenames', 'foreign_match_fields' => array( 'fieldname' => 'image' ), 'foreign_label' => 'uid_local', 'foreign_selector' => 'uid_local', 'foreign_selector_fieldTcaOverride' => array( 'config' => array( 'appearance' => array( 'elementBrowserType' => 'file', 'elementBrowserAllowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] ) ) ), 'filter' => array( array( 'userFunc' => 'TYPO3\\CMS\\Core\\Resource\\Filter\\FileExtensionFilter->filterInlineChildren, 'parameters' => array( 'allowedFileExtensions' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], 'disallowedFileExtensions' => '' ) ) ), 'appearance' => array( 'createNewRelationLinkTitle' => 'LLL:EXT:cms/locallang_ttc.xlf:images.addFileReference', 'useSortable' => TRUE, 'headerThumbnail' => array( 'field' => 'uid_local', 'width' => '64', 'height' => '64', ), 'showPossibleLocalizationRecords' => TRUE, 'showRemovedLocalizationRecords' => TRUE, 'showSynchronizationLink' => TRUE, 'enabledControls' => array( 'info' => FALSE, 'new' => FALSE, 'dragdrop' => TRUE, 'sort' => FALSE, 'hide' => TRUE, 'delete' => TRUE, 'localize' => TRUE, ), ), 'behaviour' => array( 'localizationMode' => 'select', 'localizeChildrenAtParentLocalization' => TRUE, ), ), ), ... Model: @@ -102,18 +101,13 @@ public function getImages() { if ($this->images instanceof LazyLoadingProxy) { $this->images->_loadRealInstance(); } return $this->images; } Fluid View (this is a Partial, providing all images with a link to open it in a lightbox, classic clickenlarge): <f:for each="{images}" as="image" > <a href="{f:uri.image(src:image.originalResource,treatIdAsReference:1)}" class="lightbox" rel="gallery"> <f:image src="{image.originalResource}" alt="" width='101' height="67" treatIdAsReference="1"/> </a > </f:for > -
maddy2101 revised this gist
May 29, 2013 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,6 @@ SQL: images int(11) unsigned DEFAULT '0', TCA .... 'images' => array( -
maddy2101 revised this gist
May 29, 2013 . 1 changed file with 56 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -58,4 +58,59 @@ TCA ), ), ), ... Model: /** * images to use in the gallery * * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference> * @lazy */ protected $images; /** * __construct * * @return AbstractObject */ public function __construct() { $this->images = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); } /** * sets the Images * * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $images * * @return void */ public function setImages($images) { $this->images = $images; } /** * get the Images * * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage */ public function getImages() { if ($this->images instanceof LazyLoadingProxy) { $this->images->_loadRealInstance(); } $images = array(); /** @var \TYPO3\CMS\Extbase\Domain\Model\FileReference $fileReference */ foreach ($this->images as $fileReference) { $images[] = $fileReference->getOriginalResource(); } return $images; } Fluid View (this is a Partial, providing all images with a link to open it in a lightbox, classic clickenlarge): <f:for each="{images}" as="image" > <a href="{f:uri.image(src:image.uid,treatIdAsReference:1)}" class="lightbox" rel="gallery"> <f:image src="{image.uid}" alt="" width='101' height="67" treatIdAsReference="1"/> </a > </f:for > -
maddy2101 created this gist
May 29, 2013 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,61 @@ TCA .... 'images' => array( 'exclude' => 0, 'label' => 'images', 'config' => array( 'type' => 'inline', 'foreign_table' => 'sys_file_reference', 'foreign_field' => 'uid_foreign', 'foreign_sortby' => 'sorting_foreign', 'foreign_table_field' => 'tablenames', 'foreign_match_fields' => array( 'fieldname' => 'image' ), 'foreign_label' => 'uid_local', 'foreign_selector' => 'uid_local', 'foreign_selector_fieldTcaOverride' => array( 'config' => array( 'appearance' => array( 'elementBrowserType' => 'file', 'elementBrowserAllowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] ) ) ), 'filter' => array( array( 'userFunc' => 'TYPO3\\CMS\\Core\\Resource\\Filter\\FileExtensionFilter->filterInlineChildren', 'parameters' => array( 'allowedFileExtensions' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], 'disallowedFileExtensions' => '' ) ) ), 'appearance' => array( 'createNewRelationLinkTitle' => 'LLL:EXT:cms/locallang_ttc.xlf:images.addFileReference', 'useSortable' => TRUE, 'headerThumbnail' => array( 'field' => 'uid_local', 'width' => '64', 'height' => '64', ), 'showPossibleLocalizationRecords' => TRUE, 'showRemovedLocalizationRecords' => TRUE, 'showSynchronizationLink' => TRUE, 'enabledControls' => array( 'info' => FALSE, 'new' => FALSE, 'dragdrop' => TRUE, 'sort' => FALSE, 'hide' => TRUE, 'delete' => TRUE, 'localize' => TRUE, ), ), 'behaviour' => array( 'localizationMode' => 'select', 'localizeChildrenAtParentLocalization' => TRUE, ), ), ), ...