Changeset 814

Show
Ignore:
Timestamp:
10/13/08 14:43:46 (7 weeks ago)
Author:
aarkerio
Message:

Udate RSS

Location:
trunk/app
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/controllers/entries_controller.php

    r807 r814  
    8181  $channelData = array('title' => 'eduBlog Recent Writing | '. $username, 
    8282               'link'  => array('controller' => 'entries', 'action' => 'view', $username), 
    83                'url'   => array('controller' => 'entries', 'action' => 'view', $username), 
    8483               'description' => $username . ' eduBlog Recent on Karamelo', 
    8584               'language' => 'es-mx' 
  • trunk/app/controllers/news_controller.php

    r809 r814  
    1616 public $name = 'News'; 
    1717 public $helpers          = array('Ajax', 'Fck', 'News', 'Time', 'Gags');   
    18  public $components       = array('Portal'); 
     18 public $components       = array('Portal', 'RequestHandler'); 
    1919 public $paginate = array('limit' => 8, 'page' => 1, 'order' => array('News.id' => 'DESC')); 
    2020   
     
    6868   $channelData = array('title'       => 'Karamelo eLearning Portal ', 
    6969                'link'        => array('controller' => 'news', 'action' => 'display'), 
    70                 'url'         => array('controller' => 'news', 'action' => 'display'), 
    7170                'description' => 'Latest news on Karamelo', 
    7271                'language'    => 'en-us' 
    7372               ); 
    7473        
    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'; 
    8079       
    8180   $limit      = 15; 
  • trunk/app/controllers/podcasts_controller.php

    r785 r814  
    6464 public function rss($username)  
    6565 {  
    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', 
    6771                'link'           => array('controller' => 'blog', 'action' => $username), 
    68                 'url'            => array('controller' => 'blog', 'action' => $username), 
    69                 'description'    => 'Audio from edublog', 
     72                'description'    => 'Audio from '. $username .' edublog', 
     73                        'itunes:summary' => 'Audio from '. $username .' edublog', 
    7074                'language'       => 'en-us', 
    7175            'copyright'      => 'Chipotle Software, 2008', 
     76                        'generator'      => 'Karamelo Platform', 
    7277                        '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'] 
    7481               ); 
    7582        
    7683   $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')); 
    9390 } 
    9491    
     
    10198    $this->pageTitle = 'Podcast'; 
    10299         
    103     $conditions = array("Podcast.id"=>$podcast_id, "Podcast.status"=>1); 
     100    $conditions = array('Podcast.id'=>$podcast_id, 'Podcast.status'=>1); 
    104101         
    105102    $fields     = array("id", "title", "description", "created", "filename", "length", "duration"); 
     
    107104    $this->set('data', $this->Podcast->find($conditions, $fields)); 
    108105 } 
     106 
    109107 public function  funny() 
    110108 { //eastern egg 
  • trunk/app/views/entries/rss/rss.ctp

    r646 r814  
    55             'link' => array('controller'=>'entries', 'action' => 'view', $item['User']['username'], $item['Entry']['id']), 
    66         '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'] 
    99           ); 
    1010} 
  • trunk/app/views/layouts/rss/default.ctp

    r646 r814  
    11<?php 
    22echo $rss->header(); 
    3 $channel = $rss->channel(array(), $channelData, $items); 
     3 $channel = $rss->channel(array(), $channelData, $items); 
    44echo $rss->document(array(), $channel); 
    55?> 
  • trunk/app/views/podcasts/rss/rss.ctp

    r677 r814  
    44 return array( 
    55      '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']), 
    88      'description' => strip_tags($item['Podcast']['description']), 
    99      'pubDate' => $item['Podcast']['created'], 
     
    1111      'itunes:summary' => strip_tags($item['Podcast']['description'])    
    1212     ); 
    13 } 
    14  
     13}  
     14$rss->addNs('itunes'); 
    1515$this->set('items', $rss->items($podcasts, 'rss_transform')); 
    1616?>