It occurred to me recently that we have a fairly high number of infrequent occasional posters in the SoPW section. Many of these people aren't familiar with how the site works and every other month or so there'll be a handful of very long posts without <readmore></> tags.

Just wondering what (if any) validation is performed on new nodes that are submitted.

If there is an existing validation process it would be great to add in a "catcher" for nodes that have greater than "50|100|150?" number of lines of text. And return an appropriate "please use some <readmore></readmore> tags" message, etc.

Of course, if there is any concern regarding this catcher being a nuisance, we could also provide a button to override that logic in a 'yes i know what I'm doing' kind of way...

Replies are listed 'Best First'.
Re: Suggestion - Node Submission Validation Checking
by ww (Archbishop) on Dec 08, 2009 at 11:34 UTC
    While I share the dismay of previous respondents with the way some posters ignore the helpful admonitions on the preview page, I do think a variant of OP's specific suggestion re automating <readmore> tags may have some merit.

    But rather than merely providing another message (to be brushed by), could we not do a line count on the draft when "preview" is called and -- when that count exceeds whatever we set as a threshhold("50|100|150?") -- insert <readmore>:

    • After the last line terminated by a period-and-new-line or <br> or </p>
    • at the transition from narative to <code>
    • after the last previous </code>
    and a </readmore> after the last line of the post.

    It seems to me likely that the typical offender is new to PM, and thus is unlikely to have used User Settings to turn the preview default to "off." Clearly, relying on that assumption would NOT assure us that all very long posts benefit from <readmore> tags and -- equally clearly -- those posts in leetspeak and/or without markup might slip by, but force-inserting <readmore> might be a start, if (ah, here's the real stinker!) not to difficult to implement.

Re: Suggestion - Node Submission Validation Checking
by Corion (Patriarch) on Dec 08, 2009 at 08:05 UTC

    You mean kind of like some "preview" feature, together with the message that, if things look weird, you should edit them? :-)

      haha, yes I get your point. Perhaps once the node submission preview button is clicked the node gets parsed through a basic handler, something like:

      my $paragraph_marker = '<p>'; my $break_marker = '<br>'; if ( $line_count > $x ){ return "that's a lot of text, maybe you should include some <readm +ore> tags"; } if ( $paragraph_count == 0 && $break_count == 0 && $line_count > $y){ return "you haven't formatted your post. It will be easier to + read if you separate your paragraphs with <p> tags."; }
      of course though, that'll take a bit of work to achieve, and it still won't stop the problem unless people read the warning message(s), which they don't seem to be doing currently...
Re: Suggestion - Node Submission Validation Checking
by planetscape (Chancellor) on Dec 08, 2009 at 09:55 UTC

    And because the admonition to "Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!" works so well...

    HTH,

    planetscape
      I think that desemondo's suggestion differs from the existing admonition in an important way—it would prompt the user upon submission (via some sort of pop-up or alert window, or maybe even just a highlighted message in the absence of JavaScript) to edit the offending post or explicitly to indicate that it is as it should be. This is a bit more of a hurdle than a friendly and easily ignored bit of text underneath the post.