serendipity_fetchPrintEntries - range

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

serendipity_fetchPrintEntries - range

Post by yellowled »

I guess it should be possible to use the range parameter for serendipity_fetchPrintEntries for something like "fetch only entries from the past 14 days" or something, but ... erm ... how?

I think I'd have to use:
Other (null, 3-dimensional Array, ...):
Entries newer than $modified_since will be fetched
But frankly, I have no idea what this means ..?

YL
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: serendipity_fetchPrintEntries - range

Post by garvinhicking »

Hi!

To fetch entries from the past 14 days you use:

config.inc.php:

Code: Select all

$range = array(time()-86400*14, time());
$serendipity['smarty']->assign('trange', $range);
.tpl:

Code: Select all

{serendipity_fetchPrintEntries range=$trange}
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply