Changeset 3958
- Timestamp:
- 05/08/07 14:01:52 (1 year ago)
- Files:
-
- plugins/sfBBPlugin/modules/sfBB/actions/actions.class.php (modified) (1 diff)
- plugins/sfBBPlugin/modules/sfBB/lib/sfBBPlugin_sfBBActions.class.php (moved) (moved from plugins/sfBBPlugin/modules/sfBB/lib/sfBBPluginActions.class.php) (1 diff)
- plugins/sfBBPlugin/modules/sfBB/templates/viewForumSuccess.php (modified) (1 diff)
- plugins/sfBBPlugin/web/css/default.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfBBPlugin/modules/sfBB/actions/actions.class.php
r3677 r3958 18 18 */ 19 19 20 require_once(dirname(__FILE__).'/../lib/sfBBPluginActions.class.php'); 21 22 class sfBBActions extends sfBBPluginActions 20 class sfBBActions extends sfBBPlugin_sfBBActions 23 21 { 24 public function preExecute()25 {26 $theme = sfConfig::get('app_sf_bb_plugin_theme') ? sfConfig::get('app_sf_bb_plugin_theme') : 'default';27 28 $this->getResponse()->addStylesheet('/sfBBPlugin/css/'.$theme.'.css');29 }30 31 public function executeIndex()32 {33 $c = new Criteria();34 $c->add(sfBBCategoryPeer::IS_LIVE, 1);35 $this->categories = sfBBCategoryPeer::doSelect($c);36 }37 38 public function executeViewForum()39 {40 $c = new Criteria();41 $c->add(sfBBForumPeer::ID, $this->getRequestParameter('id'));42 $c->add(sfBBForumPeer::IS_LIVE, 1);43 $forum = sfBBForumPeer::doSelectOne($c);44 45 $this->forward404Unless($forum instanceof sfBBForum);46 47 $this->forum = $forum;48 }49 50 public function executeViewThread()51 {52 }53 54 public function executeViewPost()55 {56 }57 58 public function executeViewUser()59 {60 }61 22 } plugins/sfBBPlugin/modules/sfBB/lib/sfBBPlugin_sfBBActions.class.php
r3667 r3958 18 18 */ 19 19 20 class sfBBPlugin Actions extends sfActions20 class sfBBPlugin_sfBBActions extends sfActions 21 21 { 22 public function preExecute() 23 { 24 $theme = sfConfig::get('app_sf_bb_plugin_theme') ? sfConfig::get('app_sf_bb_plugin_theme') : 'default'; 25 26 $this->getResponse()->addStylesheet('/sfBBPlugin/css/'.$theme.'.css'); 27 } 28 29 public function executeIndex() 30 { 31 $c = new Criteria(); 32 $c->add(sfBBCategoryPeer::IS_LIVE, 1); 33 $this->categories = sfBBCategoryPeer::doSelect($c); 34 } 35 36 public function executeViewForum() 37 { 38 $c = new Criteria(); 39 $c->add(sfBBForumPeer::ID, $this->getRequestParameter('id')); 40 $c->add(sfBBForumPeer::IS_LIVE, 1); 41 $forum = sfBBForumPeer::doSelectOne($c); 42 43 $this->forward404Unless($forum instanceof sfBBForum); 44 45 $this->forum = $forum; 46 } 47 48 public function executeViewThread() 49 { 50 } 51 52 public function executeViewPost() 53 { 54 } 55 56 public function executeViewUser() 57 { 58 } 22 59 } plugins/sfBBPlugin/modules/sfBB/templates/viewForumSuccess.php
r3677 r3958 1 1 <?php use_helper('sfBB') ?> 2 2 <div id="threads"> 3 <?php foreach ($forum->getThreads() as $thread): ?> 4 <div id="thread<?php echo $thread->getId() ?>" class="thread"> 5 <div class="thread_title"> 6 <?php echo link_to($thread->getTitle(), '@sf_bb_viewthread?id='.$thread->getId().'&stripped_title='.$thread->getStrippedTitle()) ?><br /> 7 </div> 8 <div class="thread_replies"><?php echo $thread->getNbReplies() ?></div> 9 <div class="thread_recent"><?php echo sfBB_lastpost($thread->getLatestReply()) ?></div> 10 </div> 11 <?php endforeach ?> 3 <table> 4 <tr> 5 <td class="threadheader">Thread</td> 6 <td class="threadheader_replies">Replies</td> 7 <td class="threadheader_recent">Last Post</td> 8 </tr> 9 <?php foreach ($forum->getThreads() as $thread): ?> 10 <tr> 11 <td class="thread_name"><?php echo link_to($thread->getTitle(), '@sf_bb_viewthread?id='.$thread->getId().'&stripped_title='.$thread->getStrippedTitle()) ?></td> 12 <td class="thread_replies"><?php echo $thread->getNbReplies() ?></td> 13 <td class="thread_recent"><?php echo sfBB_lastpost($thread->getLatestReply()) ?></td> 14 </tr> 15 <?php endforeach ?> 16 </table> 12 17 </div> plugins/sfBBPlugin/web/css/default.css
r3677 r3958 69 69 text-align: center; 70 70 } 71 72 td.threadheader 73 { 74 font-weight: bold; 75 width: 700px; 76 background-color: #dddddd; 77 } 78