commit 981296a28382488ae8a973c72547a658673c8a5a
parent e2c1dde73c08575e862c14b1f1c7d0eb3eed8a02
Author: dankert <devnull@localhost>
Date: Wed, 7 Nov 2007 23:10:18 +0100
Neue Einstellung "application_mode"
Diffstat:
8 files changed, 110 insertions(+), 81 deletions(-)
diff --git a/config/interface.ini.php b/config/interface.ini.php
@@ -1,5 +1,12 @@
; <?php exit('direct access denied') ?>
+; In Application-Mode all window-borders and window-titles are disabled.
+; This is useful, if you are using something like "Mozilla Prism" and
+; want OpenRat to look more like a native application.
+;
+; Default=false
+application_mode=false
+
tree_width = "25%" ; width of navigation frame (tree) (actually outdated!)
file_separator = " » " ; chars between directory names
nice_urls = false ; be aware: if 'true' you need special rewrite rules in a .htaccess file!
@@ -7,7 +14,11 @@ url_sessionid = false ; only needed if cookies and transid not ava
theme = default ;
show_duration = false ; Show duration on every page. Only useful for developers.
timeout = ; Request timeout in seconds (blank=system default)
-override_title = ; Replace the default title (Program name+version) with this text
+
+; Replace the default title (Program name+version) with this text
+; If blank, the default is "OpenRat {Version}".
+override_title =
+
min_width = 950 ; Minimal Width of the browser window. If smaller, then tree is initally disabled.
redirect = false ; use redirects before going to view (actually in testing)
diff --git a/themes/default/include/html/form.inc.php b/themes/default/include/html/form.inc.php
@@ -10,7 +10,7 @@
target="<?php echo $attr_target ?>"
action="<?php echo Html::url( $attr_action,$attr_subaction,$attr_id ) ?>"
method="<?php echo $attr_method ?>"
- enctype="<?php echo $attr_enctype ?>">
+ enctype="<?php echo $attr_enctype ?>" style="margin:0px;padding:0px;">
<input type="hidden" name="<?php echo REQ_PARAM_ACTION ?>" value="<?php echo $attr_action ?>" />
<input type="hidden" name="<?php echo REQ_PARAM_SUBACTION ?>" value="<?php echo $attr_subaction ?>" />
<input type="hidden" name="<?php echo REQ_PARAM_ID ?>" value="<?php echo $attr_id ?>" /><?php
diff --git a/themes/default/include/html/page.inc.php b/themes/default/include/html/page.inc.php
@@ -27,5 +27,5 @@
<?php } ?>
</head>
-<body class="<?php echo $attr_class ?>">
+<body class="<?php echo $attr_class ?>" <?php if (@$conf['interface']['application_mode']) { ?> style="padding:0px;margin:0px;"<?php } ?> >
diff --git a/themes/default/include/html/window.inc.php b/themes/default/include/html/window.inc.php
@@ -16,9 +16,22 @@
$column_classes = explode(',',$attr_columnclasses);
unset($attr['columnclasses']);
}
+
+
global $image_dir;
- echo '<br/><br/><br/><center>';
- echo '<table class="main" cellspacing="0" cellpadding="4" width="'.$attr_width.'">';
+ if (@$conf['interface']['application_mode'] )
+ {
+ echo '<table class="main" cellspacing="0" cellpadding="4" width="100%" style="margin:0px;border:0px; padding:0px;" height_oo="100%">';
+ }
+ else
+ {
+ echo '<br/><br/><br/><center>';
+ echo '<table class="main" cellspacing="0" cellpadding="4" width="'.$attr_width.'">';
+ }
+
+
+ if (!@$conf['interface']['application_mode'] )
+ {
echo '<tr><td class="menu">';
if ( !empty($attr_icon) )
echo '<img src="'.$image_dir.'icon_'.$attr_icon.IMG_ICON_EXT.'" align="left" border="0">';
@@ -32,7 +45,11 @@
}
echo '<span class="title">'.lang($windowTitle).'</span>';
?>
- </td><!--<td class="menu" style="align:right;">
+ </td>
+ <?php
+ }
+ ?>
+<?php ?> <!--<td class="menu" style="align:right;">
<?php if (isset($windowIcons)) foreach( $windowIcons as $icon )
{
?><a href="<?php echo $icon['url'] ?>" title="<?php echo 'ICON_'.lang($menu['type'].'_DESC') ?>"><image border="0" src="<?php echo $image_dir.$icon['type'].IMG_ICON_EXT ?>"></a> <?php
@@ -77,11 +94,12 @@
<?php foreach( $notices as $notice_idx=>$notice ) { ?>
<br><table class="notice" width="100%">
-
- <tr>
- <td colspan="2" class="subaction" style="padding:2px; white-space:nowrap; border-bottom:1px solid black;"><?php if ($notice['name']!='') { ?><img src="<?php echo $image_dir.'icon_'.$notice['type'].IMG_ICON_EXT ?>" align="left" /><?php echo $notice['name'] ?><?php } ?>
+ <?php if ($notice['name']!='') { ?>
+ <tr>
+ <td colspan="2" class="subaction" style="padding:2px; white-space:nowrap; border-bottom:1px solid black;"><img src="<?php echo $image_dir.'icon_'.$notice['type'].IMG_ICON_EXT ?>" align="left" /><?php echo $notice['name'] ?>
</td>
</tr>
+<?php } ?>
<tr class="notice_<?php echo $notice['status'] ?>">
<td style="padding:10px;" width="30px"><img src="<?php echo $image_dir.'notice_'.$notice['status'].IMG_ICON_EXT ?>" style="padding:10px" /></td>
<td style="padding:10px;padding-right:10px;padding-bottom:10px;"><?php if ($notice['status']=='error') { ?><strong><?php } ?><?php echo $notice['text'] ?><?php if ($notice['status']=='error') { ?></strong><?php } ?>
diff --git a/themes/default/templates/index/show.tpl.src.php b/themes/default/templates/index/show.tpl.src.php
@@ -1,41 +1,36 @@
frameset-page
+
+ if true:config:interface/application_mode
+ set var:menuheight value:24
+ else
+ set var:menuheight value:54
+
+ if true:config:interface/application_mode
- frameset rows:23,3,*,3,5
- frame file:var:frame_src_title name:cms_title
- frame file:var:frame_src_border
- #frame file:var:frame_src_background
-
- frameset columns:25%,*
- #frame file:var:frame_src_background
- #frame file:var:frame_src_border
- frameset rows:54,*
- #frame file:var:frame_src_border
- frame file:var:frame_src_tree_title name:cms_treemenu
- frame file:var:frame_src_tree name:cms_tree scrolling:auto
- //frame file:var:frame_src_clipboard name:cms_clipboard
- #frame file:var:frame_src_border
- //frame file:var:frame_src_tree_menu name:cms_treemenu
- //frame file:var:frame_src_border
- #frame file:var:frame_src_border
- #frame file:var:frame_src_background
- #frame file:var:frame_src_border
- frame file:var:frame_src_main name:cms_main
- #frame file:var:frame_src_border
- #frame file:var:frame_src_background
- frame file:var:frame_src_border
- frame file:var:frame_src_background
+ frameset rows:*
+
+ frameset columns:25%,*
+ frameset rows:{menuheight},*
+ frame file:var:frame_src_tree_title name:cms_treemenu
+ frame file:var:frame_src_tree name:cms_tree scrolling:auto
+ frame file:var:frame_src_main name:cms_main
+
+ else
+ frameset rows:23,3,*,3,5
+ frame file:var:frame_src_title name:cms_title
+ frame file:var:frame_src_border
+ #frame file:var:frame_src_background
+
+ if true:config:interface/application_mode
+ set var:menuheight value:24
+ else
+ set var:menuheight value:54
-// frameset rows:20,5,*,5
-// frame file:var:frame_src_title name:cms_title
-// frame file:var:frame_src_background
-//
-// frameset columns:5,25%,5,*,5
-// frame file:var:frame_src_background
-// frameset rows:54,*
-// frame file:var:frame_src_tree_title name:cms_treemenu
-// frame file:var:frame_src_tree name:cms_tree scrolling:auto
-// frame file:var:frame_src_background
-// frame file:var:frame_src_main name:cms_main
-// frame file:var:frame_src_background
-// frame file:var:frame_src_background
- -
\ No newline at end of file
+ frameset columns:25%,*
+ frameset rows:{menuheight},*
+ frame file:var:frame_src_tree_title name:cms_treemenu
+ frame file:var:frame_src_tree name:cms_tree scrolling:auto
+ frame file:var:frame_src_main name:cms_main
+ frame file:var:frame_src_border
+ frame file:var:frame_src_background
+
diff --git a/themes/default/templates/main/show.tpl.src.php b/themes/default/templates/main/show.tpl.src.php
@@ -1,6 +1,10 @@
frameset-page
-# frameset rows:3,54,*,3
- frameset rows:54,*
+ if true:config:interface/application_mode
+ set var:menuheight value:24
+ else
+ set var:menuheight value:54
+# frameset rows:3,{menuheight},*,3
+ frameset rows:{menuheight},*
# frame file:frame_src_border
frame file:var:frame_src_main_menu name:cms_main_menu
frame file:var:frame_src_main_main name:cms_main_main scrolling:auto
diff --git a/themes/default/templates/mainmenu/show.tpl.src.php b/themes/default/templates/mainmenu/show.tpl.src.php
@@ -1,26 +1,27 @@
page
table padding:5 space:0 width:100% rowclasses:a,b columnclasses:a,b
-
- row
- cell class:menu
- image type:var:type
-
- list list:path extract:true value:xy
-
- link url:var:url title:var:title class:path target:cms_main
- text value:var:name maxlength:20
- char type:filesep
- text text:var:text title:var:text class:title
- cell class:menu style::text-align:right;
- form action:search subaction:quicksearch target:cms_main_main
- input class:search name:search size:15
-// button class:searchbutton type:ok src:search
- if true:config:search/quicksearch/show_button
- button class:searchbutton type:ok text:search
-// list list:windowIcons extract:true
-// link url:var:url target:_top
-// image type:var:type align:middle
+ if true:!config:interface/application_mode
+ row
+ cell class:menu
+ image type:var:type
+
+ list list:path extract:true value:xy
+
+ link url:var:url title:var:title class:path target:cms_main
+ text value:var:name maxlength:20
+ char type:filesep
+
+ text text:var:text title:var:text class:title
+ cell class:menu style::text-align:right;
+ form action:search subaction:quicksearch target:cms_main_main
+ input class:search name:search size:15
+ // button class:searchbutton type:ok src:search
+ if true:config:search/quicksearch/show_button
+ button class:searchbutton type:ok text:search
+ // list list:windowIcons extract:true
+ // link url:var:url target:_top
+ // image type:var:type align:middle
row
cell class:subaction colspan:2
diff --git a/themes/default/templates/treetitle/show.tpl.src.php b/themes/default/templates/treetitle/show.tpl.src.php
@@ -1,17 +1,18 @@
page
table padding:5 space:0 width:100%
-
- row
- cell class:menu
- image type:var:type
-
- list list:path extract:true value:xy
- #image type:icon
- link url:var:url title:title class:path target:cms_main
- text var:name maxlength:20
- char type:filesep
- text text:var:text title:var:text class:title
+ if true:!config:interface/application_mode
+ row
+ cell class:menu
+ image type:var:type
+
+ list list:path extract:true value:xy
+ #image type:icon
+ link url:var:url title:title class:path target:cms_main
+ text var:name maxlength:20
+ char type:filesep
+
+ text text:var:text title:var:text class:title
row
# Menüleiste
cell class:subaction