Feature #21302

click enlarge: popup window params are hardcoded

Added by Michael Sollmann almost 10 years ago. Updated about 1 year ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2009-10-19
Due date:
% Done:

0%

PHP Version:
4.3
Tags:
Complexity:
Sprint Focus:

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)


Related issues

Related to TYPO3 Core - Bug #16641: The "click-to-enlarge" function of the image content element does not provide scrollbars to the new window. Closed 2006-10-12
Related to TYPO3 Core - Feature #31636: popupwindows have hardcoded window-name FEopenLink Accepted 2011-11-07

History

#1 Updated by Valery Romanchev over 9 years ago

related to #16641

#2 Updated by Alexander Opitz over 6 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)?

#3 Updated by Tobias Schmidt over 6 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.

#4 Updated by Alexander Opitz over 6 years ago

  • Status changed from Needs Feedback to New

#5 Updated by Mathias Schreiber over 4 years ago

  • Target version set to 7.2 (Frontend)

#6 Updated by Benni Mack about 4 years ago

  • Target version changed from 7.2 (Frontend) to 7.4 (Backend)

#7 Updated by Susanne Moog about 4 years ago

  • Target version changed from 7.4 (Backend) to 7.5

#8 Updated by Benni Mack almost 4 years ago

  • Target version deleted (7.5)

#9 Updated by Riccardo De Contardi about 3 years ago

  • Category set to Frontend

#10 Updated by Riccardo De Contardi about 1 year 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 ;)

#11 Updated by Tobias Schmidt about 1 year 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.

#12 Updated by Riccardo De Contardi about 1 year ago

@Tobias Schmidt good point. Thank you for your findings

Also available in: Atom PDF