Loading...
 
Skip to main content

Features / Usability


Aw: last_blog_posts - how to show only entries of last 2 months ?

Ok, solved.
Just in case someone else needs to do it:

Simply modify list_posts in libs/tikilib.php as follows:

Copy to clipboard
$mid = 'WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) < = FROM_UNIXTIME(created)



The FROM_UNIXTIME wrapper is needed, because tikiwiki doesn´t make use of date/datetime fieldtypes.
CURDATE( ) gives you the current date and time as unix timestamp, interval defines until when the select should go back.