Changeset 814
- Timestamp:
- 10/13/08 14:43:46 (7 weeks ago)
- Location:
- trunk/app
- Files:
-
- 6 modified
-
controllers/entries_controller.php (modified) (1 diff)
-
controllers/news_controller.php (modified) (2 diffs)
-
controllers/podcasts_controller.php (modified) (3 diffs)
-
views/entries/rss/rss.ctp (modified) (1 diff)
-
views/layouts/rss/default.ctp (modified) (1 diff)
-
views/podcasts/rss/rss.ctp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/entries_controller.php
r807 r814 81 81 $channelData = array('title' => 'eduBlog Recent Writing | '. $username, 82 82 'link' => array('controller' => 'entries', 'action' => 'view', $username), 83 'url' => array('controller' => 'entries', 'action' => 'view', $username),84 83 'description' => $username . ' eduBlog Recent on Karamelo', 85 84 'language' => 'es-mx' -
trunk/app/controllers/news_controller.php
r809 r814 16 16 public $name = 'News'; 17 17 public $helpers = array('Ajax', 'Fck', 'News', 'Time', 'Gags'); 18 public $components = array('Portal' );18 public $components = array('Portal', 'RequestHandler'); 19 19 public $paginate = array('limit' => 8, 'page' => 1, 'order' => array('News.id' => 'DESC')); 20 20 … … 68 68 $channelData = array('title' => 'Karamelo eLearning Portal ', 69 69 'link' => array('controller' => 'news', 'action' => 'display'), 70 'url' => array('controller' => 'news', 'action' => 'display'),71 70 'description' => 'Latest news on Karamelo', 72 71 'language' => 'en-us' 73 72 ); 74 73 75 $conditions = array( "News.status"=>1);76 77 $fields = array( "News.id", "News.title", "News.body", "News.created", "News.theme_id", "News.user_id");78 79 $order = "News.id DESC";74 $conditions = array('News.status'=>1); 75 76 $fields = array('News.id', 'News.title', 'News.body', 'News.created', 'News.theme_id', 'News.user_id'); 77 78 $order = 'News.id DESC'; 80 79 81 80 $limit = 15; -
trunk/app/controllers/podcasts_controller.php
r785 r814 64 64 public function rss($username) 65 65 { 66 $channelData = array('title' => $username.' Podcasts', 66 $this->pageTitle = $username .' Podcasts'; 67 // blogger data 68 $User = $this->Podcast->User->find(array('username'=>$username), array('id', 'username','name','email', 'name_blog', 'avatar')); 69 70 $channelData = array('title' => $username.' Podcasts', 67 71 'link' => array('controller' => 'blog', 'action' => $username), 68 ' url' => array('controller' => 'blog', 'action' => $username),69 'description' => 'Audio fromedublog',72 'description' => 'Audio from '. $username .' edublog', 73 'itunes:summary' => 'Audio from '. $username .' edublog', 70 74 'language' => 'en-us', 71 75 'copyright' => 'Chipotle Software, 2008', 76 'generator' => 'Karamelo Platform', 72 77 'managingEditor' => 'podcasts@chipotle-software.com', 73 'itunes:owner' => array('itunes:email'=> 'manuel@mononeurona.org') 78 'itunes:owner' => $username, 79 'itunes:image' => '/images/avatars/'.$User['User']['avatar'], 80 'itunes:author' => $User['User']['name'] 74 81 ); 75 82 76 83 $this->Podcast->User->unbindAll(); 77 78 $User = $this->Podcast->User->find(array('username'=>$username), array('id', 'username', 'email', 'name_blog', 'avatar')); 79 80 $conditions = array("status"=>1, "user_id"=>$User['User']['id']); 81 82 $fields = array("Podcast.id", "Podcast.title", "Podcast.filename", "Podcast.description", "Podcast.keywords", "Podcast.created", "Podcast.duration", "Podcast.title", "Podcast.length", "Podcast.subject_id", "Subject.title"); 83 84 $order = "Podcast.created DESC"; 85 86 $limit = 12; 87 88 $this->set('User', $User); 89 90 $podcasts = $this->Podcast->findAll($conditions, $fields, $order, $limit); 91 92 $this->set(compact('channelData', 'podcasts')); 84 $conditions = array('status'=>1, 'user_id'=>$User['User']['id']); 85 $fields = array('Podcast.id', 'Podcast.title', 'Podcast.filename', 'Podcast.description', 'Podcast.keywords', 'Podcast.created', 'Podcast.duration', 'Podcast.title', 'Podcast.length', 'Podcast.subject_id', 'Subject.title'); 86 $order = 'Podcast.created DESC'; 87 $limit = 12; 88 $podcasts = $this->Podcast->findAll($conditions, $fields, $order, $limit); 89 $this->set(compact('channelData', 'podcasts')); 93 90 } 94 91 … … 101 98 $this->pageTitle = 'Podcast'; 102 99 103 $conditions = array( "Podcast.id"=>$podcast_id, "Podcast.status"=>1);100 $conditions = array('Podcast.id'=>$podcast_id, 'Podcast.status'=>1); 104 101 105 102 $fields = array("id", "title", "description", "created", "filename", "length", "duration"); … … 107 104 $this->set('data', $this->Podcast->find($conditions, $fields)); 108 105 } 106 109 107 public function funny() 110 108 { //eastern egg -
trunk/app/views/entries/rss/rss.ctp
r646 r814 5 5 'link' => array('controller'=>'entries', 'action' => 'view', $item['User']['username'], $item['Entry']['id']), 6 6 'guid' => array('controller'=> 'entries','action' => 'view', $item['User']['username'], $item['Entry']['id']), 7 'description' => strip_tags($item['Entry']['body']),8 'pubDate' => $item['Entry']['created']7 'description' => strip_tags($item['Entry']['body']), 8 'pubDate' => $item['Entry']['created'] 9 9 ); 10 10 } -
trunk/app/views/layouts/rss/default.ctp
r646 r814 1 1 <?php 2 2 echo $rss->header(); 3 $channel = $rss->channel(array(), $channelData, $items);3 $channel = $rss->channel(array(), $channelData, $items); 4 4 echo $rss->document(array(), $channel); 5 5 ?> -
trunk/app/views/podcasts/rss/rss.ctp
r677 r814 4 4 return array( 5 5 'title' => $item['Podcast']['title'], 6 ' link' => array('controller'=> 'podcasts', 'action' => 'display', $item['User']['id']),7 ' guid' => array('controller'=> 'files', 'action' => 'podcasts', $item['Podcast']['filename']),6 'guid' => '/files/podcasts/'. $item['Podcast']['filename'], 7 'enclosure' => array('url'=>'/files/podcasts/'. $item['Podcast']['filename'], 'length'=> $item['Podcast']['length']), 8 8 'description' => strip_tags($item['Podcast']['description']), 9 9 'pubDate' => $item['Podcast']['created'], … … 11 11 'itunes:summary' => strip_tags($item['Podcast']['description']) 12 12 ); 13 } 14 13 } 14 $rss->addNs('itunes'); 15 15 $this->set('items', $rss->items($podcasts, 'rss_transform')); 16 16 ?>
