http://qs321.pair.com?node_id=181124

I've added two new display types for all nodes: print and xml.

print takes you to a page without all the hoopla, like your nodelets, the search box, and all that stuff. You can specify an external style sheet to use for printing in your user settings. Otherwise, a default style sheet will be used.

xml is probably only useful for people who want to write some sort of alternative interface to Perl Monks. Right now, it only returns content of static nodes, which means it doesn't work for nodes like Newest Nodes (which is a superdoc and hence dynamic), or The Monastery Gates. I don't know how useful it'll be yet, but I'd appreciate any suggestions/questions.

As an aside, there's now xml node thread, for getting a threaded list of replies to a node. Pass it a param id (the node_id of the node in question), for instance: /index.pl?node=xml%20node%20thread&id=180845.

Also, notice the links in the upper left hand corner.

Thanks

Replies are listed 'Best First'.
(jeffa) Re: New Display Types
by jeffa (Bishop) on Jul 12, 2002 at 04:56 UTC
    Thank you, thank you, thank you, ar0n. Node Link Checker is really going to love being able to parse XML (or maybe the print version - links are already converted and ready for HTML::LinkExtor ...) instead of using hack-ish regexes like:
    my @ends = ( qr|<BR>\s+<hr \/>|, qr|<BR>\s+<BR><font size=2><I>|, qr|<CENTER>\s+back to <A HREF="|, qr|<BR>go see more <A HREF="|, qr|<center><TABLE width=|, );
    I had talked to tye about turning displaytype=xml back on, but i really didn't have a clue where to start. You are my new hero, but i'll still blame you anyway. :D

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    
Re: New Display Types
by hossman (Prior) on Jul 12, 2002 at 02:54 UTC
    One suggestion: include the definitive URL for the node in the "header" box of the printer friendly page.

    1. Not all browsers include the URL when printing
    2. browsers that do include the url typical truncate them
    3. the URL of the printer freindly page isn't as usefull as the default URL for the same node
Re: New Display Types
by Aristotle (Chancellor) on Jul 11, 2002 at 20:51 UTC

    ++!

    Finally - no longer does one have to parse HTML to get a node's content! I can just smell a Perlmonks <-> NNTP gateway.. :-D

    Makeshifts last the longest.

Re: New Display Types
by jdavidboyd (Friar) on Jul 11, 2002 at 20:41 UTC
    Excellent and thank you!

    I've hated the waste of paper used by all the nodelets I keep turned on. This is a great impovement...

    As a by the way, I can't get anywhere with the xml treeview nodelet. It just shows up as a blank page. (Probably not done configuring it yet?)
(wil) Re: New Display Types
by wil (Priest) on Jul 12, 2002 at 10:16 UTC
    Good work, ar0n. I'd be interested to see how all this affects the server load over time as monks go about creating alternative interfaces and other funky stuff.

    The only thing that I'll ask for is that the print display page keeps the same Custom Node Title Definition as the one set in your user settings. It currently disregards what's in your user settings and just prints the node title.

    Oh yeah, and in the top table where the node title is displayed, maybe adding the text 'perlmonks.org' would be handy to show what site the document is coming from, as would an URL to node in question.

    - wil
Re: New Display Types
by ajt (Prior) on Jul 12, 2002 at 09:51 UTC

    ++, most useful!

    I don't know what I'm going to do with the xml yet, but I'm sure I'll think of something....

    The print option is most useful for older browser users not able to use sophisticated CSS printing. For all things CSS have a look at Eric Meyers's css/edge, and take a look at his CSS Printing article over at www.alistaprt.com - well worth reading.

Re: New Display Types
by rah (Monk) on Jul 12, 2002 at 02:35 UTC
    Excellent. The print formatting is a great feature. I frequently run into formatting problems on node, where text overwites other text. The print format avoided all that, and gave me a nicely formatted hard copy to boot.
Re: New Display Types
by Juerd (Abbot) on Jul 12, 2002 at 13:48 UTC

    Printers are quite non-interactive, apart from inserting paper and pushing some simplistic buttons. I couldn't get it to submit a reply, or to send my vote. Going back to the main page also failed.

    As long as printers are these primitive devices, you might as well remove the "Comment on", "d/l code", "Back to" links and the voting stuff.

    - Yes, I reinvent wheels.
    - Spam: Visit eurotraQ.
    

      I disagree. The "print" format is a nice format for viewing in the browser.

      The only thing that's missing is the ability to jump straight to "print" format from the "Newest Nodes" page. (Oh, and "print" format when posting/previewing would be nice too.)

      Abigail

        I disagree. Making the print interface of perlmonks too accessible and usable would mean a few users would use that instead of the main interface and thus perlmonks will loose out on advertising revenues (not good), and a few community-building features such as the chatterbox.

        If you prefer to browse perlmonks with a similar interface to print, then there's a setting in your user settings to turn off all nodelets, which might help.

        - wil

        The "print" format is a nice format for viewing in the browser. ... (Oh, and "print" format when posting/previewing would be nice too.)

        You *could* of course just adjust the default layout if you like it better when it's clean:

        TABLE[width="100%"][cellpadding="0"], /* top bar */ TD[width="20%"], /* nodelets */ TD[valign="middle"][align="right"], /* navigation */ #footer /* footer */ { display: none; }

        - Yes, I reinvent wheels.
        - Spam: Visit eurotraQ.
        

Re: New Display Types
by Popcorn Dave (Abbot) on Jul 15, 2002 at 23:44 UTC

    Thank you, Thank you, Thank you!!!

    Finally I don't have to mess with the font sizes on my browser to actually see code that other monks post. You may yet save me from glasses : )

    Some people fall from grace. I prefer a running start...