Skip to content

Commit

Permalink
Merge pull request #62 from jonathanheilmann/v1.3.1
Browse files Browse the repository at this point in the history
[RELEASE] Release of version 1.3.1
  • Loading branch information
jonathanheilmann authored Apr 27, 2018
2 parents 7344f95 + 3dfc8d4 commit d5e510b
Show file tree
Hide file tree
Showing 10 changed files with 239 additions and 128 deletions.
1 change: 1 addition & 0 deletions Classes/Service/OgRendererService.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ public function main($content, $conf)
unset($additionalParams['id']);
$lConf = [
'additionalParams' => '&' . GeneralUtility::implodeArrayForUrl('', $additionalParams),
'forceAbsoluteUrl' => '1',
'parameter' => $GLOBALS['TSFE']->id
];
$og['url'] = htmlentities($cObj->typoLink_URL($lConf));
Expand Down
95 changes: 95 additions & 0 deletions Configuration/TCA/Overrides/pages.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?php
if (!defined('TYPO3_MODE')) {
die ('Access denied.');
}

$_EXTKEY = 'jh_opengraphprotocol';

$tempColumns = array(
'tx_jhopengraphprotocol_ogtitle' => array(
'exclude' => 1,
'label' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xml:pages.tx_jhopengraphprotocol_ogtitle',
'config' => array(
'type' => 'input',
'size' => '160',
)
),
'tx_jhopengraphprotocol_ogtype' => array(
'exclude' => 1,
'label' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xml:pages.tx_jhopengraphprotocol_ogtype',
'config' => array(
'type' => 'input',
'size' => '30',
)
),
'tx_jhopengraphprotocol_ogimage' => array(
'exclude' => 1,
'label' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xml:pages.tx_jhopengraphprotocol_ogimage',
'config' => array(
'type' => 'group',
'internal_type' => 'file',
'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],
'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'],
'uploadfolder' => 'uploads/tx_jhopengraphprotocol',
'show_thumbs' => 1,
'size' => 4,
'minitems' => 0,
'maxitems' => 6,
)
),
'tx_jhopengraphprotocol_ogfalimages' => array(
'exclude' => 1,
'label' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xml:pages.tx_jhopengraphprotocol_ogimage',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'tx_jhopengraphprotocol_ogfalimages',
array(
'appearance' => array(
'showPossibleLocalizationRecords' => true,
'showRemovedLocalizationRecords' => true,
'showSynchronizationLink' => true,
'showAllLocalizationLink' => true,

'enableControls' => array(
'sort' => true,
),
),
'behaviour' => array(
'localizationMode' => 'select',
'localizeChildrenAtParentLocalization' => TRUE,
),
'foreign_types' => array(
'0' => array(
'showitem' => '
--palette--;;opengraphprotocolPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array(
'showitem' => '
--palette--;;opengraphprotocolPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array(
'showitem' => '
--palette--;;opengraphprotocolPalette,
--palette--;;filePalette'
),
),
),
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
)
),
'tx_jhopengraphprotocol_ogdescription' => array(
'exclude' => 1,
'label' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xml:pages.tx_jhopengraphprotocol_ogdescription',
'config' => array(
'type' => 'text',
'size' => '30',
'rows' => '3',
'max' => '300',
)
),
);

// Add columns to TCA of pages
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages', $tempColumns, 1);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('pages', '--div--;LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xml:pages.tab_title,tx_jhopengraphprotocol_ogtitle;;;;1-1-1, tx_jhopengraphprotocol_ogtype, tx_jhopengraphprotocol_ogfalimages, tx_jhopengraphprotocol_ogdescription');
118 changes: 118 additions & 0 deletions Configuration/TCA/Overrides/pages_language_overlay.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
<?php
if (!defined('TYPO3_MODE')) {
die ('Access denied.');
}

$_EXTKEY = 'jh_opengraphprotocol';

// Get extension configuration
if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY])) {
$extConf = \TYPO3\CMS\Core\Utility\GeneralUtility::removeDotsFromTS(unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY]));
} else {
$extConf = array();
}

$tempColumns = array(
'tx_jhopengraphprotocol_ogtitle' => array(
'exclude' => 1,
'label' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xml:pages.tx_jhopengraphprotocol_ogtitle',
'config' => array(
'type' => 'input',
'size' => '160',
)
),
'tx_jhopengraphprotocol_ogtype' => array(
'exclude' => 1,
'label' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xml:pages.tx_jhopengraphprotocol_ogtype',
'config' => array(
'type' => 'input',
'size' => '30',
)
),
'tx_jhopengraphprotocol_ogimage' => array(
'exclude' => 1,
'label' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xml:pages.tx_jhopengraphprotocol_ogimage',
'config' => array(
'type' => 'group',
'internal_type' => 'file',
'allowed' => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],
'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'],
'uploadfolder' => 'uploads/tx_jhopengraphprotocol',
'show_thumbs' => 1,
'size' => 4,
'minitems' => 0,
'maxitems' => 6,
)
),
'tx_jhopengraphprotocol_ogfalimages' => array(
'exclude' => 1,
'label' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xml:pages.tx_jhopengraphprotocol_ogimage',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'tx_jhopengraphprotocol_ogfalimages',
array(
'appearance' => array(
'showPossibleLocalizationRecords' => true,
'showRemovedLocalizationRecords' => true,
'showSynchronizationLink' => true,
'showAllLocalizationLink' => true,

'enableControls' => array(
'sort' => true,
),
),
'behaviour' => array(
'localizationMode' => 'select',
'localizeChildrenAtParentLocalization' => TRUE,
),
'foreign_types' => array(
'0' => array(
'showitem' => '
--palette--;;opengraphprotocolPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => array(
'showitem' => '
--palette--;;opengraphprotocolPalette,
--palette--;;filePalette'
),
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => array(
'showitem' => '
--palette--;;opengraphprotocolPalette,
--palette--;;filePalette'
),
),
),
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
)
),
'tx_jhopengraphprotocol_ogdescription' => array(
'exclude' => 1,
'label' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xml:pages.tx_jhopengraphprotocol_ogdescription',
'config' => array(
'type' => 'text',
'size' => '30',
'rows' => '3',
'max' => '300',
)
),
);

