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">
|
|
|
|
|
|
<title>html_image</title>
|
|
|
|
|
|
<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>
|
|
|
|
|
|
html_image es una funci<63>n habitual 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.
|
|
|
|
|
|
</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
|
|
|
|
|
|
servidor (variable de ambiente DOCUMENT_ROOT) es usada como el
|
|
|
|
|
|
directorio base. Si la seguridad esta habilitada, la ruta para la
|
|
|
|
|
|
imagen debe estar dentro de un directorio seguro.
|
|
|
|
|
|
</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>
|
|
|
|
|
|
html_image requiere un acceso a disco para leer la imagen y
|
|
|
|
|
|
calcular la altura y el largo. Si usted no usa cache en el
|
|
|
|
|
|
template, generalmente es mejor evitar html_image y utilizar
|
|
|
|
|
|
las etiquetas de imagem est<73>ticas para un optimo funcionamiento.
|
|
|
|
|
|
</para>
|
|
|
|
|
|
</note>
|
|
|
|
|
|
<example>
|
|
|
|
|
|
<title>html_image example</title>
|
|
|
|
|
|
<programlisting role="php">
|
|
|
|
|
|
<![CDATA[
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
require('Smarty.class.php');
|
|
|
|
|
|
$smarty = new Smarty;
|
|
|
|
|
|
$smarty->display('index.tpl');
|
|
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
]]>
|
|
|
|
|
|
</programlisting>
|
|
|
|
|
|
<para>
|
|
|
|
|
|
Donde index.tpl es:
|
|
|
|
|
|
</para>
|
|
|
|
|
|
<programlisting>
|
|
|
|
|
|
<![CDATA[
|
|
|
|
|
|
{html_image file="pumpkin.jpg"}
|
|
|
|
|
|
{html_image file="/path/from/docroot/pumpkin.jpg"}
|
|
|
|
|
|
{html_image file="../path/relative/to/currdir/pumpkin.jpg"}
|
|
|
|
|
|
]]>
|
|
|
|
|
|
</programlisting>
|
|
|
|
|
|
<para>
|
|
|
|
|
|
SALIDA (posible):
|
|
|
|
|
|
</para>
|
|
|
|
|
|
<screen>
|
|
|
|
|
|
<![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
|
|
|
|
]]>
|
|
|
|
|
|
</screen>
|
|
|
|
|
|
</example>
|
|
|
|
|
|
</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
|
|
|
|
|
|
-->
|