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 #130: block.lcmd.php

File block.lcmd.php, 921 bytes (added by Aubanel MONNIER, 13 years ago)

the lcmd jTpl block plugin for latex commands like \section{blah\footnonte{hey} blah}

Line 
1<?php
2/**
3* @package    jelix
4* @subpackage jtpl_plugin
5* @version    $Id$
6* @author     Jouanneau Laurent
7* @copyright  2005-2006 Jouanneau laurent
8* @link        http://www.jelix.org
9* @licence    GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html
10*/
11
12/**
13 * a special to insert latex content
14 *
15 * usage : {ifacl 'subject',54} ..here generated content if the user has the right  {/ifacl}
16 * @param jTplCompiler $compiler the template compiler
17 * @param boolean true if it is the begin of block, else false
18 * @param $param array  1=>latex command 2=>right value 3=>optional resource
19 * @return string the php code corresponding to the begin or end of the block
20 */
21function jtpl_block_lcmd($compiler, $begin, $param=array())
22{
23if ($begin){
24        array_push($stack,$param[0]);
25        return 'echo \'\\'.$param[0].'{\';';
26        }
27else return 'echo \'}\';';
28}
29
30
31?>