Thread: [Phpcms-plugins-cvs] admin4phpCMS/modules/layout layout.css,1.6,1.7 layout.xml,1.8,1.9 class.module_
Brought to you by:
mjahn
From: Martin J. <mj...@us...> - 2004-12-07 06:35:28
|
Update of /cvsroot/phpcms-plugins/admin4phpCMS/modules/layout In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13210/modules/layout Modified Files: layout.css layout.xml class.module_layout.php Log Message: prepration of first Alpha-Preview Index: class.module_layout.php =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/layout/class.module_layout.php,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- class.module_layout.php 29 Sep 2004 20:10:43 -0000 1.12 +++ class.module_layout.php 7 Dec 2004 06:34:46 -0000 1.13 @@ -30,6 +30,9 @@ /* * $Log$ +* Revision 1.13 2004/12/07 06:34:46 mjahn +* prepration of first Alpha-Preview +* * Revision 1.12 2004/09/29 20:10:43 mjahn * completed phpCMS-config-part * began the statistic part @@ -73,7 +76,6 @@ include_once (PATH_TO_PEAR.'XML/Tree.php'); include_once (PATH_TO_PEAR.'XML/DTD/XmlValidator.php'); - /** * Layout-class * @@ -128,6 +130,7 @@ $this->_registerEvent ('DISPLAY_PARSE_ERROR', 'doParseError'); $this->_registerEvent ('DISPLAY_PARSE_CONTENT', 'doParseContent'); + $this->_registerAction ('doParseParam', 'parseParam'); $this->_registerAction ('doLayoutAddElement', 'addElement'); $this->_registerAction ('doLayoutAddTemplate', 'addTemplate'); $this->_registerAction ('doDisplay', 'displayLayout'); @@ -139,6 +142,21 @@ $this->_readLayoutFiles (dirname (__FILE__).'/layout.xml'); } + function parseParam (&$actiondata) { + $this->paramname = 'showvalue'; + $this->showtags = array ('mainmenu'=>'MENU_MAIN', 'statusbar'=>'STATUSBAR', 'submenu'=>'MENU_SUB', 'error'=>'ERROR', 'content'=>'CONTENT'); + + if (!isset ($_GET [$this->paramname])) { + $this->views = false; + return true; + } + + $this->views = htmlentities (strip_tags ($_GET [$this->paramname])); + $this->showtags = array ($this->views=>$this->showtags [$this->views]); + + unset ($_GET [$this->paramname]); + } + /** * Add an element to the elements-list * @@ -214,9 +232,9 @@ function displayLayout (&$actiondata) { $actiondata2 = array (); + // set tags that has to be replaced in the layout - $tags = array ('mainmenu'=>'MENU_MAIN', 'statusbar'=>'STATUSBAR', 'submenu'=>'MENU_SUB', 'error'=>'ERROR', 'content'=>'CONTENT'); - foreach ($tags as $tag=>$event) { + foreach ($this->showtags as $tag=>$event) { // set the container-element $actiondata1 = array ('_type'=>'empty', '_id'=>$tag); $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata1); @@ -230,11 +248,21 @@ } } - // send output to browser - $actiondata2 ['_type'] = 'layout'; - $actiondata2 ['_id'] = 'admin4phpcms'; - $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata2); - echo $this->displayElement ($this->_ids['admin4phpcms']); + if ($this->views !== false) { + if ($this->views == 'mainmenu') { + echo '<ul>'."\n"; + } + echo $this->displayElement ($this->_ids[$this->views]); + if ($this->views == 'mainmenu') { + echo '</ul>'."\n"; + } + } else { + // send output to browser + $actiondata2 ['_type'] = 'layout'; + $actiondata2 ['_id'] = 'admin4phpcms'; + $this->_callEvent('LAYOUT_ADD_ELEMENT', $actiondata2); + echo $this->displayElement ($this->_ids['admin4phpcms']); + } } /** Index: layout.xml =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/layout/layout.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- layout.xml 29 Sep 2004 20:10:42 -0000 1.8 +++ layout.xml 7 Dec 2004 06:34:46 -0000 1.9 @@ -41,8 +41,8 @@ <layout:replace name="content" /> </div> </div> - </body> -</html> +<!-- </body> +</html>--> ]]> </layout:insert> @@ -123,7 +123,7 @@ <layout:insert name="form"> <![CDATA[ -<form action="<layout:replace name="action" default="" />" <layout:replace name="extra" default="" /> method="<layout:replace name="method" default="post" />" enctype="x-form/multipart"> +<form action="<layout:replace name="action" default="/admin/index.de.htm" />" <layout:replace name="extra" default="" /> method="<layout:replace name="method" default="post" />" enctype="x-form/multipart"> <layout:replace name="content" /> </form> ]]> @@ -301,42 +301,6 @@ </layout:insert> - <layout:insert name="cachelist"> - <![CDATA[ - <div class="symbolleiste"> - <img src="modules/phpcms/img/cache/del-all.gif" width="16" height="16" alt="" title="Alle Dateien im Cache löschen" /> - <img src="modules/phpcms/img/cache/del-sel.gif" width="16" height="16" alt="" title="Ausgewählte Dateien im Cache löschen" /> - </div> - <ul id="cacheview"> - <layout:replace name="content" default="" /> - </ul> - ]]> - </layout:insert> - - <layout:insert name="cachedir"> - <![CDATA[ - <li class="subdir"> - <input type="checkbox" name="deletedir[<layout:replace name="cachedir" />]" value="1" /> - <layout:replace name="dirname" /> - <ul> - <layout:replace name="content" default="" /> - </ul> - </li> - ]]> - </layout:insert> - - <layout:insert name="cachefile"> - <![CDATA[ - <li> - <input type="checkbox" name="delete[<layout:replace name="cachefile" />]" value="1" /> - <span title="<layout:replace name="cachefile" />"><layout:replace name="filename" /></span> - <span class="<layout:replace name="cachetype" />">CACHE</span> - <span><layout:replace name="cachetime" /></span> - </li> - ]]> - </layout:insert> - - <layout:insert name="framebox"> <![CDATA[ <div class="iframe" style="width:<layout:replace name="width" default="100%" />; height:<layout:replace name="height" default="5em" />"> Index: layout.css =================================================================== RCS file: /cvsroot/phpcms-plugins/admin4phpCMS/modules/layout/layout.css,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- layout.css 29 Sep 2004 20:10:42 -0000 1.6 +++ layout.css 7 Dec 2004 06:34:46 -0000 1.7 @@ -399,3 +399,22 @@ li * { vertical-align:middle; } + +#taglist { + list-item-type:none; +} + +#taglist dt { + padding:0.2em; + color:#029544; + border-top:1px solid; +} + +#taglist dd { + padding:0 0.2em; + margin-left:3em; +} + +.iframe { + overflow:auto; +} \ No newline at end of file |