svn: /pear2/BugManager/trunk/ src/BugManager/Site/PECL.php src/BugManager/Site/PHP.php www/config.sample.php www/index.php
www/templates/default/Main.tpl.php www/templates/pear/Site/PEAR.tpl.php www/templates/php/Site/PHP.tpl.php

From: Date: Thu, 13 Aug 2009 01:54:03 +0000
Subject: svn: /pear2/BugManager/trunk/ src/BugManager/Site/PECL.php src/BugManager/Site/PHP.php www/config.sample.php www/index.php
www/templates/default/Main.tpl.php www/templates/pear/Site/PEAR.tpl.php www/templates/php/Site/PHP.tpl.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-57090@lists.php.net to get a copy of this message
saltybeagle Thu, 13 Aug 2009 01:54:03 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=287190 Log: Get some basic templates started for sites. Each 'site' has a separate directory in the templates folder, and can override defaults by simply placing a template file within their site directory. Changed paths: U pear2/BugManager/trunk/src/BugManager/Site/PECL.php U pear2/BugManager/trunk/src/BugManager/Site/PHP.php _U pear2/BugManager/trunk/www/ A pear2/BugManager/trunk/www/config.sample.php A pear2/BugManager/trunk/www/index.php A pear2/BugManager/trunk/www/templates/ A pear2/BugManager/trunk/www/templates/default/ A pear2/BugManager/trunk/www/templates/default/Main.tpl.php A pear2/BugManager/trunk/www/templates/pear/ A pear2/BugManager/trunk/www/templates/pear/Site/ A pear2/BugManager/trunk/www/templates/pear/Site/PEAR.tpl.php A pear2/BugManager/trunk/www/templates/php/ A pear2/BugManager/trunk/www/templates/php/Site/ A pear2/BugManager/trunk/www/templates/php/Site/PHP.tpl.php Modified: pear2/BugManager/trunk/src/BugManager/Site/PECL.php =================================================================== --- pear2/BugManager/trunk/src/BugManager/Site/PECL.php 2009-08-13 01:42:14 UTC (rev 287189) +++ pear2/BugManager/trunk/src/BugManager/Site/PECL.php 2009-08-13 01:54:03 UTC (rev 287190) @@ -2,7 +2,7 @@ namespace pear2\BugManager\Site; -class PEAR implements \pear2\BugManager\SiteInterface +class PECL implements \pear2\BugManager\SiteInterface { function defaultCategory() { Modified: pear2/BugManager/trunk/src/BugManager/Site/PHP.php =================================================================== --- pear2/BugManager/trunk/src/BugManager/Site/PHP.php 2009-08-13 01:42:14 UTC (rev 287189) +++ pear2/BugManager/trunk/src/BugManager/Site/PHP.php 2009-08-13 01:54:03 UTC (rev 287190) @@ -2,7 +2,7 @@ namespace pear2\BugManager\Site; -class PEAR implements \pear2\BugManager\SiteInterface +class PHP implements \pear2\BugManager\SiteInterface { function defaultCategory() { Property changes on: pear2/BugManager/trunk/www ___________________________________________________________________ Added: svn:ignore + config.inc.php Added: pear2/BugManager/trunk/www/config.sample.php =================================================================== --- pear2/BugManager/trunk/www/config.sample.php (rev 0) +++ pear2/BugManager/trunk/www/config.sample.php 2009-08-13 01:54:03 UTC (rev 287190) @@ -0,0 +1,4 @@ +<?php +require_once dirname(__DIR__).'/../autoload.php'; + +$site = new pear2\BugManager\Site\PEAR(); Added: pear2/BugManager/trunk/www/index.php =================================================================== --- pear2/BugManager/trunk/www/index.php (rev 0) +++ pear2/BugManager/trunk/www/index.php 2009-08-13 01:54:03 UTC (rev 287190) @@ -0,0 +1,25 @@ +<?php +if (file_exists('config.inc.php')) { + require_once 'config.inc.php'; +} else { + require_once 'config.sample.php'; +} + + +$bug_manager = new pear2\BugManager\Main(); + +// Set the site we'll be using +$bug_manager->setSite($site); + +// Set up the output controller +$output_controller = new pear2\Templates\Savant\OutputController(); +$output_controller::setClassNameReplacement('pear2\BugManager'); + +// Set a template path using the local site first, then the default templates +$output_controller::setTemplatePath(__DIR__.'/templates/'.$site->__toString(). + PATH_SEPARATOR. + __DIR__.'/templates/default'); + +// Send the site output +$output_controller::display($bug_manager); + Added: pear2/BugManager/trunk/www/templates/default/Main.tpl.php =================================================================== --- pear2/BugManager/trunk/www/templates/default/Main.tpl.php (rev 0) +++ pear2/BugManager/trunk/www/templates/default/Main.tpl.php 2009-08-13 01:54:03 UTC (rev 287190) @@ -0,0 +1,9 @@ +<!DOCTYPE html> +<html> +<head> + <title>BugManager</title> +</head> +<body> + <?php pear2\Templates\Savant\OutputController::display(pear2\BugManager\Main::site()); ?> +</body> +</html> \ No newline at end of file Added: pear2/BugManager/trunk/www/templates/pear/Site/PEAR.tpl.php =================================================================== --- pear2/BugManager/trunk/www/templates/pear/Site/PEAR.tpl.php (rev 0) +++ pear2/BugManager/trunk/www/templates/pear/Site/PEAR.tpl.php 2009-08-13 01:54:03 UTC (rev 287190) @@ -0,0 +1 @@ +Welcome to PEAR's BugManager Added: pear2/BugManager/trunk/www/templates/php/Site/PHP.tpl.php =================================================================== --- pear2/BugManager/trunk/www/templates/php/Site/PHP.tpl.php (rev 0) +++ pear2/BugManager/trunk/www/templates/php/Site/PHP.tpl.php 2009-08-13 01:54:03 UTC (rev 287190) @@ -0,0 +1,4 @@ +Welcome to PHP's BugManager +<?php + +?> \ No newline at end of file

« previous php.pear.cvs (#57090) next »