2004-10-07 18:50:52 +00:00
|
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
|
|
|
|
<!-- $Revision$ -->
|
2005-02-09 17:34:43 +00:00
|
|
|
|
<!-- EN-Revision: 1.3 Maintainer: ramirez Status: ready -->
|
2004-10-07 18:50:52 +00:00
|
|
|
|
<sect1 id="language.function.html.image">
|
2005-11-08 23:37:29 +00:00
|
|
|
|
<title>{html_image}</title>
|
2004-10-07 18:50:52 +00:00
|
|
|
|
<informaltable frame="all">
|
|
|
|
|
|
<tgroup cols="5">
|
|
|
|
|
|
<colspec colname="param" align="center" />
|
|
|
|
|
|
<colspec colname="type" align="center" />
|
|
|
|
|
|
<colspec colname="required" align="center" />
|
|
|
|
|
|
<colspec colname="default" align="center" />
|
|
|
|
|
|
<colspec colname="desc" />
|
|
|
|
|
|
<thead>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>Nombre del Atributo</entry>
|
|
|
|
|
|
<entry>Tipo</entry>
|
|
|
|
|
|
<entry>Requerido</entry>
|
|
|
|
|
|
<entry>Default</entry>
|
|
|
|
|
|
<entry>Descripci<EFBFBD>n</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>file</entry>
|
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
|
<entry>Si</entry>
|
|
|
|
|
|
<entry><emphasis>n/a</emphasis></entry>
|
|
|
|
|
|
<entry>nombre/ruta de la imagen</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>height</entry>
|
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
|
<entry><emphasis>Altura actual de la imagen</emphasis></entry>
|
|
|
|
|
|
<entry>altura con la cual la imagen debe ser mostrada</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>width</entry>
|
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
|
<entry>No</entry>
|
|
|
|
|
|
<entry><emphasis>Largo actual de la imagen</emphasis></entry>
|
|
|
|
|
|
<entry>largo con el cual la imagen debe ser mostrada</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>basedir</entry>
|
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
|
<entry>no</entry>
|
|
|
|
|
|
<entry><emphasis>document root del servidor web</emphasis></entry>
|
|
|
|
|
|
<entry>ruta relativa para la base del directorio</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>alt</entry>
|
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
|
<entry>no</entry>
|
|
|
|
|
|
<entry><emphasis>""</emphasis></entry>
|
|
|
|
|
|
<entry>descripci<EFBFBD>n alternativa de la imagen</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>href</entry>
|
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
|
<entry>no</entry>
|
|
|
|
|
|
<entry><emphasis>n/a</emphasis></entry>
|
|
|
|
|
|
<entry>valor href a donde la imagen ser<65> ligada</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
</tgroup>
|
|
|
|
|
|
</informaltable>
|
|
|
|
|
|
<para>
|
2005-11-08 23:37:29 +00:00
|
|
|
|
{html_image} es una
|
|
|
|
|
|
<link linkend="language.custom.functions">funci<EFBFBD>n habitual</link>
|
|
|
|
|
|
que genera una etiqueta HTML para una imagen. La altura y lo largo
|
|
|
|
|
|
son autom<6F>ticamente calculadas a partir del archivo de la imagen si
|
|
|
|
|
|
ning<6E>n valor suplido.
|
2004-10-07 18:50:52 +00:00
|
|
|
|
</para>
|
|
|
|
|
|
<para>
|
|
|
|
|
|
basedir es el directorio base en el cual las rutas relativas de las
|
|
|
|
|
|
imagenes estan basados. Si no lo proporciona, el document root del
|
2005-11-08 23:37:29 +00:00
|
|
|
|
servidor (<link linkend="language.variables.smarty">env</link> variable
|
|
|
|
|
|
de ambiente DOCUMENT_ROOT) es usada como el
|
|
|
|
|
|
directorio base. Si la <link linkend="variable.security">$security</link>
|
|
|
|
|
|
esta habilitada, la ruta para la imagen debe estar dentro de un directorio seguro.
|
2004-10-07 18:50:52 +00:00
|
|
|
|
</para>
|
|
|
|
|
|
<para>
|
|
|
|
|
|
<parameter>href</parameter> es el valor href a donde la imagen
|
|
|
|
|
|
sera ligada. Si un link es proporcionado, una etiqueta <a
|
|
|
|
|
|
href="LINKVALUE"><a> es puesta alrededor de la imagen.
|
|
|
|
|
|
</para>
|
|
|
|
|
|
<para>
|
|
|
|
|
|
Todos los parametros que no esten dentro de la lista de arriba
|
|
|
|
|
|
son mostrados como pares de nombre/valor dentro de la etiqueta
|
|
|
|
|
|
creada <img>.
|
|
|
|
|
|
</para>
|
|
|
|
|
|
<note>
|
|
|
|
|
|
<title>Nota T<>cnica</title>
|
|
|
|
|
|
<para>
|
2005-11-08 23:37:29 +00:00
|
|
|
|
{html_image} requiere un acceso a disco para leer la imagen y
|
|
|
|
|
|
calcular la altura y el largo. Si usted no usa <link
|
|
|
|
|
|
linkend="caching">cache</link> en el template,
|
|
|
|
|
|
generalmente es mejor evitar {html_image} y utilizar
|
|
|
|
|
|
las etiquetas de imagen est<73>ticas para un optimo funcionamiento.
|
2004-10-07 18:50:52 +00:00
|
|
|
|
</para>
|
|
|
|
|
|
</note>
|
|
|
|
|
|
<example>
|
|
|
|
|
|
<title>html_image example</title>
|
2005-11-08 23:37:29 +00:00
|
|
|
|
<programlisting>
|
2004-10-07 18:50:52 +00:00
|
|
|
|
<![CDATA[
|
2005-11-08 23:37:29 +00:00
|
|
|
|
where index.tpl is:
|
|
|
|
|
|
-------------------
|
2004-10-07 18:50:52 +00:00
|
|
|
|
{html_image file="pumpkin.jpg"}
|
|
|
|
|
|
{html_image file="/path/from/docroot/pumpkin.jpg"}
|
|
|
|
|
|
{html_image file="../path/relative/to/currdir/pumpkin.jpg"}
|
|
|
|
|
|
]]>
|
2005-11-08 23:37:29 +00:00
|
|
|
|
</programlisting>
|
|
|
|
|
|
<para>
|
|
|
|
|
|
la posible saldida puede ser:
|
|
|
|
|
|
</para>
|
|
|
|
|
|
<screen>
|
2004-10-07 18:50:52 +00:00
|
|
|
|
<![CDATA[
|
2005-02-09 17:34:43 +00:00
|
|
|
|
<img src="pumpkin.jpg" alt="" width="44" height="68" />
|
|
|
|
|
|
<img src="/path/from/docroot/pumpkin.jpg" alt="" width="44" height="68" />
|
|
|
|
|
|
<img src="../path/relative/to/currdir/pumpkin.jpg" alt="" width="44" height="68" />
|
2004-10-07 18:50:52 +00:00
|
|
|
|
]]>
|
2005-11-08 23:37:29 +00:00
|
|
|
|
</screen>
|
|
|
|
|
|
</example>
|
2004-10-07 18:50:52 +00:00
|
|
|
|
</sect1>
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
|
|
Local variables:
|
|
|
|
|
|
mode: sgml
|
|
|
|
|
|
sgml-omittag:t
|
|
|
|
|
|
sgml-shorttag:t
|
|
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
|
|
sgml-indent-step:1
|
|
|
|
|
|
sgml-indent-data:t
|
|
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
|
|
sgml-parent-document:nil
|
|
|
|
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
|
|
End:
|
|
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
|
|
-->
|