Project

General

Profile

Actions

Bug #16641

closed

The "click-to-enlarge" function of the image content element does not provide scrollbars to the new window.

Added by Gernot Krause about 18 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Target version:
-
Start date:
2006-10-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

This concerns the "click-to-enlarge" function of the "image" content element as well as the "text+image" content element. The issue is that the script "class.tslib_content.php" does not provide the opportunity to activate scrollbars to the picture window. The window that opens on a click is not scrollable if the picture is large as the screen size!
This concerns all versions of Typo3 starting from 3.6 (the oldest I tried) and up to the latest 4.0.2

Suggested solution:

First, let's introduce two more parameters to define the window width and height and a third parameter which contains the options for the window (i.e. "scrollable=..." and so on). They are configurable by TypoScript. Therefore insert the following code six lines beneath "if ($conf['JSwindow'])" into the function "imageLinkWrap($string,$imageFile,$conf)":

if ($conf['window_width']) {
$dims[0] = $conf['window_width'];
}
if ($conf['window_height']) {
$dims[1] = $conf['window_height'];
}
if ($conf['JSwindow.']['parameter']) {
$windowparams = $conf['JSwindow.']['parameter'];
}

Then, change the line

htmlspecialchars('openPic(\''.$GLOBALS['TSFE']->baseUrlWrap($url).'\',\''.($conf['JSwindow.']['newWindow']?md5($url):'thePicture').'\',\'width='.($dims[0]+$offset[0]).',height='.($dims[1]+$offset[1]).',status=0,menubar=0\'); return false;').

(which is some lines beneath the above) to
htmlspecialchars('openPic(\''.$url.'\',\''.($conf['JSwindow.']['newWindow']?md5($url):'thePicture').'\',\'width='.($dims0+$offset0).',height='.($dims1+$offset1).','.$windowparams.'\'); return false;').

(issue imported from #M4382)


Files

bug_0004382.diff (807 Bytes) bug_0004382.diff Administrator Admin, 2006-10-15 21:49
scrollbars.patch (1.02 KB) scrollbars.patch Administrator Admin, 2007-10-16 17:05

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #21302: click enlarge: popup window params are hardcodedClosed2009-10-19

Actions
Actions

Also available in: Atom PDF