For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > November 2007 > Re: [PHP-DOC] Some new bugs for PhD









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DOC] Some new bugs for PhD
Hannes Magnusson

2007-11-05, 4:01 am

On Nov 5, 2007 4:12 AM, Edward Z. Yang <edwardzyang@thewritingpot.com> wrote:
> I've opened a series of new bug reports for PhD:
>
> http://bugs.php.net/bug.php?id=43191
> build.php fails to included necessary theme dependencies


Richard has already complained over this :)

>
> http://bugs.php.net/bug.php?id=43192
> Chunked HTML output difficult to use without TOC


Hmh. I don't think adding a TOC to the html output is the
right-way-to-go, but you are right, we do need some sort of real index
on the front page.

>
> http://bugs.php.net/bug.php?id=43193
> build.php does not allow output directory to be specified


Fair feature request.
This should be configured using the phd-setup stuff, but as we already
have a bunch of workarounds around the missing phd-setup I have no
problem with adding this in config.php.

>
> Since I don't have karma for PhD, I cannot do any commits (specifically,
> the first one would be easy to fix, though we would need to know exactly
> what to do, and I know Hannes is already aware of the issue). I can
> provide patches though, if you'd like.


Patches are always welcome :)
If you are interested in helping out in the development then the same
rules apply for getting karma there and every other module: send few
patches and then ask for karma :)

-Hannes
Edward Z. Yang

2007-11-05, 7:02 pm

Hannes Magnusson wrote:
>
> Richard has already complained over this :)


I was thinking about this. I think the most logical choice would be to
have the theme files include their own dependencies. Patch attached. (we
can also use dirname(__FILE__) trickery to maintain maximum portability,
but I don't think these files will be used outside of PhD)

--
Edward Z. Yang GnuPG: 0x869C48DA
HTML Purifier <http://htmlpurifier.org> Anti-XSS Filter
[[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]

Edward Z. Yang

2007-11-05, 7:02 pm

Hannes Magnusson wrote:
> Hmh. I don't think adding a TOC to the html output is the
> right-way-to-go, but you are right, we do need some sort of real index
> on the front page.


Attached is a hack that adds a classic style Table of Contents to the
index.html/manual.html pages as an interim solution. It could be made
cleaner if the navigation-ification code in format_root_chunk was
factored into its own method. This technique may also work for the
bightml theme.

It occurs to me that, since each "book" generates its own table of
contents, we only need links to those sections. format_root_chunk works
pseudo-recursively (it goes two levels deep), so once it is factored out
we could add that as a parameter, and convert the function into a truly
recursive one.

The special treatment of manual.html worries me slightly; I think the
hierarchy should be an index.html with special treatment (in this case,
including some of the contents of manual.html) while manual.html is just
a standard root page. This would also be more conducive to a TOC.

Also attached is a documentation patch for PhDReader, which clarifies
what notXPath does.

--
Edward Z. Yang GnuPG: 0x869C48DA
HTML Purifier <http://htmlpurifier.org> Anti-XSS Filter
[[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]

Edward Z. Yang

2007-11-05, 7:02 pm

Hannes Magnusson wrote:
> While writing a reply I realized something... that index.html file you
> are getting in REF_STRUCT_DEV is broken.
> The files are named by their IDs and since we don't have an "index" ID
> we copy (thank you Windows, I have a great respect for you!) the
> (believed-to-be-index) manual.html as index.html.
> Now, in the REF_STRUCT_DEV we however have an index ID, which does get
> generated with a normal TOC - but it gets overwritten since the theme
> blindly copys manual.html to index.html ;)


Patch fixing this attached. I presume that non-REF_STRUCT_DEV still
needs to preserve the old behavior, so we unlink index.html before we
begin generation.

--
Edward Z. Yang GnuPG: 0x869C48DA
HTML Purifier <http://htmlpurifier.org> Anti-XSS Filter
[[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com