| [ 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_postfilter_postcompilefunc($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 #Perform the content prerender callback 30 foreach($gCms->modules as $key=>$value) 31 { 32 if ($gCms->modules[$key]['installed'] == true && 33 $gCms->modules[$key]['active'] == true) 34 { 35 $gCms->modules[$key]['object']->ContentPostCompile($tpl_output); 36 } 37 } 38 39 Events::SendEvent('Core', 'ContentPostCompile', array('content' => &$tpl_output)); 40 41 break; 42 case "template": 43 #Perform the content prerender callback 44 foreach($gCms->modules as $key=>$value) 45 { 46 if ($gCms->modules[$key]['installed'] == true && 47 $gCms->modules[$key]['active'] == true) 48 { 49 $gCms->modules[$key]['object']->TemplatePostCompile($tpl_output); 50 } 51 } 52 53 Events::SendEvent('Core', 'TemplatePostCompile', array('template' => &$tpl_output)); 54 55 break; 56 case "globalcontent": 57 foreach($gCms->modules as $key=>$value) 58 { 59 if ($gCms->modules[$key]['installed'] == true && 60 $gCms->modules[$key]['active'] == true) 61 { 62 $gCms->modules[$key]['object']->GlobalContentPostCompile($tpl_output); 63 } 64 } 65 66 Events::SendEvent('Core', 'GlobalContentPostCompile', array('global_content' => &$tpl_output)); 67 68 break; 69 default: 70 break; 71 } 72 73 } 74 75 foreach($gCms->modules as $key=>$value) 76 { 77 if ($gCms->modules[$key]['installed'] == true && 78 $gCms->modules[$key]['active'] == true) 79 { 80 $gCms->modules[$key]['object']->SmartyPostCompile($tpl_output); 81 } 82 } 83 84 Events::SendEvent('Core', 'SmartyPostCompile', array('content' => &$tpl_output)); 85 86 return $tpl_output; 87 } 88 ?>
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 |