From a052584cc70efbcb86c8f592b9e053a2faea2a8c Mon Sep 17 00:00:00 2001 From: jengo Date: Mon, 11 Dec 2000 09:18:09 +0000 Subject: [PATCH] Added in feature from frames. Admins can allow, disable or force them system wide. If they are allowed, there is a user preference for it. --- doc/CHANGELOG | 2 ++ index.php | 23 +++++++++++++++++++++-- preferences/settings.php | 27 ++++++++++++++++++++++++--- setup/config.php | 13 +++++++++++++ 4 files changed, 60 insertions(+), 5 deletions(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index f446811122..c2e3791b06 100755 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -23,6 +23,8 @@ - Applied patch to fix md5 en/decryption. Thanks milosch - Fixed login message not showing up. + - Added in feature for frames. This can be a user preference, or a global option + for the admin to disable, allow, or force. [0.9.7] - Fixed SQL error in tts - Fixed table locking in admin -> edit account diff --git a/index.php b/index.php index 2e566147d4..736289d152 100755 --- a/index.php +++ b/index.php @@ -24,14 +24,33 @@ include("header.inc.php"); // Note: I need to add checks to make sure these apps are installed. + if (($phpgw_info["user"]["preferences"]["common"]["useframes"] && $phpgw_info["server"]["useframes"] == "allowed") + || ($phpgw_info["server"]["useframes"] == "always")) { + + if (! $navbarframe && ! $framebody) { + $tpl = new Template($phpgw_info["server"]["template_dir"]); + $tpl->set_file(array("frames" => "frames.tpl")); + + $tpl->set_var("navbar_link",$phpgw->link("index.php?navbarframe=True")); + $tpl->set_var("body_link",$phpgw->link("index.php?framebody=True")); + + $tpl->pparse("out","frames"); + } + if ($navbarframe) { + $phpgw->common->phpgw_header(); + $phpgw->common->navbar(); + } + } else { + $phpgw->common->phpgw_header(); + $phpgw->common->navbar(); + } + if ($cd=="yes" && $phpgw_info["user"]["preferences"]["common"]["default_app"] && $phpgw_info["user"]["apps"][$phpgw_info["user"]["preferences"]["common"]["default_app"]]) { $phpgw->redirect($phpgw->link($phpgw_info["server"]["webserver_url"] . "/" . $phpgw_info["user"]["preferences"]["common"]["default_app"] . "/")); exit; } - $phpgw->common->phpgw_header(); - $phpgw->common->navbar(); $phpgw->common->read_preferences("addressbook"); $phpgw->common->read_preferences("email"); diff --git a/preferences/settings.php b/preferences/settings.php index 77256ce7ce..55dc7ff036 100755 --- a/preferences/settings.php +++ b/preferences/settings.php @@ -20,9 +20,11 @@ include("../header.inc.php"); if (! $submit) { - + if ($phpgw_info["server"]["useframes"] == "allowed") { + $target = ' target="_top"'; + } ?> -
"> + "> @@ -42,6 +44,20 @@ + + + + + + + + + + + + + + +
:
: + > +
: @@ -178,6 +194,7 @@ common->phpgw_footer(); } else { $phpgw->preferences->preferences_delete("byappnotheme",$phpgw_info["user"]["account_id"],"common"); @@ -196,7 +213,11 @@ $phpgw->db->unlock(); + if ($settings["useframes"]) { + Header("Location: " . $phpgw->link($phpgw_info["server"]["webserver_url"] . "/index.php")); + exit; + } + Header("Location: " . $phpgw->link("index.php")); } - $phpgw->common->phpgw_footer(); ?> diff --git a/setup/config.php b/setup/config.php index 44dfe33ae8..3c1fb0dcf3 100644 --- a/setup/config.php +++ b/setup/config.php @@ -287,6 +287,19 @@
Frame support: + +
Use pure HTML compliant code (not fully working yet):