Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
tye:

No argument; my wording -- as originally posted and still, as revised -- sucks compared to Luis.Roca's (at Re: RFC - shortform posting guidance for newcomers which is much better. Maybe the existing language is best.

But (yep, clarifying info here) I'm still thinking in terms of forcing newcomers to see (and sure, some incorrigibles may just click thru) the advice either before getting to the text entry box or at the preview phase.

If at the preview phase, it seems to me we could automate a test (are there any code tags? para tags). If the previewed text fails the test, then our code could automatically spit out the relevant guidance (such as "Use <p> around narrative </p>"). That's something done by many commercial sites which require (validate) entries. That doesn't seem to stop commerce... and though that's commonly done with js, we do have (pure-Perl) alternate options, do we not?

Objections (and answers):

  • The test, as sketched above, would fail in the case of a one-sentence reply where the lack of para tags makes no difference to the rendering.
    But this is an edge case, and if someone has to put para tags around that single sentence, perhaps they'll remember to do so when next they post something more complex.
  • Such a test would be hard to write.
    Disagree and believe I can do that. What I find hard -- and where I defer to those with stronger 'everything-fu' is how to retain the user's input for correction, without js.

Finally, (I think I'm agreeing here), the below-box help needs help. It is "busy" but needs, in your words, "terseness, clarity, snappiness."

Update - Note to protect the good Monks reputation: this was posted after Re^3: RFC - shortform posting guidance for newcomers (meh) and Re^4: RFC - shortform posting guidance for newcomers (meh) and is merely a very rough PofC:

#!/usr/bin/perl use Modern::Perl; # test the content submitted for preview -- for code and para tags $/="#####"; # will be followed by addtl samples -- good and bad my $nopara = 0; my $nocode = 0; my $preview = <DATA>; # print $preview; my @preview = split /\n/, $preview; for $_(@preview) { # say "\t Ln14, \$_: $_"; if ( $_ =~ /!<p/) { $nopara++; } if ( $_ =~ /(<\/\s*br>)/ ) { # arguably, this could be a s/ +// rather than a warning say "\n\t Bad tag -- &quot;$1&quot; -- found in \n \t $_\n"; } if ( $_ =~ /!<(c.*).*[;}] <\/c$1>/) { $nocode++; say "\n\t Do you need code tags in \n\t $_?\n?"; } } if ($nopara == 0 ) { print "\n\t You don't have any &lt;p> paragraph tags &lt;/p> in yo +ur draft. Do you need some?\n"; } if ($nocode == 0 ) { print "\n\t You don't have a &lt;c> code tag pair &lt;/c> in your +draft. Is that correct?\n"; } print "\n\n @preview\n"; # imperfect, as a good <br> gets ignored, b +ut perfectable __DATA__ I wantz to know if i can do this</br> <c>my $foo = 'bar' if (bar == bar); cuz that would be really cool.<br> oh, also, would somebody teach me how to use your parlmenks markup? love, foobar ########

Output:

Bad tag -- &quot;</br>&quot; -- found in I wantz to know if i can do this</br> You don't have any &lt;p> paragraph tags &lt;/p> in your draf +t. Do you need some? You don't have a &lt;c> code tag pair &lt;/c> in your draft. +Is that correct? I wantz to know if i can do this</br> <c>my $foo = 'bar' if (bar == b +ar); cuz that would be really cool.<br> oh, also, would somebody tea +ch me how to use your parlmenks markup? love, foobar #####

More to come, but please pile in (or "on" if that's your preference). :-)


In reply to Re^2: RFC - shortform posting guidance for newcomers (meh) by ww
in thread RFC - shortform posting guidance for newcomers by ww

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others studying the Monastery: (5)
    As of 2020-04-05 08:56 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      The most amusing oxymoron is:
















      Results (33 votes). Check out past polls.

      Notices?