cvs: docweb /include docweb_language.class.php docweb_template.class.php init.inc.php lib_general.inc.php /templates README /templates/all/www
home.tpl.php /templates/all/www/shared footer.tpl.php header.tpl.php nav_languages.tpl.php nav_links.tpl.php nav_projects.tpl.php /www index.php
| From: | Sean Coates | Date: | Wed, 27 Oct 2004 16:43:01 +0000 |
| Subject: | cvs: docweb /include docweb_language.class.php docweb_template.class.php init.inc.php lib_general.inc.php /templates README /templates/all/www home.tpl.php /templates/all/www/shared footer.tpl.php header.tpl.php nav_languages.tpl.php nav_links.tpl.php nav_projects.tpl.php /www index.php |
||
| Groups: | php.doc.web | ||
| Request: | Send a blank email to doc-web+get-355@lists.php.net to get a copy of this message | ||
sean Wed Oct 27 12:43:01 2004 EDT
Added files:
/docweb/include docweb_language.class.php docweb_template.class.php
/docweb/templates README
/docweb/templates/all/www home.tpl.php
/docweb/templates/all/www/shared footer.tpl.php header.tpl.php
nav_languages.tpl.php
nav_links.tpl.php
nav_projects.tpl.php
Modified files:
/docweb/include init.inc.php lib_general.inc.php
/docweb/www index.php
Log:
Initial template & language engines
http://cvs.php.net/diff.php/docweb/include/init.inc.php?r1=1.1&r2=1.2&ty=u Index: docweb/include/init.inc.php diff -u docweb/include/init.inc.php:1.1 docweb/include/init.inc.php:1.2 --- docweb/include/init.inc.php:1.1 Fri Sep 24 13:32:19 2004 +++ docweb/include/init.inc.php Wed Oct 27 12:43:01 2004 @@ -18,11 +18,12 @@ | Gabor Hojtsy <goba@php.net> | | Sean Coates <sean@php.net> | +----------------------------------------------------------------------+ -$Id: init.inc.php,v 1.1 2004/09/24 17:32:19 sean Exp $ +$Id: init.inc.php,v 1.2 2004/10/27 16:43:01 sean Exp $ */ error_reporting(E_ALL); +// paths define('PATH_ROOT', realpath(dirname(__FILE__) . '/../')); define('SQLITE_DIR', PATH_ROOT . '/sqlite/'); define('CVS_DIR', PATH_ROOT . '/cvs/'); @@ -31,8 +32,10 @@ require_once('lib_proj_lang.inc.php'); // get defaults -list($defaultProject) = array_keys($PROJECTS); -list($defaultLanguage) = array_keys($LANGUAGES); +list($defaultProject) = array_keys($PROJECTS); +list($defaultLanguage) = array_keys($LANGUAGES); +$defaultFallbackProject = 'www'; +$defaultFallbackLanguage = 'en'; // set up constants (use defaults if necessary) define('SITE', isset($project) ? $project : $defaultProject); @@ -55,6 +58,18 @@ // actually define the constant (trim off any trailing slashes): define('BASE_URL', rtrim($baseURL, '/')); +// general support library require_once('lib_general.inc.php'); -?> + +// language & template constants +define('DOCWEB_ENTITIY_PREFIX', 'docweb'); + +// language engine +require_once('docweb_language.class.php'); +$Language =& new DocWeb_Language(LANGC); + +// template engine +require_once('docweb_template.class.php'); + +?> \ No newline at end of file http://cvs.php.net/diff.php/docweb/include/lib_general.inc.php?r1=1.27&r2=1.28&ty=u Index: docweb/include/lib_general.inc.php diff -u docweb/include/lib_general.inc.php:1.27 docweb/include/lib_general.inc.php:1.28 --- docweb/include/lib_general.inc.php:1.27 Fri Sep 24 13:32:19 2004 +++ docweb/include/lib_general.inc.php Wed Oct 27 12:43:01 2004 @@ -18,7 +18,7 @@ | Gabor Hojtsy <goba@php.net> | | Sean Coates <sean@php.net> | +----------------------------------------------------------------------+ -$Id: lib_general.inc.php,v 1.27 2004/09/24 17:32:19 sean Exp $ +$Id: lib_general.inc.php,v 1.28 2004/10/27 16:43:01 sean Exp $ */ function is_translation($project, $language) @@ -42,8 +42,8 @@ define('IN_HEAD', true); $lang = 'en'; //LANGC; $encoding = "iso-8859-1"; // for now - $page_title = ($title ? $title . ' - PHP Documentation Tools' : 'PHP Documentation Tools'); - $page_h1 = ($title ? $title : 'PHP Documentation Tools'); + $page_title = ($title ? $GLOBALS['Language']->get($title) . ' - ' : '') . $GLOBALS['Language']->get('docweb.common.title.default'); + $page_h1 = ($title ? $GLOBALS['Language']->get($title) : $GLOBALS['Language']->get('docweb.common.title.default')); $languages = site_nav_langs(); $projects = site_nav_projects(); @@ -58,100 +58,50 @@ $extra_style = ''; // prevent errors $guess_style = (in_array(SITE, array('www', 'livedocs', 'pecl')) ? '' : SITE . '.css'); - $styles = ($style ? array($style) : array($guess_style)); - foreach ($styles as $style_file) { - if (!empty($style_file)) { - $extra_style .= '@import url(/style/'. $style_file .");\n"; - } - } + $styles = array_filter(($style ? array($style) : array($guess_style))); // Set proper encoding with HTTP header first header("Content-type: text/html; charset=$encoding"); - $buff = <<<END_OF_BUFFER -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="$lang" lang="$lang"> -<head> - <title>$page_title</title> - <meta http-equiv="Content-Type" content="text/html; charset=$encoding" /> - <meta http-equiv="Content-Script-Type" content="text/javascript" /> - <meta http-equiv="Content-Style-Type" content="text/css" /> - <meta http-equiv="Content-Language" content="$lang" /> - <link rel="shortcut icon" href="/images/favicon/{$project}/favicon.ico" /> - <style type="text/css">@import url(/style/site.css); - $extra_style</style> - -</head> -<body> - <div id="header"> - <h1>$page_h1</h1> - <div id="logos"> - {$projects} - </div> - </div> - <div id="langs"> - {$languages} - </div> - <div id="page"> - <div id="sidebar"> - <div class="sidebox"> - <dl> - <dt>Currently focused on</dt> - <dd>{$projdisplay} | {$langdisplay}</dd> - <dt>Insite contextual navigation</dt> - <dd>{$locallinks}</dd> - <dt>Offsite contextual navigation</dt> - <dd>{$extlinks}</dd> - </dl> - </div> - </div> -END_OF_BUFFER; - return $buff; + return DocWeb_Template::get( + 'shared/header.tpl.php', + array( + 'encoding' => $encoding, + 'lang' => $lang, + 'project' => $project, + 'page_h1' => $page_h1, + 'styles' => $styles, + 'projects' => $projects, + 'languages' => $languages, + 'projdisplay' => $projdisplay, + 'langdisplay' => $langdisplay, + 'locallinks' => $locallinks, + 'extlinks' => $extlinks, + 'page_title' => $page_title, + ) + ); } function site_nav_projects() { - return ' - <a href="' . get_insite_address('www') . '" class="logo logo-all">All</a> - <a href="' . get_insite_address('php') . '" class="logo logo-php">PHP</a> - <a href="' . get_insite_address('pear') . '" class="logo logo-pear">PEAR</a> - <a href="' . get_insite_address('pecl') . '" class="logo logo-pecl">PECL</a> - <a href="' . get_insite_address('gtk') . '" class="logo logo-gtk">PHP-<span class="logo-g">G</span><span class="logo-t">T</span><span class="logo-k">K</span></a> - <a href="' . get_insite_address('smarty') . '" class="logo logo-smarty">Smarty</a> - <a href="' . get_insite_address('livedocs') . '" class="logo logo-livedocs">Livedocs</a>'; + return DocWeb_Template::get('shared/nav_projects.tpl.php'); } function site_nav_langs() { - $navlist = ''; - foreach ($GLOBALS['LANGUAGES'] as $code => $name) { - if ($code == 'all') { - $navlist .= '<a href="' . get_insite_address(NULL, 'all') . '">All</a> '."\n"; - } - else { - $navlist .= '<a href="' . get_insite_address(NULL, $code) . '" title="' . $name . '" ><img src="/images/flags/' . $code . '.png" alt="' . $name . '" /></a>'."\n"; - } - } - return $navlist; + return DocWeb_Template::get( + 'shared/nav_languages.tpl.php', + array('languages' => $GLOBALS['LANGUAGES']) + ); } function site_footer() { $master = get_insite_address(NULL, NULL, ''); - $buff = <<<END_OF_BUFFER - </div> - <div id="footer"> - <p> - <a href="{$master}copyright.php">Copyright</a> 2004 The PHP Documentation Teams - All rights reserved. - </p> - <p> - <a href="{$master}credits.php">Credits</a> | <a href="{$master}contact.php">Contact</a> - </p> - </div> -</body> -</html> -END_OF_BUFFER; - return $buff; + return DocWeb_Template::get( + 'shared/footer.tpl.php', + array('master' => $master) + ); } // Format email address for spam protection @@ -238,21 +188,23 @@ // particular page the user is viewing currently function site_nav_provider() { - $links = array('<a href="'. BASE_URL .'/">Subsite homepage</a>'); - $links[] = '<a href="'. BASE_URL .'/rfc/rfc-overview.php">Request For Comments</a>'; + $links = array( + 'subsite-homepage' => BASE_URL .'/', + 'request-for-comments' => BASE_URL .'/rfc/rfc-overview.php', + ); if (strpos($_SERVER['REQUEST_URI'], 'rfc') !== false) { - $links[] = '<a href="'. BASE_URL .'/rfc/rfc-proposal-edit.php">Submit RFC</a>'; + $links['submit-rfc'] = BASE_URL .'/rfc/rfc-proposal-edit.php'; } if (in_array(SITE, array('gtk', 'pear', 'php', 'smarty'))) { - $links[] = '<a href="'. BASE_URL .'/revcheck.php">Revision check</a>'; + $links['rev-check'] = BASE_URL .'/revcheck.php'; } if (SITE == 'php') { - $links[] = '<a href="'. BASE_URL .'/dochowto/index.php">Documentation Howto</a>'; + $links['doc-howto'] = BASE_URL .'/dochowto/index.php'; } - if (count($links) == 0) { - $links[] = 'N/A'; - } - return implode("<br />", $links); + return DocWeb_Template::get( + 'shared/nav_links.tpl.php', + array('links' => $links, 'Language' => &$GLOBALS['Language']) + ); } // This function provides the relevant offsite navigation options for the @@ -264,18 +216,17 @@ case 'php': switch (LANGC) { case 'hu': - $links[] = '<a href="http://wfsz.njszt.hu/projektek_phpdoc.php">Translation information</a>'; + $links['translation-info'] = 'http://wfsz.njszt.hu/projektek_phpdoc.php'; break; case 'it': - $links[] = '<a href="http://cortesi.com/php/">Translation information</a>'; + $links['translation-info'] = 'http://cortesi.com/php/'; break; } break; } - - if (count($links) == 0) { - $links[] = 'N/A'; - } - return implode("<br />", $links); + return DocWeb_Template::get( + 'shared/nav_links.tpl.php', + array('links' => $links, 'Language' => &$GLOBALS['Language']) + ); } ?> http://cvs.php.net/diff.php/docweb/www/index.php?r1=1.3&r2=1.4&ty=u Index: docweb/www/index.php diff -u docweb/www/index.php:1.3 docweb/www/index.php:1.4 --- docweb/www/index.php:1.3 Fri Sep 24 13:32:19 2004 +++ docweb/www/index.php Wed Oct 27 12:43:01 2004 @@ -1,35 +1,9 @@ <?php -/* $Id: index.php,v 1.3 2004/09/24 17:32:19 sean Exp $ */ +/* $Id: index.php,v 1.4 2004/10/27 16:43:01 sean Exp $ */ include_once '../include/init.inc.php'; -echo site_header('Welcome!'); -?> -<h2>What is this site?</h2> -<p> - There are different documentation teams operating somewhat independently on PHP.net - subprojects. Only a few people are involved in more than one documentation project - currently, and that limits the know-how sharing, which would otherwise be possible - and desirable. All of the documentation teams use an early fork of the original - PHP manual build system. These systems evolved independently, and took over some - improvements from the others on an occasional basis (the PEAR documentation team uses - a variant of the revcheck developed for phpdoc for example). This site is aimed at - getting documentation efforts closer, and provide more tools and information for - manual authors and translators. -</p> - -<h2>Join us!</h2> - -<p> - The developers of PHP extensions all have access to the PHP documentation modules, - although the different projects have different policies of accepting contributions. - You are welcome to join our efforts! Authoring documentation for an extension is - the second best thing to implementing the extension itself if you are interested - in the capabilities, features and usage possibilities even in extreme conditions. - We also have translated versions of the different manuals, and most of the translation - teams are always in need of more helping hands. In case you are interested, you should - contact the relevant mailing lists. The projects and translations have separate - mailing lists. -</p> -<?php + +echo site_header('docweb.common.header.welcome'); +echo DocWeb_Template::get('home.tpl.php'); echo site_footer(); http://cvs.php.net/co.php/docweb/include/docweb_language.class.php?r=1.1&p=1 Index: docweb/include/docweb_language.class.php +++ docweb/include/docweb_language.class.php <?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +----------------------------------------------------------------------+ | PHP Documentation Tools Site Source Code | +----------------------------------------------------------------------+ | 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 | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Sean Coates <sean@php.net> | +----------------------------------------------------------------------+ $Id: docweb_language.class.php,v 1.1 2004/10/27 16:43:01 sean Exp $ */ /** * PHP DocWeb - Language Class * * Simple language class. Allows for very simple i18n of DocWeb content * Gets data from [cvs]phpdoc-all * * @package docweb * @since 2004.09.25 * @author Sean Coates <sean@php.net> */ class DocWeb_Language { var $lang; var $defaultEntities = array(); var $nativeEntities = array(); var $entities = array(); /** * Constructor -- (old school (wrapper)) */ function DocWeb_Language($lang) { return $this->__construct($lang); } /** * Constructor -- sets the language */ function __construct($lang) { // verify $lang if (in_array($lang, array_keys($GLOBALS['LANGUAGES']))) { // get default text $this->defaultEntities = $this->getTextData($GLOBALS['defaultFallbackLanguage']); // fixate default language ('all' isn't a language) // and get native entities (if applicable) if ($lang == $GLOBALS['defaultLanguage']) { $this->lang = $GLOBALS['defaultFallbackLanguage']; $this->nativeEntities =& $this->defaultEntities; } else { $this->lang = $lang; $this->nativeEntities = $this->getTextData($this->lang); } // now, merge the default and native arrays, to form a full set $this->entities = array_merge($this->defaultEntities, $this->nativeEntities); } else { trigger_error("Invalid language ('$lang');\n", E_USER_ERROR); } } /** * Gets entity data from cvs:phpdoc-all/$lang/docweb/main.ent * * @param string $lang language to 'get' * @return array native language texts */ function getTextData($lang=FALSE) { // use class default, if $lang is not provided if (!$lang) { $lang = $this->lang; } // use this file: $entFile = PATH_ROOT . "/cvs/phpdoc-all/$lang/docweb/main.ent"; if (is_readable($entFile)) { // file is good; get its contents $entData = file_get_contents($entFile); // find entities in the file $entMatchRegex = '/<!ENTITY ('. preg_quote(DOCWEB_ENTITIY_PREFIX) .'\..*?) ([\'"])(.*?)(\2)>/s'; preg_match_all($entMatchRegex, $entData, $matches); // init local entities variable $entities = array(); // loop through matches, creating entities dataset foreach ($matches[0] as $index => $val) { $entities[$matches[1][$index]] = $matches[3][$index]; } return $entities; } else { // entities file not found // return empty array, to allow default return array(); } } /** * Gives a single entity's text * * @param string $ent Entity to get * @return mixed text associated with $ent, or FALSE on failure (not present) */ function get($ent) { if ($this->entities) { return isset($this->entities[$ent]) ? $this->entities[$ent] : FALSE; } else { return FALSE; } } } ?> http://cvs.php.net/co.php/docweb/include/docweb_template.class.php?r=1.1&p=1 Index: docweb/include/docweb_template.class.php +++ docweb/include/docweb_template.class.php <?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +----------------------------------------------------------------------+ | PHP Documentation Tools Site Source Code | +----------------------------------------------------------------------+ | 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 | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Sean Coates <sean@php.net> | +----------------------------------------------------------------------+ $Id: docweb_template.class.php,v 1.1 2004/10/27 16:43:01 sean Exp $ */ /** * PHP DocWeb - Templating Class * * This is a very simple templating system, if we decide to go with one of * the more "mature" template engines, down the road, this can be used as * a wrapper to maintain BC. Please see docweb/templates/README for the rules. * * @package docweb * @since 2004.09.25 * @author Sean Coates <sean@php.net> */ class DocWeb_Template { var $rendered = FALSE; var $params = array(); var $language; /** * BC constructor * * @param string $filename template file * @see DocWeb_Template::__construct() */ function DocWeb_Template($filename) { return $this->__construct($filename); } /** * Template constructor * * Use DocWeb_Template::factory(...) to instanciate this object * * @param string $filename template file */ function __construct($filename) { $this->filename = $filename; return TRUE; } /** * Template Factory * * Safely instanciates DocWeb_Template object * Encapsulates external data (project, lang & defaults) * * @param string $template template (file) name * @return mixed DocWeb_Template object on success, FALSE on failure */ function factory($template) { // vars (become onject properties after instanciation) $language = LANGC; $project = SITE; $defaultLanguage = $GLOBALS['defaultLanguage']; $defaultProject = $GLOBALS['defaultProject']; // set up paths: $templateRoot = PATH_ROOT . '/templates'; // determine proper filename (fallback to defaults) if (is_readable("$templateRoot/$language/$project/$template")) { // specific (language:project) template exists, and is usable $filename = "$templateRoot/$language/$project/$template"; } elseif (is_readable("$templateRoot/$language/$defaultProject/$template")) { // semi-specific (language:default) template exists, use it $filename = "$templateRoot/$language/$defaultProject/$template"; } elseif (is_readable("$templateRoot/$defaultLanguage/$defaultProject/$template")) { // default template exists: $filename = "$templateRoot/$defaultLanguage/$defaultProject/$template"; } else { // can't find usable template trigger_error("No usable template ('$template');\n", E_USER_ERROR); return FALSE; } // template file is readable, instanciate class $Template =& new DocWeb_Template($filename); $Template->language = $language; return $Template; } /** * Renders template from file * * @return string rendered template (output) */ function render() { extract($this->params); ob_start(); require($this->filename); $tplOut = ob_get_contents(); ob_end_clean(); $this->output = $this->replace_entities($tplOut); $this->rendered = TRUE; return $this->output; } /** * Get a template * * Called statically * Convenience function to instanciate & render * * @param array $template template (file) name * @param array $params */ function get($template, $params=FALSE) { $Template =& DocWeb_Template::factory($template); if ($params) { $Template->params = $params; } return $Template->render(); } /** * For the given text, replace docweb entities with their appropriate values * * @param string $text text in which to replace entities * @return string text containing expanded entities */ function replace_entities($text) { $Language =& $GLOBALS['Language']; $entMatchRegex = '/&('. preg_quote(DOCWEB_ENTITIY_PREFIX) .'\..*?);/'; preg_match_all($entMatchRegex, $text, $matches); for ($i=0; $i<count($matches[0]); $i++) { if ($rep = $Language->get($matches[1][$i])) { $text = str_replace($matches[0][$i], $rep, $text); } } return $text; } } ?> http://cvs.php.net/co.php/docweb/templates/all/www/home.tpl.php?r=1.1&p=1 Index: docweb/templates/all/www/home.tpl.php +++ docweb/templates/all/www/home.tpl.php <h2>&docweb.home.header.what-is;</h2> <p> &docweb.home.text.what-is; </p> <h2>&docweb.home.header.join-us;</h2> <p> &docweb.home.text.join-us; </p> http://cvs.php.net/co.php/docweb/templates/all/www/shared/footer.tpl.php?r=1.1&p=1 Index: docweb/templates/all/www/shared/footer.tpl.php +++ docweb/templates/all/www/shared/footer.tpl.php </div> <div id="footer"> <p> <a href="<?=$master?>copyright.php">&docweb.common.footer.copyright;</a> 2004 &docweb.common.footer.copyright-text;. </p> <p> <a href="<?=$master?>credits.php">&docweb.common.footer.credits;</a> | <a href="<?=$master?>contact.php">&docweb.common.footer.contact;</a> </p> </div> </body> </html> http://cvs.php.net/co.php/docweb/templates/all/www/shared/header.tpl.php?r=1.1&p=1 Index: docweb/templates/all/www/shared/header.tpl.php +++ docweb/templates/all/www/shared/header.tpl.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="$lang" lang="$lang"> <head> <title><?=$page_title?></title> <meta http-equiv="Content-Type" content="text/html; charset=<?=$encoding?>" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Language" content="<?=$lang?>" /> <link rel="shortcut icon" href="/images/favicon/<?=$project?>/favicon.ico" /> <style type="text/css"> @import url(/style/site.css); <?php foreach ($styles as $style_file) { echo "@import url(/style/$style_file);\n"; } ?> </style> </head> <body> <div id="header"> <h1><?=$page_h1?></h1> <div id="logos"> <?=$projects?> </div> </div> <div id="langs"> <?=$languages?> </div> <div id="page"> <div id="sidebar"> <div class="sidebox"> <dl> <dt>&docweb.common.header.currently-focused;</dt> <dd><?=$projdisplay?> | <?=$langdisplay?></dd> <dt>&docweb.common.header.insite-context-nav;</dt> <dd><?=$locallinks?></dd> <dt>&docweb.common.header.insite-context-nav;</dt> <dd><?=$extlinks?></dd> </dl> </div> </div> http://cvs.php.net/co.php/docweb/templates/all/www/shared/nav_languages.tpl.php?r=1.1&p=1 Index: docweb/templates/all/www/shared/nav_languages.tpl.php +++ docweb/templates/all/www/shared/nav_languages.tpl.php <?php foreach ($languages as $code => $name) { if ($code == 'all') { echo '<a href="' . get_insite_address(NULL, 'all') . '">&docweb.common.all;</a> '."\n"; } else { // @@@ TODO: translate/entity names echo '<a href="' . get_insite_address(NULL, $code) . '" title="' . $name . '" ><img src="/images/flags/' . $code . '.png" alt="' . $name . '" /></a>'."\n"; } } ?> http://cvs.php.net/co.php/docweb/templates/all/www/shared/nav_links.tpl.php?r=1.1&p=1 Index: docweb/templates/all/www/shared/nav_links.tpl.php +++ docweb/templates/all/www/shared/nav_links.tpl.php <?php if ($links) { foreach ($links AS $linkName => $url) { echo '<a href="'. $url ."\">&docweb.common.linkname.$linkName;</a><br />\n"; } } else { echo "&docweb.common.n-a;<br />\n"; } ?> http://cvs.php.net/co.php/docweb/templates/all/www/shared/nav_projects.tpl.php?r=1.1&p=1 Index: docweb/templates/all/www/shared/nav_projects.tpl.php +++ docweb/templates/all/www/shared/nav_projects.tpl.php <a href="<?=get_insite_address('www')?>" class="logo logo-all">&docweb.common.all;</a> <a href="<?=get_insite_address('php')?>" class="logo logo-php">&docweb.common.project.php;</a> <a href="<?=get_insite_address('pear')?>" class="logo logo-pear">&docweb.common.project.pear;</a> <a href="<?=get_insite_address('pecl')?>" class="logo logo-pecl">&docweb.common.project.pecl;</a> <a href="<?=get_insite_address('gtk')?>" class="logo logo-gtk">&docweb.common.project.php-gtk;</a> <a href="<?=get_insite_address('smarty')?>" class="logo logo-smarty">&docweb.common.project.smarty;</a> <a href="<?=get_insite_address('livedocs')?>" class="logo logo-livedocs">&docweb.common.project.livedocs;</a>
http://cvs.php.net/diff.php/docweb/include/init.inc.php?r1=1.1&r2=1.2&ty=u Index: docweb/include/init.inc.php diff -u docweb/include/init.inc.php:1.1 docweb/include/init.inc.php:1.2 --- docweb/include/init.inc.php:1.1 Fri Sep 24 13:32:19 2004 +++ docweb/include/init.inc.php Wed Oct 27 12:43:01 2004 @@ -18,11 +18,12 @@ | Gabor Hojtsy <goba@php.net> | | Sean Coates <sean@php.net> | +----------------------------------------------------------------------+ -$Id: init.inc.php,v 1.1 2004/09/24 17:32:19 sean Exp $ +$Id: init.inc.php,v 1.2 2004/10/27 16:43:01 sean Exp $ */ error_reporting(E_ALL); +// paths define('PATH_ROOT', realpath(dirname(__FILE__) . '/../')); define('SQLITE_DIR', PATH_ROOT . '/sqlite/'); define('CVS_DIR', PATH_ROOT . '/cvs/'); @@ -31,8 +32,10 @@ require_once('lib_proj_lang.inc.php'); // get defaults -list($defaultProject) = array_keys($PROJECTS); -list($defaultLanguage) = array_keys($LANGUAGES); +list($defaultProject) = array_keys($PROJECTS); +list($defaultLanguage) = array_keys($LANGUAGES); +$defaultFallbackProject = 'www'; +$defaultFallbackLanguage = 'en'; // set up constants (use defaults if necessary) define('SITE', isset($project) ? $project : $defaultProject); @@ -55,6 +58,18 @@ // actually define the constant (trim off any trailing slashes): define('BASE_URL', rtrim($baseURL, '/')); +// general support library require_once('lib_general.inc.php'); -?> + +// language & template constants +define('DOCWEB_ENTITIY_PREFIX', 'docweb'); + +// language engine +require_once('docweb_language.class.php'); +$Language =& new DocWeb_Language(LANGC); + +// template engine +require_once('docweb_template.class.php'); + +?> \ No newline at end of file http://cvs.php.net/diff.php/docweb/include/lib_general.inc.php?r1=1.27&r2=1.28&ty=u Index: docweb/include/lib_general.inc.php diff -u docweb/include/lib_general.inc.php:1.27 docweb/include/lib_general.inc.php:1.28 --- docweb/include/lib_general.inc.php:1.27 Fri Sep 24 13:32:19 2004 +++ docweb/include/lib_general.inc.php Wed Oct 27 12:43:01 2004 @@ -18,7 +18,7 @@ | Gabor Hojtsy <goba@php.net> | | Sean Coates <sean@php.net> | +----------------------------------------------------------------------+ -$Id: lib_general.inc.php,v 1.27 2004/09/24 17:32:19 sean Exp $ +$Id: lib_general.inc.php,v 1.28 2004/10/27 16:43:01 sean Exp $ */ function is_translation($project, $language) @@ -42,8 +42,8 @@ define('IN_HEAD', true); $lang = 'en'; //LANGC; $encoding = "iso-8859-1"; // for now - $page_title = ($title ? $title . ' - PHP Documentation Tools' : 'PHP Documentation Tools'); - $page_h1 = ($title ? $title : 'PHP Documentation Tools'); + $page_title = ($title ? $GLOBALS['Language']->get($title) . ' - ' : '') . $GLOBALS['Language']->get('docweb.common.title.default'); + $page_h1 = ($title ? $GLOBALS['Language']->get($title) : $GLOBALS['Language']->get('docweb.common.title.default')); $languages = site_nav_langs(); $projects = site_nav_projects(); @@ -58,100 +58,50 @@ $extra_style = ''; // prevent errors $guess_style = (in_array(SITE, array('www', 'livedocs', 'pecl')) ? '' : SITE . '.css'); - $styles = ($style ? array($style) : array($guess_style)); - foreach ($styles as $style_file) { - if (!empty($style_file)) { - $extra_style .= '@import url(/style/'. $style_file .");\n"; - } - } + $styles = array_filter(($style ? array($style) : array($guess_style))); // Set proper encoding with HTTP header first header("Content-type: text/html; charset=$encoding"); - $buff = <<<END_OF_BUFFER -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="$lang" lang="$lang"> -<head> - <title>$page_title</title> - <meta http-equiv="Content-Type" content="text/html; charset=$encoding" /> - <meta http-equiv="Content-Script-Type" content="text/javascript" /> - <meta http-equiv="Content-Style-Type" content="text/css" /> - <meta http-equiv="Content-Language" content="$lang" /> - <link rel="shortcut icon" href="/images/favicon/{$project}/favicon.ico" /> - <style type="text/css">@import url(/style/site.css); - $extra_style</style> - -</head> -<body> - <div id="header"> - <h1>$page_h1</h1> - <div id="logos"> - {$projects} - </div> - </div> - <div id="langs"> - {$languages} - </div> - <div id="page"> - <div id="sidebar"> - <div class="sidebox"> - <dl> - <dt>Currently focused on</dt> - <dd>{$projdisplay} | {$langdisplay}</dd> - <dt>Insite contextual navigation</dt> - <dd>{$locallinks}</dd> - <dt>Offsite contextual navigation</dt> - <dd>{$extlinks}</dd> - </dl> - </div> - </div> -END_OF_BUFFER; - return $buff; + return DocWeb_Template::get( + 'shared/header.tpl.php', + array( + 'encoding' => $encoding, + 'lang' => $lang, + 'project' => $project, + 'page_h1' => $page_h1, + 'styles' => $styles, + 'projects' => $projects, + 'languages' => $languages, + 'projdisplay' => $projdisplay, + 'langdisplay' => $langdisplay, + 'locallinks' => $locallinks, + 'extlinks' => $extlinks, + 'page_title' => $page_title, + ) + ); } function site_nav_projects() { - return ' - <a href="' . get_insite_address('www') . '" class="logo logo-all">All</a> - <a href="' . get_insite_address('php') . '" class="logo logo-php">PHP</a> - <a href="' . get_insite_address('pear') . '" class="logo logo-pear">PEAR</a> - <a href="' . get_insite_address('pecl') . '" class="logo logo-pecl">PECL</a> - <a href="' . get_insite_address('gtk') . '" class="logo logo-gtk">PHP-<span class="logo-g">G</span><span class="logo-t">T</span><span class="logo-k">K</span></a> - <a href="' . get_insite_address('smarty') . '" class="logo logo-smarty">Smarty</a> - <a href="' . get_insite_address('livedocs') . '" class="logo logo-livedocs">Livedocs</a>'; + return DocWeb_Template::get('shared/nav_projects.tpl.php'); } function site_nav_langs() { - $navlist = ''; - foreach ($GLOBALS['LANGUAGES'] as $code => $name) { - if ($code == 'all') { - $navlist .= '<a href="' . get_insite_address(NULL, 'all') . '">All</a> '."\n"; - } - else { - $navlist .= '<a href="' . get_insite_address(NULL, $code) . '" title="' . $name . '" ><img src="/images/flags/' . $code . '.png" alt="' . $name . '" /></a>'."\n"; - } - } - return $navlist; + return DocWeb_Template::get( + 'shared/nav_languages.tpl.php', + array('languages' => $GLOBALS['LANGUAGES']) + ); } function site_footer() { $master = get_insite_address(NULL, NULL, ''); - $buff = <<<END_OF_BUFFER - </div> - <div id="footer"> - <p> - <a href="{$master}copyright.php">Copyright</a> 2004 The PHP Documentation Teams - All rights reserved. - </p> - <p> - <a href="{$master}credits.php">Credits</a> | <a href="{$master}contact.php">Contact</a> - </p> - </div> -</body> -</html> -END_OF_BUFFER; - return $buff; + return DocWeb_Template::get( + 'shared/footer.tpl.php', + array('master' => $master) + ); } // Format email address for spam protection @@ -238,21 +188,23 @@ // particular page the user is viewing currently function site_nav_provider() { - $links = array('<a href="'. BASE_URL .'/">Subsite homepage</a>'); - $links[] = '<a href="'. BASE_URL .'/rfc/rfc-overview.php">Request For Comments</a>'; + $links = array( + 'subsite-homepage' => BASE_URL .'/', + 'request-for-comments' => BASE_URL .'/rfc/rfc-overview.php', + ); if (strpos($_SERVER['REQUEST_URI'], 'rfc') !== false) { - $links[] = '<a href="'. BASE_URL .'/rfc/rfc-proposal-edit.php">Submit RFC</a>'; + $links['submit-rfc'] = BASE_URL .'/rfc/rfc-proposal-edit.php'; } if (in_array(SITE, array('gtk', 'pear', 'php', 'smarty'))) { - $links[] = '<a href="'. BASE_URL .'/revcheck.php">Revision check</a>'; + $links['rev-check'] = BASE_URL .'/revcheck.php'; } if (SITE == 'php') { - $links[] = '<a href="'. BASE_URL .'/dochowto/index.php">Documentation Howto</a>'; + $links['doc-howto'] = BASE_URL .'/dochowto/index.php'; } - if (count($links) == 0) { - $links[] = 'N/A'; - } - return implode("<br />", $links); + return DocWeb_Template::get( + 'shared/nav_links.tpl.php', + array('links' => $links, 'Language' => &$GLOBALS['Language']) + ); } // This function provides the relevant offsite navigation options for the @@ -264,18 +216,17 @@ case 'php': switch (LANGC) { case 'hu': - $links[] = '<a href="http://wfsz.njszt.hu/projektek_phpdoc.php">Translation information</a>'; + $links['translation-info'] = 'http://wfsz.njszt.hu/projektek_phpdoc.php'; break; case 'it': - $links[] = '<a href="http://cortesi.com/php/">Translation information</a>'; + $links['translation-info'] = 'http://cortesi.com/php/'; break; } break; } - - if (count($links) == 0) { - $links[] = 'N/A'; - } - return implode("<br />", $links); + return DocWeb_Template::get( + 'shared/nav_links.tpl.php', + array('links' => $links, 'Language' => &$GLOBALS['Language']) + ); } ?> http://cvs.php.net/diff.php/docweb/www/index.php?r1=1.3&r2=1.4&ty=u Index: docweb/www/index.php diff -u docweb/www/index.php:1.3 docweb/www/index.php:1.4 --- docweb/www/index.php:1.3 Fri Sep 24 13:32:19 2004 +++ docweb/www/index.php Wed Oct 27 12:43:01 2004 @@ -1,35 +1,9 @@ <?php -/* $Id: index.php,v 1.3 2004/09/24 17:32:19 sean Exp $ */ +/* $Id: index.php,v 1.4 2004/10/27 16:43:01 sean Exp $ */ include_once '../include/init.inc.php'; -echo site_header('Welcome!'); -?> -<h2>What is this site?</h2> -<p> - There are different documentation teams operating somewhat independently on PHP.net - subprojects. Only a few people are involved in more than one documentation project - currently, and that limits the know-how sharing, which would otherwise be possible - and desirable. All of the documentation teams use an early fork of the original - PHP manual build system. These systems evolved independently, and took over some - improvements from the others on an occasional basis (the PEAR documentation team uses - a variant of the revcheck developed for phpdoc for example). This site is aimed at - getting documentation efforts closer, and provide more tools and information for - manual authors and translators. -</p> - -<h2>Join us!</h2> - -<p> - The developers of PHP extensions all have access to the PHP documentation modules, - although the different projects have different policies of accepting contributions. - You are welcome to join our efforts! Authoring documentation for an extension is - the second best thing to implementing the extension itself if you are interested - in the capabilities, features and usage possibilities even in extreme conditions. - We also have translated versions of the different manuals, and most of the translation - teams are always in need of more helping hands. In case you are interested, you should - contact the relevant mailing lists. The projects and translations have separate - mailing lists. -</p> -<?php + +echo site_header('docweb.common.header.welcome'); +echo DocWeb_Template::get('home.tpl.php'); echo site_footer(); http://cvs.php.net/co.php/docweb/include/docweb_language.class.php?r=1.1&p=1 Index: docweb/include/docweb_language.class.php +++ docweb/include/docweb_language.class.php <?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +----------------------------------------------------------------------+ | PHP Documentation Tools Site Source Code | +----------------------------------------------------------------------+ | 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 | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Sean Coates <sean@php.net> | +----------------------------------------------------------------------+ $Id: docweb_language.class.php,v 1.1 2004/10/27 16:43:01 sean Exp $ */ /** * PHP DocWeb - Language Class * * Simple language class. Allows for very simple i18n of DocWeb content * Gets data from [cvs]phpdoc-all * * @package docweb * @since 2004.09.25 * @author Sean Coates <sean@php.net> */ class DocWeb_Language { var $lang; var $defaultEntities = array(); var $nativeEntities = array(); var $entities = array(); /** * Constructor -- (old school (wrapper)) */ function DocWeb_Language($lang) { return $this->__construct($lang); } /** * Constructor -- sets the language */ function __construct($lang) { // verify $lang if (in_array($lang, array_keys($GLOBALS['LANGUAGES']))) { // get default text $this->defaultEntities = $this->getTextData($GLOBALS['defaultFallbackLanguage']); // fixate default language ('all' isn't a language) // and get native entities (if applicable) if ($lang == $GLOBALS['defaultLanguage']) { $this->lang = $GLOBALS['defaultFallbackLanguage']; $this->nativeEntities =& $this->defaultEntities; } else { $this->lang = $lang; $this->nativeEntities = $this->getTextData($this->lang); } // now, merge the default and native arrays, to form a full set $this->entities = array_merge($this->defaultEntities, $this->nativeEntities); } else { trigger_error("Invalid language ('$lang');\n", E_USER_ERROR); } } /** * Gets entity data from cvs:phpdoc-all/$lang/docweb/main.ent * * @param string $lang language to 'get' * @return array native language texts */ function getTextData($lang=FALSE) { // use class default, if $lang is not provided if (!$lang) { $lang = $this->lang; } // use this file: $entFile = PATH_ROOT . "/cvs/phpdoc-all/$lang/docweb/main.ent"; if (is_readable($entFile)) { // file is good; get its contents $entData = file_get_contents($entFile); // find entities in the file $entMatchRegex = '/<!ENTITY ('. preg_quote(DOCWEB_ENTITIY_PREFIX) .'\..*?) ([\'"])(.*?)(\2)>/s'; preg_match_all($entMatchRegex, $entData, $matches); // init local entities variable $entities = array(); // loop through matches, creating entities dataset foreach ($matches[0] as $index => $val) { $entities[$matches[1][$index]] = $matches[3][$index]; } return $entities; } else { // entities file not found // return empty array, to allow default return array(); } } /** * Gives a single entity's text * * @param string $ent Entity to get * @return mixed text associated with $ent, or FALSE on failure (not present) */ function get($ent) { if ($this->entities) { return isset($this->entities[$ent]) ? $this->entities[$ent] : FALSE; } else { return FALSE; } } } ?> http://cvs.php.net/co.php/docweb/include/docweb_template.class.php?r=1.1&p=1 Index: docweb/include/docweb_template.class.php +++ docweb/include/docweb_template.class.php <?php /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: +----------------------------------------------------------------------+ | PHP Documentation Tools Site Source Code | +----------------------------------------------------------------------+ | 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 | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Sean Coates <sean@php.net> | +----------------------------------------------------------------------+ $Id: docweb_template.class.php,v 1.1 2004/10/27 16:43:01 sean Exp $ */ /** * PHP DocWeb - Templating Class * * This is a very simple templating system, if we decide to go with one of * the more "mature" template engines, down the road, this can be used as * a wrapper to maintain BC. Please see docweb/templates/README for the rules. * * @package docweb * @since 2004.09.25 * @author Sean Coates <sean@php.net> */ class DocWeb_Template { var $rendered = FALSE; var $params = array(); var $language; /** * BC constructor * * @param string $filename template file * @see DocWeb_Template::__construct() */ function DocWeb_Template($filename) { return $this->__construct($filename); } /** * Template constructor * * Use DocWeb_Template::factory(...) to instanciate this object * * @param string $filename template file */ function __construct($filename) { $this->filename = $filename; return TRUE; } /** * Template Factory * * Safely instanciates DocWeb_Template object * Encapsulates external data (project, lang & defaults) * * @param string $template template (file) name * @return mixed DocWeb_Template object on success, FALSE on failure */ function factory($template) { // vars (become onject properties after instanciation) $language = LANGC; $project = SITE; $defaultLanguage = $GLOBALS['defaultLanguage']; $defaultProject = $GLOBALS['defaultProject']; // set up paths: $templateRoot = PATH_ROOT . '/templates'; // determine proper filename (fallback to defaults) if (is_readable("$templateRoot/$language/$project/$template")) { // specific (language:project) template exists, and is usable $filename = "$templateRoot/$language/$project/$template"; } elseif (is_readable("$templateRoot/$language/$defaultProject/$template")) { // semi-specific (language:default) template exists, use it $filename = "$templateRoot/$language/$defaultProject/$template"; } elseif (is_readable("$templateRoot/$defaultLanguage/$defaultProject/$template")) { // default template exists: $filename = "$templateRoot/$defaultLanguage/$defaultProject/$template"; } else { // can't find usable template trigger_error("No usable template ('$template');\n", E_USER_ERROR); return FALSE; } // template file is readable, instanciate class $Template =& new DocWeb_Template($filename); $Template->language = $language; return $Template; } /** * Renders template from file * * @return string rendered template (output) */ function render() { extract($this->params); ob_start(); require($this->filename); $tplOut = ob_get_contents(); ob_end_clean(); $this->output = $this->replace_entities($tplOut); $this->rendered = TRUE; return $this->output; } /** * Get a template * * Called statically * Convenience function to instanciate & render * * @param array $template template (file) name * @param array $params */ function get($template, $params=FALSE) { $Template =& DocWeb_Template::factory($template); if ($params) { $Template->params = $params; } return $Template->render(); } /** * For the given text, replace docweb entities with their appropriate values * * @param string $text text in which to replace entities * @return string text containing expanded entities */ function replace_entities($text) { $Language =& $GLOBALS['Language']; $entMatchRegex = '/&('. preg_quote(DOCWEB_ENTITIY_PREFIX) .'\..*?);/'; preg_match_all($entMatchRegex, $text, $matches); for ($i=0; $i<count($matches[0]); $i++) { if ($rep = $Language->get($matches[1][$i])) { $text = str_replace($matches[0][$i], $rep, $text); } } return $text; } } ?> http://cvs.php.net/co.php/docweb/templates/all/www/home.tpl.php?r=1.1&p=1 Index: docweb/templates/all/www/home.tpl.php +++ docweb/templates/all/www/home.tpl.php <h2>&docweb.home.header.what-is;</h2> <p> &docweb.home.text.what-is; </p> <h2>&docweb.home.header.join-us;</h2> <p> &docweb.home.text.join-us; </p> http://cvs.php.net/co.php/docweb/templates/all/www/shared/footer.tpl.php?r=1.1&p=1 Index: docweb/templates/all/www/shared/footer.tpl.php +++ docweb/templates/all/www/shared/footer.tpl.php </div> <div id="footer"> <p> <a href="<?=$master?>copyright.php">&docweb.common.footer.copyright;</a> 2004 &docweb.common.footer.copyright-text;. </p> <p> <a href="<?=$master?>credits.php">&docweb.common.footer.credits;</a> | <a href="<?=$master?>contact.php">&docweb.common.footer.contact;</a> </p> </div> </body> </html> http://cvs.php.net/co.php/docweb/templates/all/www/shared/header.tpl.php?r=1.1&p=1 Index: docweb/templates/all/www/shared/header.tpl.php +++ docweb/templates/all/www/shared/header.tpl.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="$lang" lang="$lang"> <head> <title><?=$page_title?></title> <meta http-equiv="Content-Type" content="text/html; charset=<?=$encoding?>" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Language" content="<?=$lang?>" /> <link rel="shortcut icon" href="/images/favicon/<?=$project?>/favicon.ico" /> <style type="text/css"> @import url(/style/site.css); <?php foreach ($styles as $style_file) { echo "@import url(/style/$style_file);\n"; } ?> </style> </head> <body> <div id="header"> <h1><?=$page_h1?></h1> <div id="logos"> <?=$projects?> </div> </div> <div id="langs"> <?=$languages?> </div> <div id="page"> <div id="sidebar"> <div class="sidebox"> <dl> <dt>&docweb.common.header.currently-focused;</dt> <dd><?=$projdisplay?> | <?=$langdisplay?></dd> <dt>&docweb.common.header.insite-context-nav;</dt> <dd><?=$locallinks?></dd> <dt>&docweb.common.header.insite-context-nav;</dt> <dd><?=$extlinks?></dd> </dl> </div> </div> http://cvs.php.net/co.php/docweb/templates/all/www/shared/nav_languages.tpl.php?r=1.1&p=1 Index: docweb/templates/all/www/shared/nav_languages.tpl.php +++ docweb/templates/all/www/shared/nav_languages.tpl.php <?php foreach ($languages as $code => $name) { if ($code == 'all') { echo '<a href="' . get_insite_address(NULL, 'all') . '">&docweb.common.all;</a> '."\n"; } else { // @@@ TODO: translate/entity names echo '<a href="' . get_insite_address(NULL, $code) . '" title="' . $name . '" ><img src="/images/flags/' . $code . '.png" alt="' . $name . '" /></a>'."\n"; } } ?> http://cvs.php.net/co.php/docweb/templates/all/www/shared/nav_links.tpl.php?r=1.1&p=1 Index: docweb/templates/all/www/shared/nav_links.tpl.php +++ docweb/templates/all/www/shared/nav_links.tpl.php <?php if ($links) { foreach ($links AS $linkName => $url) { echo '<a href="'. $url ."\">&docweb.common.linkname.$linkName;</a><br />\n"; } } else { echo "&docweb.common.n-a;<br />\n"; } ?> http://cvs.php.net/co.php/docweb/templates/all/www/shared/nav_projects.tpl.php?r=1.1&p=1 Index: docweb/templates/all/www/shared/nav_projects.tpl.php +++ docweb/templates/all/www/shared/nav_projects.tpl.php <a href="<?=get_insite_address('www')?>" class="logo logo-all">&docweb.common.all;</a> <a href="<?=get_insite_address('php')?>" class="logo logo-php">&docweb.common.project.php;</a> <a href="<?=get_insite_address('pear')?>" class="logo logo-pear">&docweb.common.project.pear;</a> <a href="<?=get_insite_address('pecl')?>" class="logo logo-pecl">&docweb.common.project.pecl;</a> <a href="<?=get_insite_address('gtk')?>" class="logo logo-gtk">&docweb.common.project.php-gtk;</a> <a href="<?=get_insite_address('smarty')?>" class="logo logo-smarty">&docweb.common.project.smarty;</a> <a href="<?=get_insite_address('livedocs')?>" class="logo logo-livedocs">&docweb.common.project.livedocs;</a>