[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: wcm/inc class.bosite.inc.php,1.5,1.6
From: |
Miles Lott <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: wcm/inc class.bosite.inc.php,1.5,1.6 |
Date: |
Sun, 24 Feb 2002 18:11:21 -0500 |
Update of /cvsroot/phpgroupware/wcm/inc
In directory subversions:/tmp/cvs-serv29512/inc
Modified Files:
class.bosite.inc.php
Log Message:
Parse page and element expiration values into page output inside php tags
Index: class.bosite.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/wcm/inc/class.bosite.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.bosite.inc.php 24 Feb 2002 22:49:54 -0000 1.5
--- class.bosite.inc.php 24 Feb 2002 23:11:18 -0000 1.6
***************
*** 214,218 ****
$SITE_ROOT = PHPGW_SERVER_ROOT . SEP . 'wcm' . SEP .
'website' . SEP . 'templates';
! define('PHPGW_TEMPLATE_DIR',
ExecMethod('phpgwapi.phpgw.common.get_tpl_dir', 'phpgwapi'));
$tpl = CreateObject('phpgwapi.Template',$SITE_ROOT);
--- 214,218 ----
$SITE_ROOT = PHPGW_SERVER_ROOT . SEP . 'wcm' . SEP .
'website' . SEP . 'templates';
! // define('PHPGW_TEMPLATE_DIR',
ExecMethod('phpgwapi.phpgw.common.get_tpl_dir', 'phpgwapi'));
$tpl = CreateObject('phpgwapi.Template',$SITE_ROOT);
***************
*** 232,250 ****
$tpl->set_block('frame','bottom_end','bottom_end');
- $site_left = $this->site['site_paneo'] ?
$page['page_left'] : $this->site['site_left'];
- $site_mid = $this->site['site_paneo'] ?
$page['page_mid'] : $this->site['site_mid'];
- $site_right = $this->site['site_paneo'] ?
$page['page_right'] : $this->site['site_right'];
-
- $tpl->set_var('left_width', $site_left ? $site_left
: '120');
- $tpl->set_var('mid_width', $site_mid ? $site_mid
: '*');
- $tpl->set_var('mid_img_width', $site_mid ? $site_mid
: '350');
- $tpl->set_var('right_width', $site_right ?
$site_right : '130');
-
while(list(,$page) = each($this->site['site_pages']))
{
$outfile = $page['page_url'];
/* add our expiration source code (coming soon)
*/
! $out = $this->phpheader;
/* Read and parse page header */
--- 232,258 ----
$tpl->set_block('frame','bottom_end','bottom_end');
while(list(,$page) = each($this->site['site_pages']))
{
$outfile = $page['page_url'];
+ $page['page_expire'] = $page['page_expire'] ?
$page['page_expire'] : '0';
+ /* Can this page override pane widths defined
by the site? */
+ $site_left = $this->site['site_paneo'] ?
$page['page_left'] : $this->site['site_left'];
+ $site_mid = $this->site['site_paneo'] ?
$page['page_mid'] : $this->site['site_mid'];
+ $site_right = $this->site['site_paneo'] ?
$page['page_right'] : $this->site['site_right'];
+
+ $tpl->set_var('left_width', $site_left ?
$site_left : '120');
+ $tpl->set_var('mid_width', $site_mid ?
$site_mid : '*');
+ $tpl->set_var('mid_img_width', $site_mid ?
$site_mid : '350');
+ $tpl->set_var('right_width', $site_right ?
$site_right : '130');
+
+ $out = '<?php /* SITE:' .
$this->site['site_name']
+ . ';PAGE:' . $page['page_name']
+ . ';PAGE_VERSION:' .
$page['page_version']
+ . ';PAGEDATE:' . time()
+ . ';PAGEEXPIRE:' . $page['page_expire']
+ . ' */ ?>' . "\n";
/* add our expiration source code (coming soon)
*/
! $out .= $this->phpheader;
/* Read and parse page header */
***************
*** 265,296 ****
while(list($key,$val) =
@each($page['page_elements'][$section]))
{
! switch($val['element_type'])
{
! case '4':
! /* Hook */
!
$GLOBALS['phpgw']->hooks->single('website_' . $section,
$val['element_source'],True);
! $working .=
$GLOBALS['phpgw_info']['wcm'][$section];
! break;
! case '3':
! case '2':
! /* file/image */
!
if(@stat($val['element_source']))
{
! $f =
fopen($val['element_source'],'rb');
! while($line =
fgets($f,1024))
! {
!
$working .= $line;
! }
! fclose($f);
! unset($f);
! unset($line);
}
- break;
- case '1':
- /* HTML from db */
- $working .=
$val['element_source'];
- break;
- default:
- break;
}
}
--- 273,314 ----
while(list($key,$val) =
@each($page['page_elements'][$section]))
{
! if($val['element_name'])
{
! $val['element_expire']
= $val['element_expire'] ? $val['element_expire'] : '0';
! $out .= "\n" . '<?php
/* ELE:' . $val['element_name']
! . ';ELE_VERSION:' .
$val['element_version']
! . ';ELEDATE:' . time()
! . ';ELEEXPIRE:' .
$val['element_expire']
! . ' */ ?>' . "\n";
!
!
switch($val['element_type'])
{
! case '4':
! /* Hook
*/
!
$GLOBALS['phpgw']->hooks->single('website_' . $section,
$val['element_source'],True);
!
$working .= $GLOBALS['phpgw_info']['wcm'][$section];
! break;
! case '3':
! case '2':
! /*
file/image */
!
if(@stat($val['element_source']))
! {
!
$f = fopen($val['element_source'],'rb');
!
while($line = fgets($f,1024))
!
{
!
$working .= $line;
!
}
!
fclose($f);
!
unset($f);
!
unset($line);
! }
! break;
! case '1':
! /* HTML
from db */
!
$working .= $val['element_source'];
! break;
! default:
! break;
}
}
}
***************
*** 320,333 ****
}
! function publish_ftp()
{
}
! function publish_http()
{
}
! function publish_scp()
{
}
--- 338,363 ----
}
! function publish_ftp($outfile='',$content='')
{
+ if(!$content && $outfile)
+ {
+ return False;
+ }
}
! function publish_http($outfile='',$content='')
{
+ if(!$content && $outfile)
+ {
+ return False;
+ }
}
! function publish_scp($outfile='',$content='')
{
+ if(!$content && $outfile)
+ {
+ return False;
+ }
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: wcm/inc class.bosite.inc.php,1.5,1.6,
Miles Lott <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: wcm/inc class.bosite.inc.php,1.4,1.5
- Next by Date:
[Phpgroupware-cvs] CVS: wcm/inc class.soelement.inc.php,1.11,1.12 class.sopage.inc.php,1.12,1.13 class.uielement.inc.php,1.13,1.14 class.uipage.inc.php,1.16,1.17
- Previous by thread:
[Phpgroupware-cvs] CVS: wcm/inc class.bosite.inc.php,1.4,1.5
- Next by thread:
[Phpgroupware-cvs] CVS: wcm/inc class.soelement.inc.php,1.11,1.12 class.sopage.inc.php,1.12,1.13 class.uielement.inc.php,1.13,1.14 class.uipage.inc.php,1.16,1.17
- Index(es):