didou Fri Jan 23 09:58:40 2004 EDT
Added files:
/livedocs/themes/default html_format.php livedoc.css
/livedocs/themes/php.net TODO html_format.php livedoc.css
Modified files:
/livedocs common.php config.php.in configure.in error.php
livedoc-index.php livedoc.php search.php
Log:
New feature introduced : Themes
- created livedocs/themes/
- backuped the current layout in the 'default' theme
- created a theme entry for 'php.net' so that our webmasters can start playing with
it
- hacked .configure.in :
* no more --with-css-stylesheet option (it's now the livedoc.css file of the
choosen theme)
* new option --with-theme : should be the name of a directory with all the required
files inside the main themes directory
This will be sustituted in config.php.in under the constant THEME_NAME
This option will default to "default", the original skin by Ilia, Derick and Wez
* WS so that ./configure --help looks nicer
* don't link (ls -sf) to the deprecated css file no more
* link the whole themes directory into the output dir, this will allow having a
multiple skins environnement (if needed)
- moved all the HTML footers and headers to a theme specific file : html_format.php
And more :
- initialized the LANGUAGES constant in config.php so that we know what languages we
have built.
http://cvs.php.net/diff.php/livedocs/common.php?r1=1.4&r2=1.5&ty=u
Index: livedocs/common.php
diff -u livedocs/common.php:1.4 livedocs/common.php:1.5
--- livedocs/common.php:1.4 Mon Jan 12 18:04:30 2004
+++ livedocs/common.php Fri Jan 23 09:58:38 2004
@@ -18,7 +18,7 @@
// | Common PHP header, with some basic settings |
// +----------------------------------------------------------------------+
//
-// $Id: common.php,v 1.4 2004/01/12 23:04:30 didou Exp $
+// $Id: common.php,v 1.5 2004/01/23 14:58:38 didou Exp $
error_reporting(E_ALL);
ini_set('display_errors', '1');
@@ -35,7 +35,7 @@
include './config.php';
$save_url = false;
-$css_url = WEBBASE . CSSURL;
+$css_url = WEBBASE . 'themes/' . THEME_NAME . '/livedoc.css';
if (!isset($_GET['l'])) {
// if we are dealing with path info URL check for language
http://cvs.php.net/diff.php/livedocs/config.php.in?r1=1.3&r2=1.4&ty=u
Index: livedocs/config.php.in
diff -u livedocs/config.php.in:1.3 livedocs/config.php.in:1.4
--- livedocs/config.php.in:1.3 Wed Jun 18 18:18:38 2003
+++ livedocs/config.php.in Fri Jan 23 09:58:38 2004
@@ -1,4 +1,4 @@
-<?php # $Id: config.php.in,v 1.3 2003/06/18 22:18:38 wez Exp $
+<?php # $Id: config.php.in,v 1.4 2004/01/23 14:58:38 didou Exp $
/* Config file for the livedocs */
define('FALLBACK_LANG', 'en');
@@ -6,8 +6,9 @@
define('LIVEDOCS', '@LIVEDOCS@');
define('OUTPUTDIR', '@OUTPUTDIR@');
define('FORCE_DYNAMIC', @FORCE_DYNAMIC@);
-define('CSSURL', '@CSSURL@');
define('WEBBASE', '@WEBBASE@');
define('GENDIR', '@GENDIR@');
+define('LANGUAGES', '@LANGUAGES@');
+define('THEME_NAME', '@THEMENAME@');
?>
http://cvs.php.net/diff.php/livedocs/configure.in?r1=1.13&r2=1.14&ty=u
Index: livedocs/configure.in
diff -u livedocs/configure.in:1.13 livedocs/configure.in:1.14
--- livedocs/configure.in:1.13 Sat Jan 17 06:36:35 2004
+++ livedocs/configure.in Fri Jan 23 09:58:38 2004
@@ -1,5 +1,5 @@
## A configure script
-## $Id: configure.in,v 1.13 2004/01/17 11:36:35 nlopess Exp $
+## $Id: configure.in,v 1.14 2004/01/23 14:58:38 didou Exp $
AC_PREREQ(2.13)
AC_INIT(livedoc.css)
@@ -51,6 +51,10 @@
[BUILDLOG="$withval"],
[BUILDLOG="/var/log/livedocs-index"])
+AC_ARG_WITH(theme,[ --with-theme[=THEME_NAME] Theme name [default=default]],
+ [THEMENAME="$withval"],
+ [THEMENAME="default"])
+
AC_ARG_WITH(docs,[ --with-docs[=DIR] PHP Doc location
[default=/dat/dev/php/phpdoc-all]],
[PHPDOC="$withval"],
[PHPDOC="/dat/dev/php/phpdoc-all"])
@@ -76,15 +80,11 @@
],[FORCE_DYNAMIC=1])
-AC_ARG_WITH(css-stylesheet,[ --with-css-stylesheet[=URL] CSS file location
[default=livedoc.css]],
- [CSSURL="$withval"],
- [CSSURL="livedoc.css"])
-
AC_ARG_WITH(web-base,[ --with-web-base[=DIR] Relative URL for livedocs
links [default=/]],
[WEBBASE="$withval"],
[WEBBASE="/"])
-AC_ARG_WITH(build-dir,[ --with-build-dir=DIR Dir in which to build index
[default=/tmp]],
+AC_ARG_WITH(build-dir,[ --with-build-dir=DIR Dir in which to build index
[default=/tmp]],
[GENDIR="$withval"],
[GENDIR="/tmp"])
@@ -93,7 +93,7 @@
AC_SUBST(LIVEDOCS)
AC_SUBST(OUTPUTDIR)
AC_SUBST(LANGUAGES)
-AC_SUBST(CSSURL)
+AC_SUBST(THEMENAME)
AC_SUBST(FORCE_DYNAMIC)
AC_SUBST(WEBBASE)
AC_SUBST(GENDIR)
@@ -111,7 +111,7 @@
ln -sf $LIVEDOCS/style_mapping.php $OUTPUTDIR/style_mapping.php
ln -sf $LIVEDOCS/xml_classes.php $OUTPUTDIR/xml_classes.php
ln -sf $LIVEDOCS/search.php $OUTPUTDIR/search.php
- ln -sf $LIVEDOCS/livedoc.css $OUTPUTDIR/livedoc.css
+ ln -sf $LIVEDOCS/themes $OUTPUTDIR/themes
echo ""
echo "You have configured livedocs so that links are relative to
http://yourserver$WEBBASE"
echo "$OUTPUTDIR is assumed to be the dir that is displayed by your webserver for
that URL"
http://cvs.php.net/diff.php/livedocs/error.php?r1=1.3&r2=1.4&ty=u
Index: livedocs/error.php
diff -u livedocs/error.php:1.3 livedocs/error.php:1.4
--- livedocs/error.php:1.3 Thu Jan 22 11:13:31 2004
+++ livedocs/error.php Fri Jan 23 09:58:38 2004
@@ -18,7 +18,7 @@
// | Handles the 404 error and try to redirect to the good place. |
// +----------------------------------------------------------------------+
//
-// $Id: error.php,v 1.3 2004/01/22 16:13:31 nlopess Exp $
+// $Id: error.php,v 1.4 2004/01/23 14:58:38 didou Exp $
if (!empty($_SERVER['REDIRECT_URL'])) {
// This is the requested page that caused the error
@@ -49,26 +49,8 @@
$db_m = sqlite_array_query($idx, "SELECT path FROM searchi WHERE
skey='" . sqlite_escape_string($lookup_name) . "' AND prio=5 LIMIT 10", SQLITE_NUM);
$rs_size = count($db_m);
$fpath = WEBBASE . $lang . '/';
- echo <<<FUNC_HEAD
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html lang="$lang">
-<head>
-<title>$title</title>
-<link rel="stylesheet" href="$css_url" />
-</head>
-<body>
-<table border="0" cellpadding="0" cellspacing="0" width="100%">
-<tr>
-<td height="1"></td>
-<td rowspan="2" valign="top">
-<h2 class="title">Possible Matches</h2>
-<p class="simpara">
-Unfortunately your query was not specific enough to determine the exact function you
were trying to find. The
-following $rs_size functions represent the closest possible matches to your query.
-</p>
-<p class="simpara">
-FUNC_HEAD;
+
+ echo error_page_header();
foreach($db_m as $v) {
if (($p = strrpos($v[0], '.')) !== FALSE) {
@@ -82,17 +64,8 @@
FUNC_MATCH;
}
- echo <<<FUNC_FOOT
-</p>
-<div class='footer'>$filename $file_revision | generated: $date</div>
-</td></tr>
-<tr><td valign="top">
-$nav
-</td></tr></table>
-</body>
-</html>
-FUNC_FOOT;
-
+
+ echo error_page_footer();
exit;
}
}
http://cvs.php.net/diff.php/livedocs/livedoc-index.php?r1=1.5&r2=1.6&ty=u
Index: livedocs/livedoc-index.php
diff -u livedocs/livedoc-index.php:1.5 livedocs/livedoc-index.php:1.6
--- livedocs/livedoc-index.php:1.5 Fri Jan 23 07:38:15 2004
+++ livedocs/livedoc-index.php Fri Jan 23 09:58:38 2004
@@ -18,21 +18,9 @@
// | Livedocs index |
// +----------------------------------------------------------------------+
//
-// $Id: livedoc-index.php,v 1.5 2004/01/23 12:38:15 didou Exp $
+// $Id: livedoc-index.php,v 1.6 2004/01/23 14:58:38 didou Exp $
-echo <<<HEAD
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
-<title>Livedocs Index</title>
-<link rel="stylesheet" href="$css_url" >
-</head>
-<body>
-<h1>Index</h1>
-
-<div class='index'>
-HEAD;
+echo index_page_header();
$alphabet = range('a', 'z');
foreach ($alphabet as $char) {
@@ -66,11 +54,7 @@
}
$date = date("d-m-Y H:i:s");
-echo <<<FOOT
-<br />generated: $date<br />
-</body>
-</html>
-FOOT;
+echo index_page_footer();
function sqlite_starts_with($title, $char) {
$title = strtolower($title);
http://cvs.php.net/diff.php/livedocs/livedoc.php?r1=1.78&r2=1.79&ty=u
Index: livedocs/livedoc.php
diff -u livedocs/livedoc.php:1.78 livedocs/livedoc.php:1.79
--- livedocs/livedoc.php:1.78 Fri Jan 23 04:40:23 2004
+++ livedocs/livedoc.php Fri Jan 23 09:58:38 2004
@@ -18,12 +18,13 @@
// | Generate an HTML version of a phpdoc/docbook page on the fly |
// +----------------------------------------------------------------------+
//
-// $Id: livedoc.php,v 1.78 2004/01/23 09:40:23 didou Exp $
+// $Id: livedoc.php,v 1.79 2004/01/23 14:58:38 didou Exp $
define('LIVEDOC_SOURCE', dirname(__FILE__));
include LIVEDOC_SOURCE . '/common.php';
include LIVEDOC_SOURCE . '/xml_classes.php';
include LIVEDOC_SOURCE . '/style_mapping.php';
+include LIVEDOC_SOURCE . '/themes/' . THEME_NAME . '/html_format.php';
if (!isset($_GET['q'])) {
// Handles the 404. If a matching page is found, we redirect to it.
@@ -93,18 +94,7 @@
ob_start();
}
-echo <<<HEAD
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html lang="$lang">
-<head>
-<title>$title</title>
-<link rel="stylesheet" href="$css_url" />
-</head>
-<body>
-<table border="0" cellpadding="0" cellspacing="0" width="100%">
-<tr><td height="1"></td><td rowspan="2" valign="top">
-HEAD;
+echo manual_page_header();
if ($special_content) {
echo call_user_func($aliases[$current_page]);
@@ -116,16 +106,8 @@
if (empty($file_revision)) {
$file_revision = 'unknown revision';
}
-echo <<<FOOT
-<br />
-<div class='footer'>$filename $file_revision | generated: $date</div>
-</td></tr>
-<tr><td valign="top">
-$nav
-</td></tr></table>
-</body>
-</html>
-FOOT;
+
+echo manual_page_footer();
/*****************************************************************************
* Saving the generated page to the cache
http://cvs.php.net/diff.php/livedocs/search.php?r1=1.5&r2=1.6&ty=u
Index: livedocs/search.php
diff -u livedocs/search.php:1.5 livedocs/search.php:1.6
--- livedocs/search.php:1.5 Fri Jan 23 04:40:23 2004
+++ livedocs/search.php Fri Jan 23 09:58:38 2004
@@ -18,9 +18,12 @@
// | Search page |
// +----------------------------------------------------------------------+
//
-// $Id: search.php,v 1.5 2004/01/23 09:40:23 didou Exp $
+// $Id: search.php,v 1.6 2004/01/23 14:58:38 didou Exp $
+define('LIVEDOC_SOURCE', dirname(__FILE__));
include './common.php';
+include LIVEDOC_SOURCE . '/themes/' . THEME_NAME . '/html_format.php';
+
/* number of results per page */
define('RESULT_PER_PAGE', 10);
@@ -126,20 +129,9 @@
} else {
$tx_qry = $strict = '';
}
-?>
-<html>
- <head>
- <link rel="stylesheet" href="<?php echo $css_url; ?>">
- </head>
-<body>
-<div align="center">
- <form action="search.php" method="get">
- <input type="text" width="30" name="q" value="<?php echo $tx_qry; ?>">
- Strict: <input type="checkbox" value="1" name="s" <?php echo $strict; ?>>
- <input type="submit" name="search" value="Search">
- </form>
-</div>
-<?php
+
+echo search_page_header();
+
echo $res_str;
/* if we have more then 1 page worth of results, let's draw a pager */
@@ -159,6 +151,7 @@
}
echo "]<br /></span>";
}
+
+echo search_page_footer();
+
?>
-</body>
-</html>
http://cvs.php.net/co.php/livedocs/themes/default/html_format.php?r=1.1&p=1
Index: livedocs/themes/default/html_format.php
+++ livedocs/themes/default/html_format.php
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// | PHP version 4 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2004 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | [EMAIL PROTECTED] so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Authors: Wez Furlong, Derick Rethans, Ilia Alshanetsky |
// +----------------------------------------------------------------------+
// | headers and footers for the HTML rendering |
// +----------------------------------------------------------------------+
//
// $Id: html_format.php
// in livedoc.php
function manual_page_header()
{
global $lang, $title, $css_url;
$head =<<<HEAD
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="$lang">
<head>
<title>$title</title>
<link rel="stylesheet" href="$css_url" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td height="1"></td><td rowspan="2" valign="top">
HEAD;
return $head;
}
function manual_page_footer()
{
global $filename, $file_revision, $date, $nav;
$foot =<<<FOOT
<br />
<div class='footer'>$filename $file_revision | generated: $date</div>
</td></tr>
<tr><td valign="top">
$nav
</td></tr></table>
</body>
</html>
FOOT;
return $foot;
}
// in search.php
function search_page_header()
{
global $css_url, $tx_qry, $strict;
$head =<<<HEAD
<html>
<head>
<link rel="stylesheet" href="$css_url">
</head>
<body>
<div align="center">
<form action="search.php" method="get">
<input type="text" width="30" name="q" value="$tx_qry">
Strict: <input type="checkbox" value="1" name="s" echo $strict>
<input type="submit" name="search" value="Search">
</form>
</div>
HEAD;
return $head;
}
function search_page_footer()
{
$foot =<<<FOOT
</body>
</html>
FOOT;
return $foot;
}
// in livedoc-index.php
function index_page_header()
{
global $css_url;
$head =<<<HEAD
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Livedocs Index</title>
<link rel="stylesheet" href="$css_url" >
</head>
<body>
<h1>Index</h1>
<div class='index'>
HEAD;
return $head;
}
function index_page_footer()
{
global $date;
$foot =<<<FOOT
<br />generated: $date<br />
</body>
</html>
FOOT;
return $foot;
}
// in error.php
function error_page_header()
{
global $lang, $css_url, $title, $rs_size;
$head =<<<HEAD
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="$lang">
<head>
<title>$title</title>
<link rel="stylesheet" href="$css_url" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td height="1"></td>
<td rowspan="2" valign="top">
<h2 class="title">Possible Matches</h2>
<p class="simpara">
Unfortunately your query was not specific enough to determine the exact function you
were trying to find. The
following $rs_size functions represent the closest possible matches to your query.
</p>
<p class="simpara">
HEAD;
return $head;
}
function error_page_footer()
{
global $filename, $file_revision, $date;
$foot = <<<FOOT
</p>
<div class='footer'>$filename $file_revision | generated: $date</div>
</td></tr>
<tr><td valign="top">
$nav
</td></tr></table>
</body>
</html>
FOOT;
return $foot;
}
http://cvs.php.net/co.php/livedocs/themes/default/livedoc.css?r=1.1&p=1
Index: livedocs/themes/default/livedoc.css
+++ livedocs/themes/default/livedoc.css
/* $Id: */
body {
font-family: verdana;
font-size: 11pt;
}
h2.refpurpose {
font-size: 1.4em;
}
h2.funcref {
margin-left: 2em;
margin-top: 0em;
margin-bottom: 0.1em;
font-size: 1em;
}
div.author, h4.author {
margin-top: 0px;
margin-bottom: 2px;
}
p.simpara, div.para {
margin: 1em;
}
a.function, span.function,
a.classname, span.classname,
a.signalname, span.signalname,
a.enumname, span.enumname {
font-weight: bold;
white-space: nowrap;
color: blue;
}
div.methodsynopsis span.varname {
color: tomato;
}
span.filename, span.userinput, span.varname,
span.systemitem, span.command,
span.option, span.envar, span.replaceable {
font-family: Courier New, monospace;
white-space: nowrap;
}
span.methodparam {
white-space: nowrap;
}
div.lscode {
background: Black;
border: solid 2px #666666;
color: #dddddd;
font-family: Lucida Console, Courier New, monospace;
white-space: pre;
padding: 0.6em;
margin: 0.2em;
}
span.parameter, span.literal {
font-family: Courier New, monospace;
}
div.tip {
background-color: #eeeeff;
border: solid 2px #ddddff;
padding: 0.2em;
margin: 0.6em;
}
div.note {
background-color: #eeeeff;
border: solid 2px #ccccff;
padding: 0.2em;
margin: 0.6em;
}
div.warning {
background-color: #ffeeee;
border: solid 2px #ff7777;
padding: 0.2em;
margin: 0.6em;
}
div.bookinfo {
text-align: center;
}
div.legalnotice {
text-align: left;
font-size: 9px;
background-color: #eeffee;
border: solid 1px #77ff77;
padding: 0.2em;
margin: 3em;
}
span.warning_title {
color: #f00; /* This is real foodoo ;) */
font-weight: bold;
}
div.caution {
background-color: #ffdddd;
border: solid 2px #ffcccc;
padding: 0.2em;
margin: 0.6em;
}
div.pubdate {
margin-top: 0.6em;
margin-bottom: 0.6em;
}
div.question {
font-weight: bold;
}
div.answer {
margin-left: 2em;
}
div.copyright {
margin-top: 0.6em;
margin-bottom: 0.6em;
}
div.grouptranslators {
margin-top: 0.6em;
margin-bottom: 0.6em;
}
span.type {
color: green;
font-family: Courier New, monospace;
font-weight: bolder;
}
div.example, div.informalexample {
margin: 0.6em;
}
div.example div.title {
margin-bottom: 0.6em;
font-weight: bolder;
}
div.shellcode, div.xmlcode, div.phpcode,
div.inicode, div.htmlcode, div.screen,
div.apache-confcode, div.code, div.term,
div.synopsis {
background-color: #eeeeee;
border: solid 2px #dddddd;
padding: 0.6em;
margin: 0.6em;
font-size: 10pt;
}
div.shellcode, div.xmlcode, div.inicode,
div.htmlcode, div.screen, div.apache-confcode,
div.code, div.synopsis {
white-space: pre;
font-family: Courier New, monospace;
}
span.computeroutput {
font-family: Courier New, monospace;
color: #008;
}
div.footer {
font-size: 7pt;
}
table.table, table.informaltable {
border: solid 2px #cccccc;
border-collapse: collapse;
margin: 1em;
width: 600px;
}
table.table caption, table.informaltable caption {
font-size: 11pt;
font-weight: bold;
padding-bottom: 0.5em;
}
table.table thead tr, table.informaltable thead tr {
background-color: #eeeeff;
}
table.table thead tr th, table.informaltable thead tr th {
padding: 0.3em;
border: solid 2px #cccccc;
font-size: 11pt;
}
table.table tbody tr td, table.informaltable tbody tr td {
border: solid 2px #eeeeee;
padding: 0.3em;
font-size: 10pt;
vertical-align: top;
}
table.nav {
background-color: #ffdddd;
border: solid 1px #aaf;
margin: 0.6em;
}
td.up {
font-size: 8pt;
background-color: #aaf;
padding-left: 0.5em;
padding-right: 0.5em;
font-weight: bold;
}
td.down {
font-size: 8pt;
background-color: #ccf;
padding-left: 0.5em;
padding-right: 0.5em;
}
td.downdown {
font-size: 8pt;
background-color: #eef;
padding-left: 0.5em;
padding-right: 0.5em;
}
a.nav:link, a.nav:visited {
color: #223;
}
a.up, a.up:link, a.up:visited, a.down, a.down:link,
a.down:visited, a.downdown, a.downdown:link,
a.downdown:visited {
color: black;
line-height: 14px;
}
div.fuxxor {
color: red;
}
div.legalnotice {
margin-top: 20px;
}
/* Take away margins from paragraphs in list items; the list item
* sets appropriate padding */
ul.itemizedlist li.listitem p.simpara,
ul.itemizedlist li.listitem div.para {
margin: 0.2em;
}
/* syntax highlighting for PHP code */
/*
div.phpcode code {
white-space: pre;
}
*/
div.phpcode span.html {
color: black;
}
div.phpcode span.comment {
color: #FF8000;
}
div.phpcode span.default {
color: #0000BB;
}
div.phpcode span.keyword {
color: #007700;
}
div.phpcode span.string {
color: #DD0000;
}
span.subscript {
vertical-align: sub;
}
/* OO stuff */
div.classsynopsis div.classcontents {
padding-left: 2em;
}
div.classmeta div.classparent {
padding-left: 2em;
}
div.classmeta div.shortdesc {
font-weight: bold;
}
/* Search page */
hr.search {
border: none;
border-top: 1px dashed blue;
width: 30em;
}
http://cvs.php.net/co.php/livedocs/themes/php.net/TODO?r=1.1&p=1
Index: livedocs/themes/php.net/TODO
+++ livedocs/themes/php.net/TODO
- Customize the CSS and HTML to make it look like php.net
http://cvs.php.net/co.php/livedocs/themes/php.net/html_format.php?r=1.1&p=1
Index: livedocs/themes/php.net/html_format.php
+++ livedocs/themes/php.net/html_format.php
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// | PHP version 4 |
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2004 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | [EMAIL PROTECTED] so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Authors: Wez Furlong, Derick Rethans, Ilia Alshanetsky |
// +----------------------------------------------------------------------+
// | headers and footers for the HTML rendering |
// +----------------------------------------------------------------------+
//
// $Id: html_format.php
// in livedoc.php
function manual_page_header()
{
global $lang, $title, $css_url;
$head =<<<HEAD
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="$lang">
<head>
<title>$title</title>
<link rel="stylesheet" href="$css_url" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td height="1"></td><td rowspan="2" valign="top">
HEAD;
return $head;
}
function manual_page_footer()
{
global $filename, $file_revision, $date, $nav;
$foot =<<<FOOT
<br />
<div class='footer'>$filename $file_revision | generated: $date</div>
</td></tr>
<tr><td valign="top">
$nav
</td></tr></table>
</body>
</html>
FOOT;
return $foot;
}
// in search.php
function search_page_header()
{
global $css_url, $tx_qry, $strict;
$head =<<<HEAD
<html>
<head>
<link rel="stylesheet" href="$css_url">
</head>
<body>
<div align="center">
<form action="search.php" method="get">
<input type="text" width="30" name="q" value="$tx_qry">
Strict: <input type="checkbox" value="1" name="s" echo $strict>
<input type="submit" name="search" value="Search">
</form>
</div>
HEAD;
return $head;
}
function search_page_footer()
{
$foot =<<<FOOT
</body>
</html>
FOOT;
return $foot;
}
// in livedoc-index.php
function index_page_header()
{
global $css_url;
$head =<<<HEAD
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Livedocs Index</title>
<link rel="stylesheet" href="$css_url" >
</head>
<body>
<h1>Index</h1>
<div class='index'>
HEAD;
return $head;
}
function index_page_footer()
{
global $date;
$foot =<<<FOOT
<br />generated: $date<br />
</body>
</html>
FOOT;
return $foot;
}
// in error.php
function error_page_header()
{
global $lang, $css_url, $title, $rs_size;
$head =<<<HEAD
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="$lang">
<head>
<title>$title</title>
<link rel="stylesheet" href="$css_url" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td height="1"></td>
<td rowspan="2" valign="top">
<h2 class="title">Possible Matches</h2>
<p class="simpara">
Unfortunately your query was not specific enough to determine the exact function you
were trying to find. The
following $rs_size functions represent the closest possible matches to your query.
</p>
<p class="simpara">
HEAD;
return $head;
}
function error_page_footer()
{
global $filename, $file_revision, $date;
$foot = <<<FOOT
</p>
<div class='footer'>$filename $file_revision | generated: $date</div>
</td></tr>
<tr><td valign="top">
$nav
</td></tr></table>
</body>
</html>
FOOT;
return $foot;
}
http://cvs.php.net/co.php/livedocs/themes/php.net/livedoc.css?r=1.1&p=1
Index: livedocs/themes/php.net/livedoc.css
+++ livedocs/themes/php.net/livedoc.css
/* $Id: */
body {
font-family: verdana;
font-size: 11pt;
}
h2.refpurpose {
font-size: 1.4em;
}
h2.funcref {
margin-left: 2em;
margin-top: 0em;
margin-bottom: 0.1em;
font-size: 1em;
}
div.author, h4.author {
margin-top: 0px;
margin-bottom: 2px;
}
p.simpara, div.para {
margin: 1em;
}
a.function, span.function,
a.classname, span.classname,
a.signalname, span.signalname,
a.enumname, span.enumname {
font-weight: bold;
white-space: nowrap;
color: blue;
}
div.methodsynopsis span.varname {
color: tomato;
}
span.filename, span.userinput, span.varname,
span.systemitem, span.command,
span.option, span.envar, span.replaceable {
font-family: Courier New, monospace;
white-space: nowrap;
}
span.methodparam {
white-space: nowrap;
}
div.lscode {
background: Black;
border: solid 2px #666666;
color: #dddddd;
font-family: Lucida Console, Courier New, monospace;
white-space: pre;
padding: 0.6em;
margin: 0.2em;
}
span.parameter, span.literal {
font-family: Courier New, monospace;
}
div.tip {
background-color: #eeeeff;
border: solid 2px #ddddff;
padding: 0.2em;
margin: 0.6em;
}
div.note {
background-color: #eeeeff;
border: solid 2px #ccccff;
padding: 0.2em;
margin: 0.6em;
}
div.warning {
background-color: #ffeeee;
border: solid 2px #ff7777;
padding: 0.2em;
margin: 0.6em;
}
div.bookinfo {
text-align: center;
}
div.legalnotice {
text-align: left;
font-size: 9px;
background-color: #eeffee;
border: solid 1px #77ff77;
padding: 0.2em;
margin: 3em;
}
span.warning_title {
color: #f00; /* This is real foodoo ;) */
font-weight: bold;
}
div.caution {
background-color: #ffdddd;
border: solid 2px #ffcccc;
padding: 0.2em;
margin: 0.6em;
}
div.pubdate {
margin-top: 0.6em;
margin-bottom: 0.6em;
}
div.question {
font-weight: bold;
}
div.answer {
margin-left: 2em;
}
div.copyright {
margin-top: 0.6em;
margin-bottom: 0.6em;
}
div.grouptranslators {
margin-top: 0.6em;
margin-bottom: 0.6em;
}
span.type {
color: green;
font-family: Courier New, monospace;
font-weight: bolder;
}
div.example, div.informalexample {
margin: 0.6em;
}
div.example div.title {
margin-bottom: 0.6em;
font-weight: bolder;
}
div.shellcode, div.xmlcode, div.phpcode,
div.inicode, div.htmlcode, div.screen,
div.apache-confcode, div.code, div.term,
div.synopsis {
background-color: #eeeeee;
border: solid 2px #dddddd;
padding: 0.6em;
margin: 0.6em;
font-size: 10pt;
}
div.shellcode, div.xmlcode, div.inicode,
div.htmlcode, div.screen, div.apache-confcode,
div.code, div.synopsis {
white-space: pre;
font-family: Courier New, monospace;
}
span.computeroutput {
font-family: Courier New, monospace;
color: #008;
}
div.footer {
font-size: 7pt;
}
table.table, table.informaltable {
border: solid 2px #cccccc;
border-collapse: collapse;
margin: 1em;
width: 600px;
}
table.table caption, table.informaltable caption {
font-size: 11pt;
font-weight: bold;
padding-bottom: 0.5em;
}
table.table thead tr, table.informaltable thead tr {
background-color: #eeeeff;
}
table.table thead tr th, table.informaltable thead tr th {
padding: 0.3em;
border: solid 2px #cccccc;
font-size: 11pt;
}
table.table tbody tr td, table.informaltable tbody tr td {
border: solid 2px #eeeeee;
padding: 0.3em;
font-size: 10pt;
vertical-align: top;
}
table.nav {
background-color: #ffdddd;
border: solid 1px #aaf;
margin: 0.6em;
}
td.up {
font-size: 8pt;
background-color: #aaf;
padding-left: 0.5em;
padding-right: 0.5em;
font-weight: bold;
}
td.down {
font-size: 8pt;
background-color: #ccf;
padding-left: 0.5em;
padding-right: 0.5em;
}
td.downdown {
font-size: 8pt;
background-color: #eef;
padding-left: 0.5em;
padding-right: 0.5em;
}
a.nav:link, a.nav:visited {
color: #223;
}
a.up, a.up:link, a.up:visited, a.down, a.down:link,
a.down:visited, a.downdown, a.downdown:link,
a.downdown:visited {
color: black;
line-height: 14px;
}
div.fuxxor {
color: red;
}
div.legalnotice {
margin-top: 20px;
}
/* Take away margins from paragraphs in list items; the list item
* sets appropriate padding */
ul.itemizedlist li.listitem p.simpara,
ul.itemizedlist li.listitem div.para {
margin: 0.2em;
}
/* syntax highlighting for PHP code */
/*
div.phpcode code {
white-space: pre;
}
*/
div.phpcode span.html {
color: black;
}
div.phpcode span.comment {
color: #FF8000;
}
div.phpcode span.default {
color: #0000BB;
}
div.phpcode span.keyword {
color: #007700;
}
div.phpcode span.string {
color: #DD0000;
}
span.subscript {
vertical-align: sub;
}
/* OO stuff */
div.classsynopsis div.classcontents {
padding-left: 2em;
}
div.classmeta div.classparent {
padding-left: 2em;
}
div.classmeta div.shortdesc {
font-weight: bold;
}
/* Search page */
hr.search {
border: none;
border-top: 1px dashed blue;
width: 30em;
}