public
Description: Blog Modules for CMS Made Simple 2.0
Homepage: http://cmsmadesimple.org
Clone URL: git://github.com/tedkulp/cmsms-blog.git
wishy (author)
Tue Apr 08 07:38:46 -0700 2008
commit  152d572f05e09fde11a744326fe200ced0fe35a7
tree    97757d18effd003c36428e9c00af1e6e7a98efcd
parent  3aef452680351b0d4f2343fd4fbd0aa68bbf9255
cmsms-blog / action.filter_list.php
100644 26 lines (23 sloc) 0.807 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
if (!isset($gCms)) die("Can't call actions directly!");
 
$conditions = array();
if ($params['day'] > -1)
{
  $conditions = array('status = ? and post_year = ? and post_month = ? and post_day = ?', 'publish', $params['year'], $params['month'], $params['day']);
}
else if ($params['month'] > -1)
{
  $conditions = array('status = ? and post_year = ? and post_month = ?', 'publish', $params['year'], $params['month']);
}
else if ($params['year'] > -1)
{
  $conditions = array('status = ? and post_year = ?', 'publish', $params['year']);
}
else
{
  $conditions = array('status = ?', 'publish');
}
$smarty->assign('posts', cms_orm('BlogPost')->find_all(array('order' => 'id desc', 'conditions' => $conditions)));
 
echo $this->process_template_from_database($id, $return_id, 'summary');
 
# vim:ts=4 sw=4 noet
?>