Update of /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7380/phpslash-dev/include/modules/block/blocktypes
Modified Files:
Block_render_page.class
Log Message:
new Feeds block.
Index: Block_render_page.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes/Block_render_page.class,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Block_render_page.class 4 Nov 2004 20:17:04 -0000 1.7
--- Block_render_page.class 6 Nov 2004 18:08:01 -0000 1.8
***************
*** 39,42 ****
--- 39,52 ----
}
+ // set default module
+ $module = $this->psl['module']['module.default'];
+ if(array_key_exists('module', $block_info['block_options'])) {
+ // the module is set in the block admin
+ $module = $block_info['block_options']['module'];
+ } elseif(array_key_exists('module', $GLOBALS['ary'])) {
+ // the module is set by the calling script
+ $module = $GLOBALS['ary']['module'];
+ }
+
}
***************
*** 60,66 ****
// If the view is let module control page
! if(array_key_exists('view', $GLOBALS['ary'])) {
! $this->output = $centerblocks;
! return true;
}
if (empty($leftblocks)) {
--- 70,78 ----
// If the view is let module control page
! if(array_key_exists('view', $ary)) {
! if(@file_exists($this->psl['moduledir'] ."/". $this->psl['module'][$module] ."/backend.php")) {
! $this->output = include($this->psl['moduledir'] ."/". $this->psl['module'][$module] ."/backend.php");
! return true;
! }
}
if (empty($leftblocks)) {
***************
*** 88,103 ****
if( !empty($_SERVER['QUERY_STRING'])) {
! $QUERY_STRING = '?'.$_SERVER['QUERY_STRING'];
} else {
! $QUERY_STRING = '';
}
!
$template->set_var(array(
- 'SKIN' => $this->psl['skin'],
- 'QUERYSTRING' => $QUERY_STRING,
- 'ROOTDIR' => $this->psl['rooturl'],
- 'IMAGEDIR' => $this->psl['imageurl'],
- 'ROOTURL' => $this->psl['rooturl'],
- 'IMAGEURL' => $this->psl['imageurl'],
'BREADCRUMB' => $breadcrumb,
// 'STORY_COLUMN' => $allstories,
--- 100,115 ----
if( !empty($_SERVER['QUERY_STRING'])) {
! $QUERY_STRING2 = '?'.$_SERVER['QUERY_STRING'];
} else {
! $QUERY_STRING2 = '';
}
!
! if( !empty($_SERVER['QUERY_STRING'])) {
! $QUERY_STRING3 = $this->psl['amp'].$_SERVER['QUERY_STRING'];
! } else {
! $QUERY_STRING3 = '';
! }
!
$template->set_var(array(
'BREADCRUMB' => $breadcrumb,
// 'STORY_COLUMN' => $allstories,
***************
*** 106,110 ****
'CENTER_BLOCK_COLUMN' => $centerblocks,
'RIGHT_BLOCK_COLUMN' => $rightblocks,
! 'BOTTOM' => $bottomblocks
));
--- 118,130 ----
'CENTER_BLOCK_COLUMN' => $centerblocks,
'RIGHT_BLOCK_COLUMN' => $rightblocks,
! 'BOTTOM' => $bottomblocks,
! 'SKIN' => $this->psl['skin'],
! 'QUERY_STRING' => $QUERY_STRING,
! 'QUERY_STRING2' => $QUERY_STRING2,
! 'QUERY_STRING3' => $QUERY_STRING3,
! 'ROOTDIR' => $this->psl['rooturl'],
! 'IMAGEDIR' => $this->psl['imageurl'],
! 'ROOTURL' => $this->psl['rooturl'],
! 'IMAGEURL' => $this->psl['imageurl']
));
|