[ Index ] |
|
Code source de CMS made simple 1.0.5 |
1 <?php 2 #CMS - CMS Made Simple 3 #(c)2004 by Ted Kulp (wishy@users.sf.net) 4 #This project's homepage is: http://cmsmadesimple.sf.net 5 # 6 #This program is free software; you can redistribute it and/or modify 7 #it under the terms of the GNU General Public License as published by 8 #the Free Software Foundation; either version 2 of the License, or 9 #(at your option) any later version. 10 # 11 #This program is distributed in the hope that it will be useful, 12 #but WITHOUT ANY WARRANTY; without even the implied warranty of 13 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 #GNU General Public License for more details. 15 #You should have received a copy of the GNU General Public License 16 #along with this program; if not, write to the Free Software 17 #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 19 function smarty_cms_prefilter_precompilefunc($tpl_output, &$smarty) 20 { 21 global $gCms; 22 23 $result = explode(':', $smarty->_current_file); 24 if (count($result) > 1) 25 { 26 switch ($result[0]) 27 { 28 case "content": 29 foreach($gCms->modules as $key=>$value) 30 { 31 if ($gCms->modules[$key]['installed'] == true && 32 $gCms->modules[$key]['active'] == true) 33 { 34 $gCms->modules[$key]['object']->ContentPreCompile($tpl_output); 35 } 36 } 37 38 Events::SendEvent('Core', 'ContentPreCompile', array('content' => &$tpl_output)); 39 40 break; 41 case "template": 42 foreach($gCms->modules as $key=>$value) 43 { 44 if ($gCms->modules[$key]['installed'] == true && 45 $gCms->modules[$key]['active'] == true) 46 { 47 $gCms->modules[$key]['object']->TemplatePreCompile($tpl_output); 48 } 49 } 50 51 Events::SendEvent('Core', 'TemplatePreCompile', array('template' => &$tpl_output)); 52 53 break; 54 case "globalcontent": 55 foreach($gCms->modules as $key=>$value) 56 { 57 if ($gCms->modules[$key]['installed'] == true && 58 $gCms->modules[$key]['active'] == true) 59 { 60 $gCms->modules[$key]['object']->GlobalContentPreCompile($tpl_output); 61 } 62 } 63 64 Events::SendEvent('Core', 'GlobalContentPreCompile', array('global_content' => &$tpl_output)); 65 66 break; 67 default: 68 break; 69 } 70 71 } 72 73 foreach($gCms->modules as $key=>$value) 74 { 75 if ($gCms->modules[$key]['installed'] == true && 76 $gCms->modules[$key]['active'] == true) 77 { 78 $gCms->modules[$key]['object']->SmartyPreCompile($tpl_output); 79 } 80 } 81 82 Events::SendEvent('Core', 'SmartyPreCompile', array('content' => &$tpl_output)); 83 84 return $tpl_output; 85 } 86 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Tue Apr 3 18:50:37 2007 | par Balluche grâce à PHPXref 0.7 |