php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17646 use only one version of each manual page
Submitted: 2002-06-07 12:26 UTC Modified: 2002-07-06 12:37 UTC
From: mitja at doticni dot net Assigned: goba (profile)
Status: Closed Package: Website problem
PHP Version: 4.2.1 OS: any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mitja at doticni dot net
New email:
PHP Version: OS:

 

 [2002-06-07 12:26 UTC] mitja at doticni dot net
After #17644 is done, the manual pages could be reworked so that only one page per language is needed, instead of two (print/non-print).

I suggest this is done so that the printable version is seen when the file is passed straight to browser (something.html), and the displayable version is shown when the same file is processed through PHP. Something like this:

<!--<? manualHeader(...); if ($print) { ?>-->
print-only stuff
<!--<? } ?>-->
stuff common to both
<!--<? if (!$hidenotes) { ?>-->
notes
<!--<? } manualFooter(...); ?>-->

Then, non-existing directories could be used for the displayable version, which would pass the request through error.php, which would include the neccesary logic.

This would cut the number of files on the site in half, and the disk space requirements for a mirror (together with #17644) even more.

Additionally, it would be easy to both show and not show notes in the printable layout, again with using no additional files on the servers.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-07 12:37 UTC] goba@php.net
I still cannot see the point in putting PHP code deep into HTML comments... Why to serve PHP code in HTML comment (more bandwith when serving HTML files alone), and making it harder to recognize the PHP code? Even as the non-printed manual pages are used much more often, then the HTML versions. So IMHO the PHP format should be a base, and not the HTML one.
 [2002-06-07 12:47 UTC] mitja at doticni dot net
So the printable version doesn't need to get PHP-processed, but can be just sent away.

The amount of code would also be very low - my guess is around 300 bytes a file.
 [2002-06-07 12:52 UTC] goba@php.net
Well, I don't know really what takes more time (in sum):

a) error redirection on [the less used] printed pages, and PHP parsing on all of them

b) error redirection on [the much more frequently used] "normal" manual pages, and [slightly] more badwidth needed to send out printed versions

I still think that a) is nicer, also counting on the error redirections (more work on the server), not just HTML file size...
 [2002-06-07 13:29 UTC] mitja at doticni dot net
Well, considering frequency of access, you might be right. 

For a real answer, we would need to take a look at the statistics and measure both ways, which is obviously too much work for so little difference (it is probably little difference in any case).

Anyway, my request is one copy of each manual page instead of two, how exactly it is done is not that important.
 [2002-06-07 14:17 UTC] goba@php.net
That new virtual "print" directory is now actually there to half the size of the manual files ;)) So this desire will be fullfilled. ;))

Another note on PHP scripts. If we introduce color coded PHP examples (which would be quite nice IMHO), we need to put more PHP code into the text part, so it would just get crappy with those HTML comments.

This bug can be closed, if the work is done on the printable versions, and the html directories are dropped from the mirrored contents...
 [2002-07-06 12:37 UTC] goba@php.net
This thing is done, html directories are dropped from generation and rsynced data...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jun 26 14:01:32 2024 UTC