Update of /cvsroot/phpvortex/phpvortex
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12217
Modified Files:
APP_Base.class.php
Log Message:
Added a default style property to APP_Base
Index: APP_Base.class.php
===================================================================
RCS file: /cvsroot/phpvortex/phpvortex/APP_Base.class.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** APP_Base.class.php 13 Oct 2004 16:46:27 -0000 1.1
--- APP_Base.class.php 13 Oct 2004 18:08:26 -0000 1.2
***************
*** 47,56 ****
* 'class' => 'SEC_* Class',
* 'title' => 'Page Title',
- * 'style' => array('Page style sheet',...),
* 'opts' => array('Section options'),
* [ 'layout' => array('page layout (see below)') ]
* ), ...
* </pre>
* If exists, the $db member variable is added to the 'opts' of the page.
* If 'opts'['layout'] is set, it is used instead of the default layout.
*
--- 47,57 ----
* 'class' => 'SEC_* Class',
* 'title' => 'Page Title',
* 'opts' => array('Section options'),
+ * [ 'style' => array('Page style sheet',...), ]
* [ 'layout' => array('page layout (see below)') ]
* ), ...
* </pre>
* If exists, the $db member variable is added to the 'opts' of the page.
+ * If 'opts'['style'] is set, it is used instead of the default styles.
* If 'opts'['layout'] is set, it is used instead of the default layout.
*
***************
*** 74,77 ****
--- 75,85 ----
/**
+ * Array containing URLs to the default style sheets of the site.
+ *
+ * @var array
+ */
+ var $styles = array();
+
+ /**
* Constructor: Load all parameters into member variables.
*
***************
*** 108,111 ****
--- 116,124 ----
$layout = $this->layout;
}
+ if (isset($this->pages[$page]['style'])) {
+ $style = $this->pages[$page]['style'];
+ } else {
+ $style = $this->styles;
+ }
if (isset($this->pages[$page]['opts'])) {
$opts = $this->pages[$page]['opts'];
***************
*** 122,126 ****
'opts' => array(
'title' => $this->pages[$page]['title'],
! 'styles' => $this->pages[$page]['style']
)
),
--- 135,139 ----
'opts' => array(
'title' => $this->pages[$page]['title'],
! 'styles' => $style
)
),
|