/**
  * This sets the badges controller up to look like a front end page. It also
  * adds some leader board modules.
  */
 public function Initialize()
 {
     parent::Initialize();
     $this->Application = 'Yaga';
     $this->Head = new HeadModule($this);
     $this->AddJsFile('jquery.js');
     $this->AddJsFile('jquery-ui.js');
     $this->AddJsFile('jquery.livequery.js');
     $this->AddJsFile('jquery.popup.js');
     $this->AddJsFile('global.js');
     $this->AddCssFile('style.css');
     $this->AddCssFile('badges.css');
     $this->AddModule('BadgesModule');
     $Module = new LeaderBoardModule();
     $Module->GetData('w');
     $this->AddModule($Module);
     $Module = new LeaderBoardModule();
     $this->AddModule($Module);
 }
示例#2
0
 /**
  * Insert JS and CSS files into the appropiate controllers
  * 
  * @param ActivityController $Sender
  */
 public function ActivityController_Render_Before($Sender)
 {
     $this->_AddResources($Sender);
     if (C('Yaga.LeaderBoard.Enabled', FALSE)) {
         // add leaderboard modules to the activity page
         $Module = new LeaderBoardModule();
         $Module->GetData('w');
         $Sender->AddModule($Module);
         $Module = new LeaderBoardModule();
         $Sender->AddModule($Module);
     }
 }