Skip to content

Commit

Permalink
TYPO3 8.7 and Flux 8.2 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
bednee committed Oct 12, 2017
1 parent 5737556 commit 176152c
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 31 deletions.
10 changes: 9 additions & 1 deletion Classes/Controller/GalleriaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -426,10 +426,18 @@ protected function addFilePageRenderer($fileObj) {
array_unshift($funcArgumentList, $file);

}
call_user_func_array(array($GLOBALS['TSFE']->getPageRenderer(), $includeFunctionName), $funcArgumentList);
call_user_func_array(array($this->getPageRenderer(), $includeFunctionName), $funcArgumentList);
}
}

protected function getPageRenderer()
{
if ($this->pageRenderer === null) {
$this->pageRenderer = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Page\PageRenderer::class);
}
return $this->pageRenderer;
}

/**
* @return void
*/
Expand Down
11 changes: 8 additions & 3 deletions Classes/Provider/PluginConfigurationProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
*/
class PluginConfigurationProvider extends \FluidTYPO3\Flux\Provider\Provider {

/**
* @var string
*/
protected $controllerName = 'Content';

/**
* @var string
*/
Expand All @@ -22,9 +27,9 @@ class PluginConfigurationProvider extends \FluidTYPO3\Flux\Provider\Provider {
* @var array
*/
protected $templatePaths = array(
'templateRootPath' => 'EXT:flux_galleria/Resources/Private/Templates/',
'partialRootPath' => 'EXT:flux_galleria/Resources/Private/Partials/',
'layoutRootPath' => 'EXT:flux_galleria/Resources/Private/Layouts/',
'templateRootPaths.10' => 'EXT:flux_galleria/Resources/Private/Templates/',
'partialRootPaths.10' => 'EXT:flux_galleria/Resources/Private/Partials/',
'layoutRootPaths.10' => 'EXT:flux_galleria/Resources/Private/Layouts/',
);

/**
Expand Down
6 changes: 3 additions & 3 deletions Configuration/TypoScript/setup.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugin.tx_fluxgalleria {
view {
templateRootPath = {$plugin.tx_fluxgalleria.view.templateRootPath}
partialRootPath = {$plugin.tx_fluxgalleria.view.partialRootPath}
layoutRootPath = {$plugin.tx_fluxgalleria.view.layoutRootPath}
templateRootPaths.10 = {$plugin.tx_fluxgalleria.view.templateRootPath}
partialRootPaths.10 = {$plugin.tx_fluxgalleria.view.partialRootPath}
layoutRootPaths.10 = {$plugin.tx_fluxgalleria.view.layoutRootPath}
}
persistence {
storagePid = {$plugin.tx_fluxgalleria.persistence.storagePid}
Expand Down
34 changes: 12 additions & 22 deletions Resources/Private/Templates/Galleria/Index.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
{namespace flux=FluidTYPO3\Flux\ViewHelpers}
{namespace dmf=DMF\FluxGalleria\ViewHelpers}

<f:layout name="Default"/>

<div xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers"
xmlns:flux="http://fedext.net/ns/flux/ViewHelpers">
xmlns:dmf="http://typo3.org/ns/DMF/FluxGalleria/ViewHelpers"
xmlns:flux="http://typo3.org/ns/FluidTYPO3/Flux/ViewHelpers">

<f:section name="Configuration">
<flux:form id="galleria" enabled="TRUE" label="Galleria image & video plugin">
<flux:form id="galleria" enabled="true" label="Galleria image & video plugin">

<flux:form.sheet name="data" label="Images / Videos">

<flux:form.section name="settings.items" label="Items">
<flux:form.object name="item" label="Gallery item">

<flux:field.select name="type" label="Type"
items="{0: 'Please select', 1: 'Image', 2: 'Video', 3: 'IFrame', 4: 'Flickr', 5: 'Picasa', 6: 'Folder', 7: 'File Collection'}"
items="{0: 'Please select', 1: 'Image', 2: 'Video', 3: 'IFrame', 4: 'Flickr', 5: 'Picasa', 6: 'Folder'}"
default="0"
requestUpdate="TRUE"/>
requestUpdate="true"/>

<f:comment>Image configuration fields</f:comment>
<flux:field.file name="original" label="Main image" displayCond="FIELD:type:=:1"
required="TRUE"/>
required="true"/>

<flux:field.file name="thumb" label="Image thumbnail source" displayCond="FIELD:type:=:1"/>
<flux:field.input name="title" label="Title" displayCond="FIELD:type:=:1"/>
Expand Down Expand Up @@ -103,13 +101,6 @@
<flux:field.select name="folder_recursive" label="Recursive level"
items="0,1,2,3,4,5,6" displayCond="FIELD:type:=:6"/>

<f:comment>File collection fields</f:comment>

<flux:field.relation name="collection" label="Choose file collection"
table="sys_file_collection"
displayCond="FIELD:type:=:7"/>


</flux:form.object>
</flux:form.section>
</flux:form.sheet>
Expand All @@ -127,19 +118,19 @@


<flux:field.select name="settings.config.thumbnails" label="Creates thumbnails and carousel"
default="true" requestUpdate="TRUE"
default="true" requestUpdate="true"
items="default, true, empty, numbers, lazy, false"/>
<flux:field.input name="settings.scale.thumbWidth" label="Galleria thumbnail width (default: 63)"
displayCond="FIELD:thumbnails:!=:false"/>
displayCond="FIELD:settings.config.thumbnails:!=:false"/>
<flux:field.input name="settings.scale.thumbHeight" label="Galleria thumbnail height (default: 27)"
displayCond="FIELD:thumbnails:!=:false"/>
displayCond="FIELD:settings.config.thumbnails:!=:false"/>

<flux:field.input name="settings.config.maxScaleRatio"
label="Sets the maximum scale ratio for images. Set 1 for non-upscale"
displayCond="FIELD:thumbnails:!=:false"/>
displayCond="FIELD:settings.config.thumbnails:!=:false"/>
<flux:field.input name="settings.config.minScaleRatio"
label="Sets the minimum scale ratio for images. Set 1 for non-downscale"
displayCond="FIELD:thumbnails:!=:false"/>
displayCond="FIELD:settings.config.thumbnails:!=:false"/>


</flux:form.sheet>
Expand Down Expand Up @@ -174,7 +165,6 @@
<flux:field.input name="settings.config.overlayOpacity"
label="This sets how much opacity the overlay should have when calling showLightbox() (default: 0.85)."/>
</flux:form.sheet>

<flux:form.sheet name="carousel" label="Carousel">
<flux:field.select name="settings.config.carousel"
label="Galleria comes with a built-in horizontal carousel."
Expand Down Expand Up @@ -278,4 +268,4 @@
<f:debug>{_all}</f:debug>
</f:if>
</f:section>
</div>
</div>
4 changes: 2 additions & 2 deletions ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
'version' => '2.1.1',
'constraints' => array(
'depends' => array(
'typo3' => '6.1.0-6.2.99',
'typo3' => '6.1.0-8.7.99',
'cms' => '',
'extbase' => '',
'fluid' => '',
'flux' => '7.1.0-7.1.99',
'flux' => '7.1.0-8.2.99',
),
'conflicts' => array(),
'suggests' => array(),
Expand Down

0 comments on commit 176152c

Please sign in to comment.