Update of /cvsroot/phpslash/phpslash-ft/class
In directory sc8-pr-cvs1:/tmp/cvs-serv27572/phpslash-ft/class
Modified Files:
Block_render_section.class Block_render_topic.class
functions.inc
Log Message:
[ 629466 ] Mainpage:Change PSL home from index.php3
Index: Block_render_section.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_render_section.class,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** Block_render_section.class 20 Dec 2002 22:17:29 -0000 1.14
--- Block_render_section.class 14 Jan 2003 15:07:02 -0000 1.15
***************
*** 62,67 ****
$mode = '';
! $default_tpl = "sectionsblock.tpl";
$site_homesection = 'Home';
if( !empty($this->psl['site_homesection'])) {
$site_homesection = $this->psl['site_homesection'];
--- 62,68 ----
$mode = '';
! $default_template = "sectionsblock.tpl";
$site_homesection = 'Home';
+
if( !empty($this->psl['site_homesection'])) {
$site_homesection = $this->psl['site_homesection'];
***************
*** 74,94 ****
parse_str( $options);
! // $tpl = ""; // disable template option
! if( empty($tpl) ) {
! $tpl = $default_tpl;
! } elseif ( file_exists($this->psl['templatedir'] . "/" . basename($tpl) . ".tpl") ) {
! $tpl = basename($tpl) . ".tpl";
} else {
! debug ( "Block_render_section:Template file doesn't exist, using default instead", $tpl);
! $tpl = $default_tpl;
! }
!
! $template = pslNew("slashTemplate",$this->psl['templatedir']);
! $template->debug = 0;
! $template->set_file(array(
! 'block' => "$tpl"
! ));
! $template->set_block ("block", "each_section", "section_block");
$template->set_var (array (
'SECTION_VALUE' => "",
--- 75,89 ----
parse_str( $options);
+ $template = pslNew("slashTemplate");
+ $template->debug = 0;
! if( $tpl == '') {
! $template->set_file( 'template', $default_template);
! } elseif ( $template->set_file('template' , basename($tpl) . ".tpl" )) {
} else {
! $template->set_file( 'template', $default_template);
! }
!
! $template->set_block ('template', 'each_section', 'section_block');
$template->set_var (array (
'SECTION_VALUE' => "",
***************
*** 134,142 ****
$template->set_var(array(
'ROOTDIR' => $this->psl['rooturl'],
! 'IMAGEDIR' => $this->psl['imageurl']
));
unset($db);
! return $template->parse('OUT',"block");
}
--- 129,138 ----
$template->set_var(array(
'ROOTDIR' => $this->psl['rooturl'],
! 'IMAGEDIR' => $this->psl['imageurl'],
! 'MAINPAGE' => $this->psl['mainpage']
));
unset($db);
! return $template->parse('OUT','template');
}
Index: Block_render_topic.class
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_render_topic.class,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** Block_render_topic.class 20 Dec 2002 22:17:29 -0000 1.14
--- Block_render_topic.class 14 Jan 2003 15:07:05 -0000 1.15
***************
*** 37,45 ****
$mode = '';
! $default_tpl = "topicsblock.tpl";
! if( $this->psl['site_homesection']) {
$site_homesection = $this->psl['site_homesection'];
- } else {
- $site_homesection = "Home";
}
--- 37,45 ----
$mode = '';
! $default_template = "topicsblock.tpl";
! $site_homesection = 'Home';
!
! if( !empty($this->psl['site_homesection'])) {
$site_homesection = $this->psl['site_homesection'];
}
***************
*** 48,67 ****
parse_str( $options);
! // $tpl = ""; // disable template option
! if( empty($tpl) ) {
! $tpl = $default_tpl;
! } elseif ( file_exists($this->psl[templatedir] . "/" . basename($tpl) . ".tpl") ) {
! $tpl = basename($tpl) . ".tpl";
! } else {
! debug ( "Block_render_topic:Template file doesn't exist, using default instead", $tpl);
! $tpl = $default_tpl;
! }
!
! $template = pslNew("slashTemplate",$this->psl['templatedir']);
$template->debug = 0;
! $template->set_file(array(
! 'block' => $tpl
! ));
! $template->set_block ('block', 'each_topic', 'topic_block');
$template->set_var (array (
'TOPIC_ID' => '',
--- 48,62 ----
parse_str( $options);
! $template = pslNew("slashTemplate");
$template->debug = 0;
!
! if( $tpl == '') {
! $template->set_file( 'template', $default_template);
! } elseif ( $template->set_file('template' , basename($tpl) . ".tpl" )) {
! } else {
! $template->set_file( 'template', $default_template);
! }
!
! $template->set_block ('template', 'each_topic', 'topic_block');
$template->set_var (array (
'TOPIC_ID' => '',
***************
*** 110,115 ****
$template->set_var (array (
'TOPIC_ID' => $db->Record['topic_id'],
- // TODO: Get rid of this?
- // 'TOPIC_ID' => urlencode($db->Record['topic_name']),
'TOPIC_NAME' => $db->Record['topic_name']
));
--- 105,108 ----
***************
*** 131,138 ****
$template->set_var(array(
'ROOTDIR' => $this->psl['rooturl'],
! 'IMAGEDIR' => $this->psl['imageurl']
));
! $output = $template->parse('OUT','block');
unset($db);
return $output;
--- 124,132 ----
$template->set_var(array(
'ROOTDIR' => $this->psl['rooturl'],
! 'IMAGEDIR' => $this->psl['imageurl'],
! 'MAINPAGE' => $this->psl['mainpage']
));
! $output = $template->parse('OUT','template');
unset($db);
return $output;
Index: functions.inc
===================================================================
RCS file: /cvsroot/phpslash/phpslash-ft/class/functions.inc,v
retrieving revision 1.121
retrieving revision 1.122
diff -C2 -d -r1.121 -r1.122
*** functions.inc 7 Jan 2003 19:31:13 -0000 1.121
--- functions.inc 14 Jan 2003 15:07:09 -0000 1.122
***************
*** 804,810 ****
$template->set_block ("breadcrumb", "each_crumb", "crumb_block");
- $template->set_var(array(
- 'ROOTURL' => $_PSL['rooturl']
- ));
/* setup the first link to the homepage */
--- 804,807 ----
***************
*** 813,817 ****
'DELIMETER' => "",
'LINK' => "",
! 'NAME' => pslgetText("Home")
));
--- 810,816 ----
'DELIMETER' => "",
'LINK' => "",
! 'NAME' => pslgetText("Home"),
! 'ROOTURL' => $_PSL['rooturl'],
! 'MAINPAGE' => $_PSL['mainpage']
));
|