You can see the plugin in use at stevepsharpe.com in all articles and comments.
Basically what it does is show you how long ago an entry or comment was posted in english, below are various examples of what the plugin can output:
10 minutes ago 2 hours, 1 minute ago 7 days, 10 hours ago 5 months, 21 days ago 3 years, 1 month ago
To use the plugin it’s simply a case of just adding the plugin code within either an exp:weblog:entries or exp:comment:entries tag pair.
exp:weblog:entries example
{exp:timesince}
{entry_date}
{/exp:timesince}
exp:comment:entries example
{exp:timesince}
{comment_date}
{/exp:timesince}
Is there an alternative to this plugin now? I recall seeing something else other than this one on the forums.. I like this concept, but I only want the Timesince plugin to apply only to entries within the last 24 hours and if articles are older than that, it simply displays the actual date.
If anybody would care to elaborate on how this can be achieved, or whether something out there already does this, much welcome!~
You might be able to rig up something like this (using Mark’s idea from this thread: http://ellislab.com/forums/viewthread/112695/#569361):
Adjust the date formats to change up your window (it’s not terribly fine grained). I have not tested this, but it should work.
{if "{current_time format="%d/%m/%y"}" == "{entry_date format="%d/%m/%y"}"}
{exp:timesince}
{entry_date}
{/exp:timesince}
{if:else}
{entry_date}
{/if}
EDIT: It looks like Steve changed up his site and the plugin has gone missing. I can’t test it if I wanted to (which I sort of do now).
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.