Minahito
minah****@users*****
2006年 8月 3日 (木) 18:48:01 JST
Index: xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php diff -u xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php:1.1.2.19 xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php:1.1.2.20 --- xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php:1.1.2.19 Wed Jul 26 19:56:35 2006 +++ xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php Thu Aug 3 18:48:01 2006 @@ -1,6 +1,6 @@ <?php /** - * @version $Id: Legacy_RenderSystem.class.php,v 1.1.2.19 2006/07/26 10:56:35 minahito Exp $ + * @version $Id: Legacy_RenderSystem.class.php,v 1.1.2.20 2006/08/03 09:48:01 minahito Exp $ */ if (!defined('XOOPS_ROOT_PATH')) exit(); @@ -171,7 +171,7 @@ // // The following lines are temporary until we will finish changing the style! // - switch($target->getType()) { + switch ($target->getType()) { case XCUBE_RENDER_TARGET_TYPE_BLOCK: $this->renderTheme($target); break; @@ -225,8 +225,8 @@ // // Assign from attributes of the render-target. // - foreach($target->getAttributes() as $key=>$value) { - $this->mXoopsTpl->assign($key,$value); + foreach($target->getAttributes() as $key => $value) { + $this->mXoopsTpl->assign($key, $value); } // @@ -263,9 +263,9 @@ foreach($assignNameMap as $key=>$val) { $this->mXoopsTpl->assign($val['showflag'],$this->_getBlockShowFlag($val['showflag'])); - if(isset($this->mBlockContents[$key])) { - foreach($this->mBlockContents[$key] as $result) { - $this->mXoopsTpl->append($val['block'],$result); + if(isset($this->mController->mBlockContents[$key])) { + foreach($this->mController->mBlockContents[$key] as $result) { + $this->mXoopsTpl->append($val['block'], $result['content']); } } } @@ -290,17 +290,17 @@ switch($area) { case 'xoops_showrblock' : if (isset($GLOBALS['show_rblock']) && empty($GLOBALS['show_rblock'])) return 0; - return (!empty($this->mBlockShowFlags[XOOPS_SIDEBLOCK_RIGHT])) ? 1 : 0; + return (!empty($this->mController->mBlockShowFlags[XOOPS_SIDEBLOCK_RIGHT])) ? 1 : 0; break; case 'xoops_showlblock' : if (isset($GLOBALS['show_lblock']) && empty($GLOBALS['show_lblock'])) return 0; - return (!empty($this->mBlockShowFlags[XOOPS_SIDEBLOCK_LEFT])) ? 1 : 0; + return (!empty($this->mController->mBlockShowFlags[XOOPS_SIDEBLOCK_LEFT])) ? 1 : 0; break; case 'xoops_showcblock' : if (isset($GLOBALS['show_cblock']) && empty($GLOBALS['show_cblock'])) return 0; - return (!empty($this->mBlockShowFlags[XOOPS_CENTERBLOCK_LEFT])|| - !empty($this->mBlockShowFlags[XOOPS_CENTERBLOCK_RIGHT])|| - !empty($this->mBlockShowFlags[XOOPS_CENTERBLOCK_CENTER])) ? 1 : 0; + return (!empty($this->mController->mBlockShowFlags[XOOPS_CENTERBLOCK_LEFT])|| + !empty($this->mController->mBlockShowFlags[XOOPS_CENTERBLOCK_RIGHT])|| + !empty($this->mController->mBlockShowFlags[XOOPS_CENTERBLOCK_CENTER])) ? 1 : 0; break; default : return 0; @@ -392,6 +392,23 @@ { $this->_renderFooter(); } + + function &createRenderTarget($type = XCUBE_RENDER_TARGET_TYPE_MAIN) + { + $renderTarget = null; + switch ($type) { + case XCUBE_RENDER_TARGET_TYPE_MAIN: + $renderTarget =& new Legacy_RenderTargetMain(); + break; + + default: + $renderTarget =& new XCube_RenderTarget(); + $renderTarget->setType($type); + break; + } + + return $renderTarget; + } } function LegacyRender_smartyfunction_notifications_select($params, &$smarty)