ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

New EE plugin - ’Entry Age’

July 16, 2011 10:15am

Subscribe [2]
  • #1 / Jul 16, 2011 10:15am

    digitalformula

    176 posts

    Hi all,

    When I couldn’t find a plugin that does what I want today, I threw one together myself.  It’s called ‘Entry Age’ and, based on parameters passed to an EE tag pair, can display a configurable message warning to the reader that an entry is older than a certain age (measured in days, weeks, months or years).

    I’m posting this here as it does exactly what I want but I’m not sure how to go about putting it forward for others to use or if anyone else would even be interested in it.

    I’ve written a quick article about it on my site (http://digitalformula.net/articles/expressionengine-plugin-entry-age) - please feel free to check it out if you’d like to use it or check out http://digitalformula.net/articles/move-expressionengine-to-a-different-server if you want to see it in action.

    HTH

    [Mod Edit: Moved to the Community News forum]

  • #2 / Oct 11, 2011 9:50am

    akukral

    24 posts

    Is there any way to get this to do the reverse?

    Example, can I get it do return new if an entry is newer than 30 days old? It may be simple logic but I couldn’t get an if statement to work.

    *edited for clarity and grammar

  • #3 / Oct 13, 2011 6:41am

    digitalformula

    176 posts

    Is there any way to get this to do the reverse?

    Example, can I get it do return new if an entry is newer than 30 days old? It may be simple logic but I couldn’t get an if statement to work.

    *edited for clarity and grammar

    Sure, that’d be easy.  I haven’t tried it so can’t confirm if it’d work but it should just be a case of replacing the > sign with a < sign ... for example:

    $this->return_data = ($entry_age < $max_age) ? $return_template : '';

    I’ll try it later but let me know how you get on ...

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases