Get Smarty

Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Check reviews of PHP Web Hosting, compatible with Smarty Templates

Escribiendo Plugins

Los Plugins pueden ser leidos por el Smarty automáticamente del sistema de archivos o pueden ser registrados en tiempo de ejecución por medio de una de las funciones de API register_* . Estos también pueden ser usados con la función API unregister_*.

Para los plugins que son registrados en tiempo de ejecución, el nombre de la(s) función(es) de plugin no tiene que seguir la convención de apariencia.

Si un plugin depende de alguna función alimentada por otro plugin (como es el caso con algunos plugins incrustados con el Smarty), entonces la forma apropiada para leer el plugin necesario es esta:


<?php
require_once $smarty->_get_plugin_filepath('function', 'html_options');
?>

    

Como regla general, el objeto Smarty siempre es pasado a los plugins como ultimo parámetro (con dos excepciones: los modificadores no pasan el objeto de Smarty del todo y los blocks obtenidos son pasados &$repeat después el objeto de Smarty para manter compatibilidad con antiguas versiones de Smarty).

Comments
No comments for this page.
Post a Comment
All comments are moderated. Support questions are ignored, use the forums instead.
Author:
Email: (not shown)
What is 17 plus 20? (Are you human?)

Sponsors [info]

Cheap Website Hosting @hostdone.com
email marketing @ActiveCampaign
broadband deals @BroadbandGenie
Best UK Web Hosting @webhost.uk.net
Reliable UK and US Web Hosting @rshosting.com
Cheap US and UK Web Hosting @infrenion.com
I.T Certification Exams @pass-guaranteed.com
Certification Practice Tests @firsttrycertify.com
Certification Practice Exam Questions @ace-it-certifications.com
Broadband Speed Test @broadbandspeed.co.uk
bulk email software @americaint.com
ASP.NET hosting @aspnethosting.co.uk