cvs: phd(PHD_0_4) / package.xml /formats xhtml.php /include PhDMediaManager.class.php /themes/pear pearbightml.php /themes/php bightml.php

From: Date: Wed, 11 Feb 2009 20:30:24 +0000
Subject: cvs: phd(PHD_0_4) / package.xml /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-3208@lists.php.net to get a copy of this message
cweiske Wed Feb 11 20:30:24 2009 UTC Modified files: (Branch: PHD_0_4) /phd package.xml /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/package.xml?r1=1.74.2.19.2.41&r2=1.74.2.19.2.42&diff_format=u Index: phd/package.xml diff -u phd/package.xml:1.74.2.19.2.41 phd/package.xml:1.74.2.19.2.42 --- phd/package.xml:1.74.2.19.2.41 Tue Feb 10 22:49:12 2009 +++ phd/package.xml Wed Feb 11 20:30:24 2009 @@ -41,7 +41,7 @@ <active>yes</active> </developer> - <date>2009-02-10</date> + <date>2009-02-11</date> <version> <release>0.4.4</release> <api>0.4.4</api> @@ -57,7 +57,7 @@ - Implement request #47201: Allow custom source code highlighter (e.g. Geshi) (Christian) - Fix HTML problems with empty paragraphs in examples and qandaset questions (Christian) - Support &lt;uri&gt; and &lt;screenshot&gt; (Christian) - - Copy images automatically (Christian) + - Copy images automatically using MediaManager (Christian) </notes> <contents> http://cvs.php.net/viewvc.cgi/phd/formats/xhtml.php?r1=1.67.2.2.2.20&r2=1.67.2.2.2.21&diff_format=u Index: phd/formats/xhtml.php diff -u phd/formats/xhtml.php:1.67.2.2.2.20 phd/formats/xhtml.php:1.67.2.2.2.21 --- phd/formats/xhtml.php:1.67.2.2.2.20 Tue Feb 10 22:32:29 2009 +++ phd/formats/xhtml.php Wed Feb 11 20:30:24 2009 @@ -1,5 +1,5 @@ <?php -/* $Id: xhtml.php,v 1.67.2.2.2.20 2009/02/10 22:32:29 cweiske Exp $ */ +/* $Id: xhtml.php,v 1.67.2.2.2.21 2009/02/11 20:30:24 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.1.2.1&r2=1.1.2.2&diff_format=u Index: phd/include/PhDMediaManager.class.php diff -u phd/include/PhDMediaManager.class.php:1.1.2.1 phd/include/PhDMediaManager.class.php:1.1.2.2 --- phd/include/PhDMediaManager.class.php:1.1.2.1 Tue Feb 10 22:32:29 2009 +++ phd/include/PhDMediaManager.class.php Wed Feb 11 20:30:24 2009 @@ -1,5 +1,5 @@ <?php -/* $Id: PhDMediaManager.class.php,v 1.1.2.1 2009/02/10 22:32:29 cweiske Exp $ */ +/* $Id: PhDMediaManager.class.php,v 1.1.2.2 2009/02/11 20:30:24 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(..) @@ -86,4 +94,4 @@ }//class PhDMediaManager -?> \ No newline at end of file +?> http://cvs.php.net/viewvc.cgi/phd/themes/pear/pearbightml.php?r1=1.1.6.2.2.1&r2=1.1.6.2.2.2&diff_format=u Index: phd/themes/pear/pearbightml.php diff -u phd/themes/pear/pearbightml.php:1.1.6.2.2.1 phd/themes/pear/pearbightml.php:1.1.6.2.2.2 --- phd/themes/pear/pearbightml.php:1.1.6.2.2.1 Wed Feb 11 05:07:46 2009 +++ phd/themes/pear/pearbightml.php Wed Feb 11 20:30:24 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($GLOBALS['OPTIONS']['output_dir'] . "pear_manual_{$this->lang}.html", "w"); + $this->outputfile = $GLOBALS['OPTIONS']['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.11.4.1&r2=1.11.4.2&diff_format=u Index: phd/themes/php/bightml.php diff -u phd/themes/php/bightml.php:1.11.4.1 phd/themes/php/bightml.php:1.11.4.2 --- phd/themes/php/bightml.php:1.11.4.1 Sun Oct 19 13:48:16 2008 +++ phd/themes/php/bightml.php Wed Feb 11 20:30:24 2009 @@ -1,11 +1,19 @@ <?php -/* $Id: bightml.php,v 1.11.4.1 2008/10/19 13:48:16 bjori Exp $ */ +/* $Id: bightml.php,v 1.11.4.2 2009/02/11 20:30:24 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($GLOBALS['OPTIONS']['output_dir'] . "bightml.html", "w"); + $this->outputfile = $GLOBALS['OPTIONS']['output_dir'] . 'bightml.html'; + $this->stream = fopen($this->outputfile, "w"); self::header(); } public function appendData($data, $isChunk) {

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