foreach ($tempColumns as $tempColumnKey => $tempColumnValue)
{
$tempColumns[$tempColumnKey]['l10n_cat'] = 'text';
// Set l10n_mode for pages_language_overlay
if (isset($extConf['languageOverlay'][$tempColumnKey]['mergeIfNotBlank']) && $extConf['languageOverlay'][$tempColumnKey]['mergeIfNotBlank'])
$tempColumns[$tempColumnKey]['l10n_mode'] = 'mergeIfNotBlank';

// Don't display language diff, it's really ugly
if ($tempColumnKey === 'tx_jhopengraphprotocol_ogfalimages')
$tempColumns[$tempColumnKey]['l10n_display'] = 'hideDiff';

// Change label for tx_jhopengraphprotocol_ogfalimages if l10n_mode is 'mergeIfNotBlank' to add mode information
if ($tempColumnKey === 'tx_jhopengraphprotocol_ogfalimages' && $tempColumns[$tempColumnKey]['l10n_mode'] === 'mergeIfNotBlank')
$tempColumns[$tempColumnKey]['label'] = 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xml:pages.tx_jhopengraphprotocol_ogimage.mergeIfNotBlank';
}

// Add columns to TCA of pages_language_overlay
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages_language_overlay', $tempColumns, 1);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('pages_language_overlay', '--div--;LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang.xml:pages.tab_title,tx_jhopengraphprotocol_ogtitle;;;;1-1-1, tx_jhopengraphprotocol_ogtype, tx_jhopengraphprotocol_ogfalimages, tx_jhopengraphprotocol_ogdescription');
8 changes: 8 additions & 0 deletions Configuration/TCA/Overrides/sys_file_reference.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
if (!defined('TYPO3_MODE')) {
die ('Access denied.');
}

// Add new palette
$GLOBALS['TCA']['sys_file_reference']['palettes']['opengraphprotocolPalette'] = $GLOBALS['TCA']['sys_file_reference']['palettes']['basicoverlayPalette'];
$GLOBALS['TCA']['sys_file_reference']['palettes']['opengraphprotocolPalette']['showitem'] = '';
10 changes: 10 additions & 0 deletions Documentation/ChangeLog/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ ChangeLog
:Changes:
Changes

- :Version:
1.3.1

:Changes:
\* [TASK] Remove TYPO3 6.2 support

\* [BUG] #59 Absolute URL for "og:url"

\* [TASK] #57 Move TCA modifications to Configuration/TCA/Overrides

- :Version:
1.3.0

Expand Down
2 changes: 1 addition & 1 deletion Documentation/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Open Graph protocol
Open Graph protocol, social network, facebook

:Copyright:
2012-2017
2012-2018

:Author:
Jonathan Heilmann
Expand Down
4 changes: 2 additions & 2 deletions Documentation/Settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

---
conf.py:
copyright: 2012-2017
copyright: 2012-2018
project: Open Graph protocol
version: 1.3
release: 1.3.0
release: 1.3.1
intersphinx_mapping:
t3tsref:
- http://docs.typo3.org/typo3cms/TyposcriptReference/
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"support": {
"issues": "https://github.com/jonathanheilmann/ext-jh_opengraphprotocol/issues"
},
"version": "1.3.0",
"version": "1.3.1",
"require": {
"typo3/cms": "~6.2||~7.6||~8.7"
"typo3/cms": "~7.6||~8.7"
},
"replace": {
"jh_opengraphprotocol": "self.version",
Expand Down
4 changes: 2 additions & 2 deletions ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
'title' => 'Open Graph protocol',
'description' => 'Adds the Open Graph protocol properties in meta-tags to the html-header supporting multilingual-websites.',
'category' => 'plugin',
'version' => '1.3.0',
'version' => '1.3.1',
'state' => 'stable',
'uploadfolder' => false,
'createDirs' => '',
Expand All @@ -26,7 +26,7 @@
array (
'depends' =>
array (
'typo3' => '6.2.0-8.7.99',
'typo3' => '7.6.0-8.7.99',
),
'conflicts' =>
array (
Expand Down
Loading

0 comments on commit d5e510b

Please sign in to comment.