I had a simple idea that might enhance help new users learn perlmonks formatting. Have an "examine post source" link next to every post. This would of course be view only, not edit. But it would enable new users to quickly learn to use "code" and readmore, and the rest of it. Even after a year, there are some forms of markup that slip my mind: eg, how to do open and close angle brackets, and references to the perl documentation. If there was a link to every post, you could learn this a lot faster and organically.

Just thought I'd through that out!

  • Comment on Perlmonks idea: Examine post code (view only)

Replies are listed 'Best First'.
Re: Perlmonks idea: Examine post code (view only)
by ww (Archbishop) on Jan 20, 2006 at 16:33 UTC
    re ambrus"view xml" above, for demo only:
    This node contains a random sample of pm formatting

    For instance, this demonstrates a way to link to a monk's homenode, whilst displaying an alternate name (see above).
          ...and this is a way that doesn't do what you might expect: link.

    this is code...line 1 and line 2... and a last line of 'code'

    [ inside (non-linking) square_brackets, ] which are [ and ], respectively.

    and inside Win32::TieRegistry - Overlapped IO event message brackets linking to an op (not selected for relevance)

    While using character entities for < and > sometimes come in handy.

    Now, scroll up to the top of this page and try the xml link
     
    (:<})

      Thats a bug. Its not clear where from but I intend to find out.

      /me adjusts his glasses.

      Er, not a bug. :-)

      Anyway, the point I was originally going to make was that the xml view is per node and is escaped. So the "scroll to the top and hit the xml link" is going to do different things depending on whether it was being viewed as part of a thread or as the root node. When viewed as the root node it does "the right thing". Whether that is what you expected I can't say.

      ---
      $world=~s/war/peace/g

        ........erhhhhh

        /me seeks mechanic for adjustment of brain.

        ABSOLUTELY! Dear, gentle future readers: please note demerphq's wisdom and if you wish to see the xml of the sample stuff above, please view the thread, not the node.

        RULE NUMBER 1: Think, rethink, twist ambiguities around in you mind... and THEN, AND ONLY THEN (after after thinking some more) speak!

Re: Perlmonks idea: Examine post code (view only)
by tinita (Parson) on Jan 20, 2006 at 18:22 UTC
    i would like this feature, mainly for quoting. if i quote text wich contains tags, i can't copy them.
    cool would be a button beside the 'preview' button that inserts the original text into the textarea with 'blockquote' tags around.

      Here’s a tip: in Firefox, you can select something on the page, then pick “View Selection Source” from the contetx menu, and you’ll get a source view window where the bits you selected on the page are also selected. Nice and easy for copying.

      Makeshifts last the longest.

        you mean if i view the source of a post with firefox i can see tags like <code> and <spoiler>? how would firefox know about these tags?

        if somebody posted:
        post-increment <code>$i++</code> is blahblah
        i would like to copy & paste exactly this source.

Re: Perlmonks idea: Examine post code (view only)
by blazar (Canon) on Jan 20, 2006 at 16:41 UTC

    Occasionally I've desired this for a better quoting. Generally I just copy and paste with the mouse. Personally I don't see any particular risk with such a thing in any case, since what gets written in the code source is public in any case - that is: I know about e.g. <spoiler> tags, but they can be revealed anyway. I can live without this feature, but it wouldn't be bad to have it available...

Re: Perlmonks idea: Examine post code (view only)
by ambrus (Abbot) on Jan 20, 2006 at 16:16 UTC

    There's an "xml" view link above every node.

      But that will report the text with entities already escaped. I think he wants the "source" of each post exactly like the author sees it...
Re: Perlmonks idea: Examine post code (view only)
by ysth (Canon) on Jan 22, 2006 at 11:27 UTC
    I had quite some time ago planned to have a displaytype=bare that would do that. Maybe I should get back to it.

      'bare' is already assigned and it isn't a displaytype, so let's not overload that term.

      Besides, 'bare' doesn't fit well. 'source' would be better. Or 'input' or 'asentered' or 'rawtext'...

      Note that whether you get nodelets etc. around this would be separately controlled (by 'style=bare' or not).

      - tye