Project

General

Profile

Actions

Feature #19399

closed

Add the ability of including external files to includeJS/getFileName

Added by Nikolas Hagelstein about 16 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Communication
Target version:
-
Start date:
2008-10-01
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.2
Tags:
Complexity:
Sprint Focus:

Description

Currently it is not possible to include external JS files using includeJS (since it makes use of t3lib_TStemplate::getFileName).

Tt's possible to include external script via headerData. But headerData isnt a good choice concerning order and duplicate insertion.

(issue imported from #M9460)


Files

9460.patch (2.15 KB) 9460.patch Administrator Admin, 2008-12-21 21:52

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #20661: [Feature] Add class for render HTML header/footer for BE and FEClosedSteffen Kamper2009-06-24

Actions
Actions #1

Updated by Nils Hodyas about 16 years ago

I'll second that request. Would be nice for including code hosted by Google e.g.

Actions #2

Updated by Mikkel Ricky almost 16 years ago

Patch resolving this limitation (is it a bug?) will be uploaded shortly.
The patch renames the original "getFileName" and creates a new "getFileName" that acts as a wrapper for the original one:

/** * Wrapper for _getFilename (original "getFileName" renamed) that extends the original functionality in two ways: * 1. external resources can be included by specifying a url (e.g. http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js) * 2. local resources can include a query part (e.g. fileadmin/lib.js?version=1) * * If the parameter is an absolute url (starting with a protocol specification (e.g. "http://") or a shash ("/")) it will be returned unaltered. * Otherwise, the parameter value will be split into a url and an optional query part (?...), and _getFileName will be called with url as parameter. * If the result of this call is non-empty the query part (if any) will be appended to form the final result. * * @param string Url or Typoscript "resource" data type value. * @return string Url (possibly expanded from Typoscript resource) * @see _getFileName()
*/
public function getFileName($fileFromSetup) { ... }

Actions #3

Updated by Francois Suter almost 15 years ago

Actually this is now possible in TYPO3 4.3. Please try and confirm that this bug can be closed. Thanks.

(see the updated TSref for property includeJS and look at sub-property "external")

Actions #4

Updated by Benni Mack over 14 years ago

REMINDER #2: This is fixed, please confirm this fix and we'll close the bug.

Actions #5

Updated by Benni Mack over 14 years ago

Fixed, and no feedback. So we close this one.

Actions #6

Updated by Susanne Moog over 13 years ago

  • Target version deleted (4.4.0)
Actions

Also available in: Atom PDF