[ Index ] |
|
Code source de XOOPS 2.0.17.1 |
1 <?php 2 /** 3 * xoImgUrl Smarty compiler plug-in 4 * 5 * See the enclosed file LICENSE for licensing information. 6 * If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html 7 * 8 * @copyright The XOOPS project http://www.xoops.org/ 9 * @license http://www.fsf.org/copyleft/gpl.html GNU public license 10 * @author Skalpa Keo <skalpa@xoops.org> 11 * @package xos_opal 12 * @subpackage xos_opal_Smarty 13 * @since 2.0.14 14 * @version $Id: compiler.xoImgUrl.php 506 2006-05-26 23:10:37Z skalpa $ 15 */ 16 17 /** 18 * Inserts the URL of a file resource customizable by themes 19 * 20 * This plug-in works like the {@link smarty_compiler_xoAppUrl() xoAppUrl} plug-in, 21 * except that it is intended to generate the URL of resource files customizable by 22 * themes. 23 * 24 * Here the current theme is asked to check if a custom version of the requested file exists, and 25 * if one is found its URL is returned. Otherwise, the request will be passed to the 26 * theme parents one by one. Ultimately, if no custom version has been found, the resource 27 * default URL location will be returned. 28 * 29 * <b>Note:</b> the themes inheritance system can generate many filesystem accesses depending 30 * on your themes configuration. Because of this, the use of the dynamic syntax with this plug-in 31 * is not possible right now. 32 */ 33 function smarty_compiler_xoImgUrl( $argStr, &$smarty ) { 34 global $xoops, $xoTheme; 35 36 $argStr = trim( $argStr ); 37 $path = ( isset($xoTheme) && is_object( $xoTheme ) ) ? $xoTheme->resourcePath( $argStr ) : $argStr; 38 return "\necho '" . addslashes( $xoops->url( $path ) ) . "';"; 39 40 } 41 42 43 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Nov 25 11:44:32 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |