public function executeMonthArchives()
 {
   $this->monthArchives = sfSimpleBlogArchiveQuery::create()
     ->filterByCount(array('min' => 1))
     ->orderByYear(Criteria::DESC)
     ->orderByMonth(Criteria::DESC)
     ->limit(sfConfig::get('app_sfSimpleBlog_month_archives', 12))
     ->find();
 }
 public static function decrementCounter($date, $con = null)
 {
   if (!is_int($date)) $date = strtotime($date);
   $archive = sfSimpleBlogArchiveQuery::create()->findOneByMonthAndYear(date('n', $date), date('Y', $date));
   if ($archive->getCount() > 0)
   {
     $archive->setCount($archive->getCount()-1);
   }
   $archive->save($con);
 }