[ Index ]
 

Code source de XOOPS 2.0.17.1

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/htdocs/class/smarty/xoops_plugins/ -> compiler.xoAppUrl.php (sommaire)

xoAppUrl Smarty compiler plug-in See the enclosed file LICENSE for licensing information. If you did not receive this file, get it at http://www.fsf.org/copyleft/gpl.html

Author: Skalpa Keo <skalpa@xoops.org>
Copyright: The XOOPS project http://www.xoops.org/
License: http://www.fsf.org/copyleft/gpl.html GNU public license
Version: $Id: compiler.xoAppUrl.php 694 2006-09-04 11:33:22Z skalpa $
Poids: 90 lignes (3 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 fonction

  smarty_compiler_xoAppUrl()

Fonctions
Fonctions qui ne font pas partie d'une Classe:

smarty_compiler_xoAppUrl( $argStr, &$compiler )   X-Ref
Inserts the URL of an application page

This plug-in allows you to generate a module location URL. It uses any URL rewriting
mechanism and rules you'll have configured for the system.

To ensure this can be as optimized as possible, it accepts 2 modes of operation:

<b>Static address generation</b>:<br>
This is the default mode and fastest mode. When used, the URL is generated during
the template compilation, and statically written in the compiled template file.
To use it, you just need to provide a location in a format XOOPS understands.

<code>
// Generate an URL using a physical path
([xoAppUrl modules/something/yourpage.php])
// Generate an URL using a module+location identifier (2.3+)
([xoAppUrl mod_xoops_Identification#logout])
</code>

<b>Dynamic address generation</b>:<br>
The is the slowest mode, and its use should be prevented unless necessary. Here,
the URL is generated dynamically each time the template is displayed, thus allowing
you to use the value of a template variable in the location string. To use it, you
must surround your location with double-quotes ("), and use the
{@link http://smarty.php.net/manual/en/language.syntax.quotes.php Smarty quoted strings}
syntax to insert variables values.

<code>
// Use the value of the $sortby template variable in the URL
([xoAppUrl "modules/something/yourpage.php?order=`$sortby`"])
</code>



Généré le : Sun Nov 25 11:44:32 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics