developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Ticket #1019: hook_plugin_tpl.patch

File hook_plugin_tpl.patch, 1.8 KB (added by foxmask, 11 years ago)

patch complete incluant l'ajout du fichier au build

  • build/manifests/jelix-lib.mn

    diff -r d9f0dbeb920f build/manifests/jelix-lib.mn
    a b  
    397397  function.formsubmit.php
    398398  function.formurl.php
    399399  function.formurlparam.php
     400  function.hook.php
    400401  function.image.php
    401402  function.jmessage.php
    402403  function.jfullurl.php
  • lib/jelix/CREDITS

    diff -r d9f0dbeb920f lib/jelix/CREDITS
    a b  
    161161 - little improvement in jLog.(#344)
    162162 - little improvement in formcontrols plugin (#353)
    163163
    164 FoxMaSk
     164Olivier Demah (aka FoxMaSk)
    165165  - bug fix in jFile::removeDir (#733)
    166166  - little improvement in jtpl_function_html_diff(#720)
    167167  - remove deprecated "value" attribute in breadcrumb function (#800)
     168  - tpl plugin hook (#1019)
    168169
    169170Olivier Gambier (aka d-m-p)
    170171 - code reviewer, bug fixes
  • new file lib/jelix/plugins/tpl/html/function.hook.php

    diff -r d9f0dbeb920f lib/jelix/plugins/tpl/html/function.hook.php
    - +  
     1<?php
     2/**
     3* @package     jelix
     4* @subpackage  jtpl_plugin
     5* @author      Olivier Demah
     6* @copyright   2009 Olivier Demah
     7* @link        http://www.jelix.org
     8* @licence     GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html
     9*/
     10
     11/**
     12 * hook plugin : 
     13 *
     14 * @param jTpl $tpl template engine
     15 * @param string $event the event name to call
     16 * @param array $params parameters to give to the listener
     17 */
     18
     19function jtpl_function_html_hook($tpl, $event, $params=array())
     20{
     21
     22    if ($event == '') return;
     23   
     24    $events = jEvent::notify($event,$params)->getResponse();
     25   
     26    foreach ($events as $event)
     27        echo $event;
     28
     29}
     30 No newline at end of file