Re: svn: /phd/trunk/phpdotnet/phd/Package/PHP/ CHM.php
| From: | Moacir de Oliveira | Date: | Tue, 08 Sep 2009 12:45:19 +0000 |
| Subject: | Re: svn: /phd/trunk/phpdotnet/phd/Package/PHP/ CHM.php | ||
| References: | 1 | Groups: | php.doc.cvs |
| Request: | Send a blank email to doc-cvs+get-4868@lists.php.net to get a copy of this message | ||
2009/9/8 Richard Quadling <rquadling@php.net>
> rquadling Tue, 08 Sep 2009 10:02:03 +0000
>
> Revision:
> http://svn.php.net/viewvc?view=revision&revision=288155
>
> Log:
> CHM TOC and images working
>
> +
> + public function format_imagedata($open, $name, $attrs) {
> + // Due to flattening of the CHM build process, the links to the
> images cannot be relative.
> + preg_match('
src="([^"]++)"',
> $image =
> parent::format_imagedata($open, $name, $attrs), $imageMatches);
> + $image = str_replace($imageMatches[1], basename($imageMatches[1]),
> $image);
> +
> + // Add the image to the hhp project file as the automatic build
> won't find it.
> + fwrite($this->hhpStream, 'res\\images\\' .
> basename($imageMatches[1]) . "\n");
> +
> + return $image;
> + }
> }
>
>
I would prefer not to overload the method format_imagedata, the pear chm
doesn't do it and just works.
--Moacir