Header and footer per themes (RFE #984152), config.{header,footer}.inc.php files are now optional.

This commit is contained in:
Michal Čihař
2005-11-25 08:37:54 +00:00
parent dc536cef69
commit ab9aef8977
10 changed files with 51 additions and 38 deletions

View File

@@ -6,8 +6,13 @@ $Id$
$Source$
2005-11-25 Michal Čihař <michal@cihar.com>
* libraries/common.lib.php, libraries/footer.inc.php,
libraries/header.inc.php: Header and footer per themes (RFE #984152).
* Documentation.html, config.footer.inc.php(deleted),
config.header.inc.php(deleted), libraries/common.lib.php,
libraries/footer.inc.php, libraries/footer_custom.inc.php,
libraries/header.inc.php, libraries/header_custom.inc.php,
libraries/auth/cookie.auth.lib.php, libraries/auth/http.auth.lib.php:
Header and footer per themes (RFE #984152),
config.{header,footer}.inc.php files are now optional.
* libraries/select_lang.lib.php: Fix undefined indexes.
2005-11-24 Marc Delisle <lem9@users.sourceforge.net>

View File

@@ -390,7 +390,7 @@ GRANT SELECT, INSERT, UPDATE, DELETE ON &lt;pma_db&gt;.* TO 'pma'@'localhost';
<br /><br />
The parameters which relate to design (like colors)
are placed in <tt>themes/themename/layout.inc.php</tt>. You
might also want to modify <i>config.footer.inc.php</i> and
might also want to create <i>config.footer.inc.php</i> and
<i>config.header.inc.php</i> files to add your site specific code to be
included on start and end of each page.
</p>
@@ -2899,6 +2899,8 @@ RewriteRule ^([a-zA-Z0-9_]+)$ index.php?db=$1 [R]
<li>edit <tt>layout.inc.php</tt> in &quot;your_theme_name&quot;</li>
<li>edit <tt>info.inc.php</tt> in &quot;your_theme_name&quot; to
contain your chosen theme name, that will be visible in user interface</li>
<li>optionally you can add header.inc.php and footer.inc.php files
that will be included in header and footer of each page</li>
<li>make a new screenshot of your theme and save it under &quot;your_theme_name/screen.png&quot;</li>
</ul>
<br />

View File

@@ -1,6 +0,0 @@
<?php
/**
* In this file you may add PHP or HTML statements that will be used to define
* the footer for phpMyAdmin pages.
*/
?>

View File

@@ -1,6 +0,0 @@
<?php
/**
* In this file you may add PHP or HTML statements that will be used to define
* the header for phpMyAdmin pages.
*/
?>

View File

@@ -122,7 +122,7 @@ if (top != self) {
<body class="loginform">
<?php include('./config.header.inc.php'); ?>
<?php require('./libraries/header_custom.inc.php'); ?>
<a href="http://www.phpmyadmin.net" target="_blank" class="logo"><?php
$logo_image = $GLOBALS['pmaThemeImage'] . 'logo_right.png';
@@ -163,7 +163,7 @@ echo sprintf( $GLOBALS['strWelcome'],
<?php echo $GLOBALS['strSecretRequired']; ?>
</div>
<?php
include('./config.footer.inc.php');
require('./libraries/footer_custom.inc.php');
echo ' </body>' . "\n"
. '</html>';
exit();
@@ -246,7 +246,7 @@ if (uname.value == '') {
//-->
</script>
<?php include('./config.footer.inc.php'); ?>
<?php require('./libraries/footer_custom.inc.php'); ?>
</body>

View File

@@ -33,7 +33,7 @@ function PMA_auth() {
?>
</head>
<body>
<?php include('./config.header.inc.php'); ?>
<?php require('./libraries/header_custom.inc.php'); ?>
<br /><br />
<center>
@@ -42,7 +42,7 @@ function PMA_auth() {
<br />
<div class="warning"><?php echo $GLOBALS['strWrongUser']; ?></div>
<?php include('./config.footer.inc.php'); ?>
<?php require('./libraries/footer_custom.inc.php'); ?>
</body>
</html>

View File

@@ -89,15 +89,8 @@ if ( isset( $GLOBALS['userlink'] ) && $GLOBALS['userlink'] ) {
@PMA_DBI_close( $GLOBALS['userlink'] );
}
// Include site footer
if (file_exists('./config.footer.inc.php')) {
require('./config.footer.inc.php');
}
// Include theme footer
if (file_exists($pmaThemePath . 'footer.inc.php')) {
require($pmaThemePath . 'footer.inc.php');
}
// Include possible custom footers
require_once('./libraries/footer_custom.inc.php');
/**
* Generates profiling data if requested

View File

@@ -0,0 +1,16 @@
<?php
/* $Id$ */
// vim: expandtab sw=4 ts=4 sts=4:
// This file includes all custom footers if they exist.
// Include site footer
if (file_exists('./config.footer.inc.php')) {
require('./config.footer.inc.php');
}
// Include theme footer
if (file_exists($GLOBALS['pmaThemePath'] . 'footer.inc.php')) {
require($GLOBALS['pmaThemePath'] . 'footer.inc.php');
}
?>

View File

@@ -126,15 +126,8 @@ if (empty($GLOBALS['is_header_sent'])) {
<div id="TooltipContainer" onmouseover="holdTooltip();" onmouseout="swapTooltip('default');"></div>
<?php
// Include theme header
if (file_exists($pmaThemePath . 'header.inc.php')) {
require($pmaThemePath . 'header.inc.php');
}
// Include site header
if (file_exists('./config.header.inc.php')) {
require('./config.header.inc.php');
}
// Include possible custom headers
require_once('./libraries/header_custom.inc.php');
if (!defined('PMA_DISPLAY_HEADING')) {
define('PMA_DISPLAY_HEADING', 1);

View File

@@ -0,0 +1,16 @@
<?php
/* $Id$ */
// vim: expandtab sw=4 ts=4 sts=4:
// This file includes all custom headers if they exist.
// Include theme header
if (file_exists($GLOBALS['pmaThemePath'] . 'header.inc.php')) {
require($GLOBALS['pmaThemePath'] . 'header.inc.php');
}
// Include site header
if (file_exists('./config.header.inc.php')) {
require('./config.header.inc.php');
}
?>