cvs: phd /formats xhtml.php /include PhDMediaManager.class.php /themes/pear pearbightml.php /themes/php bightml.php

From: Date: Wed, 11 Feb 2009 20:28:48 +0000
Subject: cvs: phd /formats xhtml.php /include PhDMediaManager.class.php /themes/pear pearbightml.php /themes/php bightml.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-3207@lists.php.net to get a copy of this message
cweiske Wed Feb 11 20:28:48 2009 UTC Modified files: /phd/formats xhtml.php /phd/include PhDMediaManager.class.php /phd/themes/pear pearbightml.php /phd/themes/php bightml.php Log: Add support for image copying in single file htmls (bightml) http://cvs.php.net/viewvc.cgi/phd/formats/xhtml.php?r1=1.89&r2=1.90&diff_format=u Index: phd/formats/xhtml.php diff -u phd/formats/xhtml.php:1.89 phd/formats/xhtml.php:1.90 --- phd/formats/xhtml.php:1.89 Tue Feb 10 22:35:21 2009 +++ phd/formats/xhtml.php Wed Feb 11 20:28:48 2009 @@ -1,5 +1,5 @@ <?php -/* $Id: xhtml.php,v 1.89 2009/02/10 22:35:21 cweiske Exp $ */ +/* $Id: xhtml.php,v 1.90 2009/02/11 20:28:48 cweiske Exp $ */ require $ROOT. "/include/PhDMediaManager.class.php"; class XHTMLPhDFormat extends PhDFormat { @@ -424,7 +424,12 @@ public function registerTheme(PhDTheme $theme) { parent::registerTheme($theme); - $this->mediamanager->output_dir = $theme->outputdir; + if (isset($theme->outputdir)) { + $this->mediamanager->output_dir = $theme->outputdir; + } else { + $this->mediamanager->output_dir = $theme->outputfile . '-data/'; + $this->mediamanager->relative_path = basename($this->mediamanager->output_dir) . '/'; + } } public function __call($func, $args) { http://cvs.php.net/viewvc.cgi/phd/include/PhDMediaManager.class.php?r1=1.2&r2=1.3&diff_format=u Index: phd/include/PhDMediaManager.class.php diff -u phd/include/PhDMediaManager.class.php:1.2 phd/include/PhDMediaManager.class.php:1.3 --- phd/include/PhDMediaManager.class.php:1.2 Tue Feb 10 22:35:21 2009 +++ phd/include/PhDMediaManager.class.php Wed Feb 11 20:28:48 2009 @@ -1,5 +1,5 @@ <?php -/* $Id: PhDMediaManager.class.php,v 1.2 2009/02/10 22:35:21 cweiske Exp $ */ +/* $Id: PhDMediaManager.class.php,v 1.3 2009/02/11 20:28:48 cweiske Exp $ */ /** * Handles images (and other media objects) referenced in the docbook files. @@ -18,6 +18,14 @@ public $output_dir = null; /** + * Path the media files are referenced relative to in html. + * Trailing slash required. + * + * @var string + */ + public $relative_path = ''; + + /** * If the image media directory exists * * @var boolean @@ -45,7 +53,7 @@ $this->copyOver($filename, $newpath); - return $newpath; + return $this->relative_path . $newpath; }//public function handleFile(..) http://cvs.php.net/viewvc.cgi/phd/themes/pear/pearbightml.php?r1=1.2&r2=1.3&diff_format=u Index: phd/themes/pear/pearbightml.php diff -u phd/themes/pear/pearbightml.php:1.2 phd/themes/pear/pearbightml.php:1.3 --- phd/themes/pear/pearbightml.php:1.2 Wed Feb 11 05:08:17 2009 +++ phd/themes/pear/pearbightml.php Wed Feb 11 20:28:48 2009 @@ -2,9 +2,17 @@ require_once $ROOT . '/themes/pear/peartheme.php'; class pearbightml extends peartheme { + /** + * File to write the html to + * + * @var string + */ + public $outputfile = null; + public function __construct(array $IDs, $ext = "html") { parent::__construct($IDs, $ext, false); - $this->stream = fopen(PhDConfig::output_dir() . "pear_manual_{$this->lang}.html", "w"); + $this->outputfile = PhDConfig::output_dir() . "pear_manual_{$this->lang}.html"; + $this->stream = fopen($this->outputfile, "w"); self::header(); } public function appendData($data, $isChunk) { http://cvs.php.net/viewvc.cgi/phd/themes/php/bightml.php?r1=1.13&r2=1.14&diff_format=u Index: phd/themes/php/bightml.php diff -u phd/themes/php/bightml.php:1.13 phd/themes/php/bightml.php:1.14 --- phd/themes/php/bightml.php:1.13 Tue Jun 24 14:54:06 2008 +++ phd/themes/php/bightml.php Wed Feb 11 20:28:48 2009 @@ -1,11 +1,19 @@ <?php -/* $Id: bightml.php,v 1.13 2008/06/24 14:54:06 loudi Exp $ */ +/* $Id: bightml.php,v 1.14 2009/02/11 20:28:48 cweiske Exp $ */ require_once $ROOT . '/themes/php/phpdotnet.php'; class bightml extends phpdotnet { + /** + * File to write the html to + * + * @var string + */ + public $outputfile = null; + public function __construct(array $IDs, $filename, $ext = "html") { parent::__construct($IDs, $filename, $ext, false); - $this->stream = fopen(PhDConfig::output_dir() . "bightml.html", "w"); + $this->outputfile = PhDConfig::output_dir() . 'bightml.html'; + $this->stream = fopen($this->outputfile, "w"); self::header(); } public function appendData($data, $isChunk) {

« previous php.doc.cvs (#3207) next »