Feature #17003

Add the js openPic-function to core-js

Added by Georg Ringer over 14 years ago. Updated almost 8 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:
PHP Version:
Sprint Focus:


the onclick-popup for Images in Extensions needs the function which is only in FE available if there are any content elements ("Image only", "text with image") present.

So I need to add this script to every extension where I need it

externalisation would also be fine, bug #0002857

function openPic(url,winName,winParams) {
var theWindow = window.open(url,winName,winParams);
if (theWindow) {theWindow.focus();}
(issue imported from #M5011)

Related issues

Related to TYPO3 Core - Bug #15816: openPic() and config.removeDefaultJS = externalClosed2006-03-13

Related to TYPO3 Core - Feature #15889: Clean up inline javascript in menu_layers.phpRejected2006-03-23


Updated by Oliver Hader over 14 years ago

You could do this by using TypoScript. In your extension you can use $this->cObj->cObjGetSingle(...) or $this->cObj->cImage(...).

See the following specific example...
plugin.tx_myext_pi1 {
image {
file {
maxW = 100
maxH = 100
imageLinkWrap < tt_content.image.20.1.imageLinkWrap
imageLinkWrap.enable >
imageLinkWrap.enable = 1

Plugin PHP:
$image = $this->cObj->cImage($uploadDir.$imageSrc, $conf['image.']);


Updated by Oliver Hader over 14 years ago

Or if you just want the openPic, you can just call
The JavaScript code will then be inserted automatically once.


Updated by Georg Ringer over 14 years ago

Thanks Oliver for this code lesson! ;)

so if you don't see a need to include the function by default, then please close the bug



Updated by Clemens Riccabona over 14 years ago

Nice to now, thanx Oliver. But for me it is a general problem to have all these javascripts in the head of the html.

We should think about putting all this stuff to a global javascript file.

config.removeDefaultJS = external

works great, but badly just for the blur script. So a general solution for that problem would be nice. (with the layermenus i have a QD hack also published on my website -> riccabona.info probably there is someone around who wants to have a look at it, how to make it a better way ...).

But all in all these are missing features, an not bugs, I think. ;)


Updated by Oliver Hader over 14 years ago

@Clemens: You're right... Putting them into a separate JS file would be nice. I could imagine a static JS object that could be configured using JSON.
Please open a new feature-request here in the bugtracker and describe the problem and also add your patch/hack for the layermenus.


Updated by Clemens Riccabona over 14 years ago

I reported the problem and included my quick and dirty solution a year ago! ;)



Updated by Alexander Opitz about 8 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)
  • PHP Version deleted (4)

As this report is very old, is the handling in newer TYPO3 CMS Versions (like 6.0/6.1) more like you expect it?


Updated by Alexander Opitz almost 8 years ago

  • Status changed from Needs Feedback to Closed

No feedback for over 90 days.

Also available in: Atom PDF