Revision: 12535
http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=12535&view=rev
Author: kink
Date: 2007-07-14 10:56:47 -0700 (Sat, 14 Jul 2007)
Log Message:
-----------
use PAGE_NAME in themes and templates
Modified Paths:
--------------
trunk/squirrelmail/templates/default_advanced/page_header.tpl
trunk/squirrelmail/themes/darkness.php
Modified: trunk/squirrelmail/templates/default_advanced/page_header.tpl
===================================================================
--- trunk/squirrelmail/templates/default_advanced/page_header.tpl
2007-07-14 17:45:20 UTC (rev 12534)
+++ trunk/squirrelmail/templates/default_advanced/page_header.tpl
2007-07-14 17:56:47 UTC (rev 12535)
@@ -64,10 +64,10 @@
<?php
/** if preview pane turned on, do not show menubar above message */
- global $data_dir, $username, $PHP_SELF, $pp_skip_menubar;
+ global $data_dir, $username, $pp_skip_menubar;
$use_previewPane = getPref($data_dir, $username, 'use_previewPane', 0);
$show_preview_pane = checkForJavascript() && $use_previewPane;
- $current_page_is_read_body = (strpos($PHP_SELF, '/read_body.php') !==
FALSE);
+ $current_page_is_read_body = (defined('PAGE_NAME') && 'PAGE_NAME' ==
'read_body');
if (!$pp_skip_menubar && (!$current_page_is_read_body ||
!$show_preview_pane)) {
// Note: If we want to hide menubar on compose screen, we could do the
following,
// but the compose screen when in the message list frame should not have the
menubar
@@ -75,7 +75,7 @@
// and then use document.write() to output the menubar if needed... and we'll
// leave that for some other time
//- if (!$pp_skip_menubar && (!$current_page_is_read_body ||
!$show_preview_pane)) {
-//+ $current_page_is_compose = (strpos($PHP_SELF, '/compose.php') !== FALSE);
+//+ $current_page_is_compose = (defined('PAGE_NAME') && 'PAGE_NAME' ==
'compose');
//+ if (!$pp_skip_menubar
//+ && ((!$current_page_is_read_body && !$current_page_is_compose)
//+ || !$show_preview_pane)) {
@@ -144,7 +144,6 @@
if ($show_preview_pane
&& getPref($data_dir, $username, 'previewPane_autohide', 0) == 1)
{
- global $PHP_SELF;
$previewPane_vertical_split = getPref($data_dir, $username,
'previewPane_vertical_split', 0);
if ($previewPane_vertical_split)
$orientation = 'cols';
@@ -152,7 +151,7 @@
$orientation = 'rows';
// spit out javascript to maximize compose frame
- if (strpos($PHP_SELF, '/compose.php') !== FALSE)
+ if (defined('PAGE_NAME') && PAGE_NAME=='compose')
{
?>
var first_frame = 0;
@@ -180,16 +179,15 @@
}
<?php
- // not on the compose screen, either hide or restore preview pane
- } else {
+ // not on the compose screen, either hide or restore preview pane
+ } else {
- $previewPane_size = getPref($data_dir, $username, 'previewPane_size',
300);
- if (strpos($PHP_SELF, '/right_main.php') !== FALSE
- || strpos($PHP_SELF, '/search.php') !== FALSE)
+ $previewPane_size = getPref($data_dir, $username, 'previewPane_size',
300);
+ if (defined('PAGE_NAME') &&
(PAGE_NAME=='right_main'||PAGE_NAME=='search')) {
$new_size = $previewPane_size;
- else
+ } else {
$new_size = 0;
-
+ }
?>
if (self.name == 'right')
{
Modified: trunk/squirrelmail/themes/darkness.php
===================================================================
--- trunk/squirrelmail/themes/darkness.php 2007-07-14 17:45:20 UTC (rev
12534)
+++ trunk/squirrelmail/themes/darkness.php 2007-07-14 17:56:47 UTC (rev
12535)
@@ -42,9 +42,8 @@
// Always tremble background
// This might make people go insane. Yes! *Victory dance!*
function Darkness_HeaderPlugin() {
- global $PHP_SELF;
- if (substr($PHP_SELF, -18) == '/src/left_main.php') {
+ if (defined('PAGE_NAME') && PAGE_NAME=='left_main') {
echo '<meta http-equiv="Page-Enter" content="' .
'blendTrans(Duration=2.0)" />' . "\n";
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
|