WordPress.org

Ready to get started?Download WordPress

Forums

New Plugin: Content Extract (10 posts)

  1. roblgs
    Member
    Posted 8 years ago #

    As a result of a requirement to get more out of excerpts than the the_excerpt provided, "Content Extract" was born.

    It's intended use is instead of the_excerpt, and it provides the following capabilities.

    1. Uses an Excerpt if there is one
    2. If no excerpt it uses the content, breaking it as per the following logic
      • If there is an explicit break (<!--More-->), then it is obeyed
      • If no explicit break, then the length (in words) is checked against an upper threshold
        • If longer, then content is cut back to a specified cut length that can be different to the checked upper limit
        • If shorter than the upper threshold, the whole text is output

    Developed and tested against WP2 stable, this should also work with WP 1.5+.

    A more complete description, plus full details on how to use the plugin and a link to the downloadable zip file are available on the Content Extract support page.

    Rob

  2. moshu
    Member
    Posted 8 years ago #

    The link is dead...

  3. roblgs
    Member
    Posted 8 years ago #

    Which link? The one in the message above certainly works (just tried it again), and the link to the downloadable on that page does also...

    Gremlins??

    Rob

  4. moshu
    Member
    Posted 8 years ago #

  5. Cypher
    Member
    Posted 8 years ago #

    Links work for me. Nice plugin.

    Regards

  6. moshu
    Member
    Posted 8 years ago #

    Finally, I could get in ;)
    Seems to be a very useful plugin!

  7. roblgs
    Member
    Posted 8 years ago #

    Glad you were able to get in...

    Some further ideas have just been incorporated into a b2 version of the plugin...

    The ability to specify check and cut lengths as numbers of sentences, rather than numbers of words. If you specify just numbers for these limits then they will be interpreted as words, howver, if you specify them as strings, with the format:

    'n:s', that is, a number followed by ':s'

    then it will be interpreted as 'n sentences', and the check/cut made accordingly.

    The second addition involves a small interface change, with the fourth argument (still boolean), determining whether the auto-generated extract gets written out to the 'post_excerpt' field for the post in question. The default is 'false', but the intent is to allow for auto-excerpts and minimising processing for subsequent loads of a post through this plugin.

    Full details have been posted to the Content Extract support page.

    Comments welcome.

    Best regards

    Rob

  8. Novakeo
    Member
    Posted 8 years ago #

    I have been looking for this kind of plugin for a while, works great... nice plugin... Thanks!

  9. roblgs
    Member
    Posted 8 years ago #

    Hi,

    I've just uploaded the b3 version of the Content Extract plugin for WordPress. This is largely a functional enhancement with the following new abilities:

    • Ability to retain formatting in extracts
    • Ability to force an update if there already exists an excerpt within the database entry for a post
    • Beefed up sentence counting, though this could still stand some improvement.

    Full details are on the Content Extract support page.

    Cheers

    Rob

  10. roblgs
    Member
    Posted 7 years ago #

    Hi,

    Just updated the plugin to fix a really silly bug affecting truncation of posts based upon a word count. Breaking based on a sentence count was unaffected and continues to work OK.

    Full details are available on the Content Extract support page, from where the new version can also be downloaded.

    Cheers

    Rob

Topic Closed

This topic has been closed to new replies.

About this Topic