Re: [PHP-DOC] Patch to PhD for PHPDOC CHM building to use new scheme.

2011-01-10 Thread Richard Quadling
On 8 January 2011 12:50, Hannes Magnusson hannes.magnus...@gmail.com wrote:
 On Wed, Jan 5, 2011 at 15:10, Richard Quadling rquadl...@gmail.com wrote:
 Hi.

 I've built a CHM file using the new styling.



 Isn't it a bit early to distribute CHM using the new styles? Its not
 production quality yet, and may even change drastically..

 -Hannes


It is just an FYI rather than a commit.

-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY


Re: [PHP-DOC] Patch to PhD for PHPDOC CHM building to use new scheme.

2011-01-08 Thread Hannes Magnusson
On Wed, Jan 5, 2011 at 15:10, Richard Quadling rquadl...@gmail.com wrote:
 Hi.

 I've built a CHM file using the new styling.



Isn't it a bit early to distribute CHM using the new styles? Its not
production quality yet, and may even change drastically..

-Hannes


[PHP-DOC] Patch to PhD for PHPDOC CHM building to use new scheme.

2011-01-05 Thread Richard Quadling
Hi.

I've built a CHM file using the new styling.

It is a bit of a hack as rather than just a single CSS file, 3 are
required and also an additional class attribute.

The css class docs is not known in the CHM html files.

I've set that on body class=docs and that seems to be good.

It seems IE is making a right pig of the new styling at the moment,
though in the CHM reader, things look quite good.

From what I can see, alternate row colouring and last column styling
is unsupported by IE in the current form (just using CSS).

Richard.

-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY
Index: phpdotnet/phd/Package/PHP/CHM.php
===
--- phpdotnet/phd/Package/PHP/CHM.php   (revision 307074)
+++ phpdotnet/phd/Package/PHP/CHM.php   (working copy)
@@ -238,7 +238,12 @@
 $this-hhcStream = fopen($this-chmdir . php_manual_{$lang}.hhc, 
w);
 $this-hhkStream = fopen($this-chmdir . php_manual_{$lang}.hhk, 
w);
 
-file_put_contents($this-outputdir . style.css, 
$this-fetchStylesheet() . PHP_EOL . 'body { padding : 3px;}');
+file_put_contents($this-outputdir . style.css,
+   $this-fetchStylesheet('reset.css') . PHP_EOL .
+   $this-fetchStylesheet('theme.css') . PHP_EOL .
+   $this-fetchStylesheet('doc.css') . PHP_EOL .
+   'body { padding : 3px;}'
+   );
 
 self::headerChm();
 break;
@@ -391,11 +396,16 @@
 
 public function header($id) {
 $header = parent::header($id);
-// Add CSS link to head
-$pattern = '/(.*)(\r|\n|\r\n|\n\r)(.*)\/head/';
-$replacement = '$1  link media=all rel=stylesheet type=text/css 
href=style.css/$2$3/head';
-
-$header = preg_replace($pattern, $replacement, $header);
+
+$patterns = array(
+'/(.*)(\r|\n|\r\n|\n\r)(.*)\/head/', // Add CSS link to head
+'/(body)/',   // Add 'docs' class to body.
+);
+$replacements = array(
+'$1  link media=all rel=stylesheet type=text/css 
href=style.css/$2$3/head',
+'$1 class=docs',
+);
+$header = preg_replace($patterns, $replacements, $header);
 return $header;
 }
 
@@ -412,8 +422,11 @@
 }
 
 protected function fetchStylesheet($name = null) {
-$stylesheet = file_get_contents(http://www.php.net/styles/site.css;);
-if ($stylesheet) return $stylesheet;
+$stylesheet = file_get_contents(http://www.php.net/styles/; . 
(is_null($name) ? site.css : $name));
+if ($stylesheet) {
+v(Loaded $name stylesheet., VERBOSE_MESSAGES);
+return $stylesheet;
+}
 else {
 v(Stylesheet not fetched. Uses default rendering style., 
E_USER_WARNING);
 return ;


[PHP-DOC] patch for phd

2008-10-02 Thread Christian Weiske
Hi all,


Attached is a small patch for phd which supresses a warning with
invalid xml files and tells you explicitely when an id is missing
instead of throwing notices.

-- 
Regards/Mit freundlichen Grüßen
Christian Weiske

-= Geeking around in the name of science since 1982 =-


peartheme.php.orig
Description: Binary data


signature.asc
Description: PGP signature