<h1><?php 
echo $title;
?>
</h1>

  <?php 
if (sfConfig::get('app_sfSimpleForumPlugin_allow_new_topic_outside_forum', true)) {
    ?>
  <ul class="forum_actions">
    <li><?php 
    echo link_to(__('New topic', null, 'sfSimpleForum'), 'sfSimpleForum/createTopic');
    ?>
</li>
  </ul>    
  <?php 
}
?>
  
  <?php 
include_partial('sfSimpleForum/figures', array('display_topic_link' => false, 'nb_topics' => $topics_pager->getNbResults(), 'topic_rule' => '', 'display_post_link' => true, 'nb_posts' => sfSimpleForumPostPeer::doCount(new Criteria()), 'post_rule' => 'sfSimpleForum/latestPosts', 'feed_rule' => 'sfSimpleForum/latestTopicsFeed', 'feed_title' => $feed_title));
?>
    
  <?php 
include_partial('sfSimpleForum/topic_list', array('topics' => $topics_pager->getResults(), 'include_forum' => true));
?>
  
  <?php 
echo pager_navigation($topics_pager, 'sfSimpleForum/latestTopics');
?>

</div>
Exemplo n.º 2
0
 public function countsfSimpleForumPosts($criteria = null, $distinct = false, $con = null)
 {
     include_once 'lib/model/om/BasesfSimpleForumPostPeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     $criteria->add(sfSimpleForumPostPeer::USER_ID, $this->getId());
     return sfSimpleForumPostPeer::doCount($criteria, $distinct, $con);
 }