Documentation TYPO3 par Ameos

class.tx_rtehtmlarea_pi3.php

00001 <?php
00002 /***************************************************************
00003 *  Copyright notice
00004 *
00005 *  (c) 2005-2006 Stanislas Rolland <stanislas.rolland(arobas)fructifor.ca>
00006 *  All rights reserved
00007 *
00008 *  This script is part of the TYPO3 project. The TYPO3 project is
00009 *  free software; you can redistribute it and/or modify
00010 *  it under the terms of the GNU General Public License as published by
00011 *  the Free Software Foundation; either version 2 of the License, or
00012 *  (at your option) any later version.
00013 *
00014 *  The GNU General Public License can be found at
00015 *  http://www.gnu.org/copyleft/gpl.html.
00016 *  A copy is found in the textfile GPL.txt and important notices to the license
00017 *  from the author is found in LICENSE.txt distributed with these scripts.
00018 *
00019 *
00020 *  This script is distributed in the hope that it will be useful,
00021 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 *  GNU General Public License for more details.
00024 *
00025 *  This copyright notice MUST APPEAR in all copies of the script!
00026 ***************************************************************/
00035 require_once(PATH_tslib.'class.tslib_pibase.php');
00036 
00037 class tx_rtehtmlarea_pi3 extends tslib_pibase {
00038 
00039                 // Default plugin variables:
00040         var $prefixId = 'tx_rtehtmlarea_pi3';           // Same as class name
00041         var $scriptRelPath = 'pi3/class.tx_rtehtmlarea_pi3.php';        // Path to this script relative to the extension dir.
00042         var $extKey = 'rtehtmlarea';            // The extension key.
00043         var $conf = array();
00044         var $cObj;
00045 
00054         function render_clickenlarge($content,$conf)    {
00055                 global $TYPO3_CONF_VARS;
00056                 
00057                 $clickenlarge = isset($this->cObj->parameters['clickenlarge']) ? $this->cObj->parameters['clickenlarge'] : 0;
00058                 $file = isset($this->cObj->parameters['clickenlargesrc']) ? $this->cObj->parameters['clickenlargesrc'] : '';
00059                 
00060                 unset($this->cObj->parameters['clickenlarge']);
00061                 unset($this->cObj->parameters['clickenlargesrc']);
00062                 unset($this->cObj->parameters['allParams']);
00063                 $content = '<img '. t3lib_div::implodeAttributes($this->cObj->parameters, TRUE, TRUE) . ' />';
00064                 
00065                 if ($TYPO3_CONF_VARS['EXTCONF'][$this->extKey]['enableClickEnlarge'] && $clickenlarge && is_array($conf['imageLinkWrap.'])) {
00066                         $theImage = $file ? $GLOBALS['TSFE']->tmpl->getFileName($file) : '';
00067                         if ($theImage) {
00068                                 if ($this->cObj->parameters['title']) $conf['imageLinkWrap.']['title'] = $this->cObj->parameters['title'];
00069                                 if ($this->cObj->parameters['alt']) $conf['imageLinkWrap.']['alt'] = $this->cObj->parameters['alt'];
00070                                 $content = $this->cObj->imageLinkWrap($content,$theImage,$conf['imageLinkWrap.']);
00071                         }
00072                 }
00073                 return $content;
00074         }
00075 }
00076 
00077 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/pi3/class.tx_rtehtmlarea_pi3.php'])        {
00078         include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/pi3/class.tx_rtehtmlarea_pi3.php']);
00079 }
00080 
00081 ?>


Généré par TYPO3 Ameos avec  doxygen 1.4.6