in reply to Functionality to automatically insert <readmore> tags into long posts?

Some forum-engines handle this sort of thing automagically on-display.   If the post is longer than a certain size, it stops at a certain point with a clickable tag ... which reveals the rest by means of a little JavaScript snippet that un-hides the HTML section.   It would be easy to do.   But is it actually worth doing?   I’m not sure.   I guess I’m too comfortable now with this ol’ familiar dog ... and reluctant to do things with other people’s content, as they say, “automagically.”

Replies are listed 'Best First'.
Re^2: Functionality to automatically insert <readmore> tags into long posts?
by LanX (Saint) on Jul 23, 2013 at 15:02 UTC
    I already thought of this, but it's only possible with linear text without nested html structures.

    For instance you can't easily break a code-section just somewhere in the middle.

    In consequence we are back to the original problem, namely to parse the doc-tree of the post and to decide where to automagically put readmore-tags around.

    I thinks it's easier just to count the lines and to force the poster to include <readmore> tags.

    OTOH since I'm not motivated to code it, I don't ask others to do it.

    Cheers Rolf

    ( addicted to the Perl Programming Language)

      I already thought of this, but it's only possible with linear text without nested html structures.

      Huh? I think you're over thinking this, its 100% javascript

      $("tr[@class='reply-body pmnote-708738']/td[@class='reply-body']").hei +ght(200);

      Add a show/hide from one of these Re: Collapsible comments, toggleDisplay

        You're hidding the complete post.

        The idea of the readmore-mechanism is to have a preview of the entry ("readsome lines") before the rest is hidden with "readmore".

        Cheers Rolf

        ( addicted to the Perl Programming Language)