Feature #21302
closedclick enlarge: popup window params are hardcoded
Added by Michael Sollmann almost 15 years ago. Updated over 4 years ago.
100%
Description
the user cannot resize the popup or scroll the window e.g. to read long image captions. should be defined in typoscript.
(issue imported from #M12270)
Updated by Alexander Opitz over 11 years ago
- Category deleted (
Communication) - Status changed from New to Needs Feedback
- Target version deleted (
0)
The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?
Updated by Tobias Schmidt over 11 years ago
This issue still exists in TYPO3 4.5. In sysext\cms\tslib\class.tslib_content.php, lines 1498 - 1502, it is not possible to insert something like "scrollbars=yes" via TypoScript. The parameters are hardcoded.
Updated by Alexander Opitz over 11 years ago
- Status changed from Needs Feedback to New
Updated by Mathias Schreiber over 9 years ago
- Target version set to 7.2 (Frontend)
Updated by Benni Mack about 9 years ago
- Target version changed from 7.2 (Frontend) to 7.4 (Backend)
Updated by Susanne Moog about 9 years ago
- Target version changed from 7.4 (Backend) to 7.5
Updated by Riccardo De Contardi about 6 years ago
Actually, you can add parameters to the popup using typoscript, with JSwindow_params
See documentation here:
https://docs.typo3.org/typo3cms/TyposcriptReference/Functions/Typolink/Index.html#jswindow-params
example:
page=PAGE page.60=TEXT page.60.value=hello world page.60.typolink.parameter = 507 400x300 page.60.typolink.JSwindow_params=scrollbars=1,resizable=0,toolbar=0,status=0 page.60.wrap=<p>|</p>
The only "hardcoded" parameter seems to be the name "FEopenLink" - see #31636.
By the way
Modern browsers like Chrome or Firefox ignore the parameter resizable=0
;)
Updated by Tobias Schmidt about 6 years ago
I'm not 100% sure but I think the TypoScript settings for JSwindow_params
don't apply to the click enlarge context. In TYPO3 v8.7 the source code in method imageLinkWrap
of class \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer
(lines 1468 - 1478) is basically the same as it was in TYPO3 v4.5:
$onClick = 'openPic('
. GeneralUtility::quoteJSvalue($this->getTypoScriptFrontendController()->baseUrlWrap($url)) . ','
. '\'' . ($newWindow ? md5($url) : 'thePicture') . '\','
. GeneralUtility::quoteJSvalue('width=' . ($processedFile->getProperty('width') + $offset[0])
. ',height=' . ($processedFile->getProperty('height') + $offset[1]) . ',status=0,menubar=0')
. '); return false;';
$a1 = '<a href="' . htmlspecialchars($url) . '"'
. ' onclick="' . htmlspecialchars($onClick) . '"'
. ($target !== '' ? ' target="' . htmlspecialchars($target) . '"' : '')
. $this->getTypoScriptFrontendController()->ATagParams . '>';
$a2 = '</a>';
Some attributes and values are hard coded. Adding custom attributes is not possible.
Updated by Riccardo De Contardi about 6 years ago
@Tobias Schmidt good point. Thank you for your findings
Updated by Gerrit Code Review over 4 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63921
Updated by Gerrit Code Review over 4 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63921
Updated by Benni Mack over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 95f94f80e36eabbd9334a0cf48259910b8b7bd37.