[TYPO3-core] RFC #9460: Feature: Add the ability of including external files to includeJS/getFileName

Mikkel Ricky mikkel at mikkelricky.dk
Sun Dec 21 21:58:18 CET 2008


This is an SVN patch request.

Type: New feature

Bugtracker references: http://bugs.typo3.org/view.php?id=9460

Branches: trunk

Problem: Add the ability of including external files to 
includeJS/getFileName

Solution: Rename original "getFileName" and create 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) { ... }


Regards,
Mikkel Ricky
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 9460.patch
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20081221/654d6371/attachment.txt 


More information about the TYPO3-team-core mailing list