Ok, I've updated CVS for, hopefully, the last time. Here is a quick feature rundown of the PDF functionality:
- PDF feature completely driven by config.php and is disabled by default since it requires installation of third party software.
- Stories now have a pdf icon (similar to print and email icons) that will take the HTML Geeklog generates during the print mode and generates the PDF from it
- Optionally, admins can enable an ad-hoc PDF generation feature that would allow users to enter any URL and generate a PDF. This is disabled by default but
is always excessible by Root users when the PDF feature is enabled.
- Optional support of HTML tidy. Again, this requires yet another third party tool to be installed so this is disabled by default
- Font point size is configurable
- TTL on generated PDF's is supported (i.e. you can tell Geeklog to delete PDF's more than one day old) NOTE: untested
- Supports get & post parameters so integration with other GL plugins is easy.
This needs testing, particularly on windows. The original code I had was very unix-centric and I did my best to make it OS independent.
I haven't confirmed the TTL feature
is working yet (next on my to-do list) but the code is there and looks right ;-) .
Also, thinking of forward compatibility, this feature uses the $_REQUEST PHP super global which means that a fairly recent version of PHP is required. I plan to add some code soon to check the PHP version and manually build the $_REQUEST array if it isn't supported but I didn't get around to that yet.
Finally, I did some refactoring of the code I got but a lot more is needed. I had grand visions of making this 100% OO but just didn't have the time.
This code also deserves a look from the security perspective. I'm thinking some sort of speed limit would be a good start. Anything else?
One last time, if you have a chance to test this a quick note on whether it worked or not and what your configuration is would sure be helpful.