[ Index ]
 

Code source de Typo3 4.1.3

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/t3lib/ -> thumbs.php (sommaire)

Generates a thumbnail and returns an image stream, either GIF/PNG or JPG $Id: thumbs.php 1953 2007-01-28 20:29:09Z masi $ Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj

Author: Kasper Skaarhoj <kasperYYYY@typo3.com>
Poids: 401 lignes (13 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

SC_t3lib_thumbs:: (5 méthodes):
  init()
  main()
  errorGif()
  fontGif()
  wrapFileName()


Classe: SC_t3lib_thumbs  - X-Ref

Class for generating a thumbnail from the input parameters given to the script

Input GET var, &file:         relative or absolute reference to an imagefile. WILL be validated against PATH_site / lockRootPath
Input GET var, &size:         integer-values defining size of thumbnail, format '[int]' or '[int]x[int]'

Relative paths MUST BE the first two characters ONLY: eg: '../dir/file.gif', otherwise it is expect to be absolute

init()   X-Ref
Initialize; reading parameters with GPvar and checking file path
Results in internal var, $this->input, being set to the absolute path of the file for which to make the thumbnail.

return: void

main()   X-Ref
Create the thumbnail
Will exit before return if all is well.

return: void

errorGif($l1,$l2,$l3)   X-Ref
Creates error image based on gfx/notfound_thumb.png
Requires GD lib enabled, otherwise it will exit with the three textstrings outputted as text.
Outputs the image stream to browser and exits!

param: string        Text line 1
param: string        Text line 2
param: string        Text line 3
return: void

fontGif($font)   X-Ref
Creates a font-preview thumbnail.
This means a PNG/GIF file with the text "AaBbCc...." set with the font-file given as input and in various sizes to show how the font looks
Requires GD lib enabled.
Outputs the image stream to browser and exits!

param: string        The filepath to the font file (absolute, probably)
return: void

wrapFileName($inputName)   X-Ref
Wrapping the input filename in double-quotes

param: string        Input filename
return: string        The output wrapped in "" (if there are spaces in the filepath)



Généré le : Sun Nov 25 17:13:16 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics