PortalDisplay.php

Go to the documentation of this file.
00001 <?php
00003 // {{{ license
00004 
00005 // +----------------------------------------------------------------------+
00006 // | FastFrame Application Framework                                      |
00007 // +----------------------------------------------------------------------+
00008 // | Copyright (c) 2002-2006 The Codejanitor Group                        |
00009 // +----------------------------------------------------------------------+
00010 // | This source file is subject to the GNU Lesser Public License (LGPL), |
00011 // | that is bundled with this package in the file LICENSE, and is        |
00012 // | available at through the world-wide-web at                           |
00013 // | http://www.fsf.org/copyleft/lesser.html                              |
00014 // | If you did not receive a copy of the LGPL and are unable to          |
00015 // | obtain it through the world-wide-web, you can get it by writing the  |
00016 // | Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
00017 // | MA 02111-1307, USA.                                                  |
00018 // +----------------------------------------------------------------------+
00019 // | Authors: Jason Rust <jrust@codejanitor.com>                          |
00020 // | Authors: Greg Gilbert <ggilbert@codejanitor.com>                     |
00021 // +----------------------------------------------------------------------+
00022 
00023 // }}}
00024 // {{{ requires
00025 
00026 require_once FASTFRAME_ROOT . 'lib/FastFrame/Action.php';
00027 
00028 // }}}
00029 // {{{ class FF_Action_Display_Portal 
00030 
00041 // }}}
00042 class FF_Action_Display_Portal extends FF_Action {
00043     // {{{ run()
00044 
00051     function run()
00052     {
00053         $o_widget =& new FF_Smarty(dirname(__FILE__) . '/../../themes/widgets/portal.tpl');
00054         $o_widget->caching = true;
00055         $o_actionHandler =& FF_ActionHandler::singleton();
00056         if (!$o_widget->is_cached($o_actionHandler->getAppId())) {
00057             $a_page = $this->o_model->getPageSettings('main', '');
00058             for ($i = 1; $i <= 9; $i++) {
00059                 if (isset($a_page[$i])) {
00060                     list($s_blockType, $s_blockId) = explode(':', $a_page[$i]);
00061                     $o_widget->append('blocks', array('loc_id' => $i, 'data' => $this->o_model->getBlockData($s_blockType, $s_blockId)));
00062                 }
00063                 else {
00064                     $o_widget->append('blocks', array('loc_id' => $i, 'data' => '&nbsp;'));
00065                 }
00066             }
00067         }
00068 
00069         $s_content = preg_replace('/(' . session_name() . ')=.*?(&|\'|")/', '\\1=' . session_id() . '\\2', $o_widget->fetch(false, $o_actionHandler->getAppId()));
00070         $this->o_output->o_tpl->append('content_middle', $s_content);
00071         $this->o_output->setPageName(_('Portal'));
00072         return $this->o_nextAction;
00073     }
00074 
00075     // }}}
00076 }
00077 ?>

Generated on Fri Jun 23 11:38:17 2006 for FastFrame by  doxygen 1.4.4