Changeset 11172

Show
Ignore:
Timestamp:
07/11/07 08:12:20 (3 years ago)
Author:
rambo
Message:

inform browsers that feeds are available

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/MidCOM_2_8/org.routamc.photostream/documentation/CHANGES

    r11166 r11172  
    77  which might even break existing functionality. 
    88- All items marked with "+" represent completely new features. 
     9 
     102007-07-11 rambo 
     11  + add <link rel="alternate"> headers for feeds in list handler 
    912 
    10132007-07-10 rambo 
  • branches/MidCOM_2_8/org.routamc.photostream/handler/list.php

    r5267 r11172  
    462462    } 
    463463 
     464    function _alternate_links($base_url) 
     465    { 
     466        $_MIDCOM->add_link_head 
     467        ( 
     468            array 
     469            ( 
     470                'rel'   => 'alternate', 
     471                'type'  => 'application/rss+xml', 
     472                'title' => $this->_l10n->get('rss 2.0 feed'), 
     473                'href'  => "{$base_url}/rss.xml", 
     474            ) 
     475        ); 
     476        $_MIDCOM->add_link_head 
     477        ( 
     478            array 
     479            ( 
     480                'rel'   => 'alternate', 
     481                'type'  => 'application/rss+xml', 
     482                'title' => $this->_l10n->get('rss 1.0 feed'), 
     483                'href'  => "{$base_url}/rss1.xml", 
     484            ) 
     485        ); 
     486        $_MIDCOM->add_link_head 
     487        ( 
     488            array 
     489            ( 
     490                'rel'   => 'alternate', 
     491                'type'  => 'application/rss+xml', 
     492                'title' => $this->_l10n->get('rss 0.91 feed'), 
     493                'href'  => "{$base_url}/rss091.xml", 
     494            ) 
     495        ); 
     496        $_MIDCOM->add_link_head 
     497        ( 
     498            array 
     499            ( 
     500                'rel'   => 'alternate', 
     501                'type'  => 'application/atom+xml', 
     502                'title' => $this->_l10n->get('atom feed'), 
     503                'href'  => "{$base_url}/atom.xml", 
     504            ) 
     505        ); 
     506    } 
     507 
    464508    /** 
    465509     * Helper, updates the context so that we get a complete breadcrum line towards the current 
     
    470514    { 
    471515        $tmp = Array(); 
     516        $prefix =  $_MIDCOM->get_context_data(MIDCOM_CONTEXT_ANCHORPREFIX); 
    472517 
    473518        switch ($handler_id) 
     
    480525                    MIDCOM_NAV_NAME => $this->_request_data['view_title'], 
    481526                ); 
     527                $this->_alternate_links("{$prefix}list/{$this->_request_data['user_url']}"); 
    482528                break; 
    483529            case 'photostream_tags_all': 
     
    488534                    MIDCOM_NAV_NAME => $this->_request_data['view_title'], 
    489535                ); 
     536                $this->_alternate_links("{$prefix}tag/{$this->_request_data['user_url']}"); 
    490537                break; 
    491538            case 'photostream_tag_all': 
     
    501548                    MIDCOM_NAV_NAME => $this->_request_data['view_title'], 
    502549                ); 
     550                $this->_alternate_links("{$prefix}tag/{$this->_request_data['user_url']}/{$this->_request_data['tag']}"); 
    503551                break; 
    504552            case 'photostream_rated_all': 
     
    509557                    MIDCOM_NAV_NAME => $this->_request_data['view_title'], 
    510558                ); 
     559                $this->_alternate_links("{$prefix}rated/{$this->_request_data['user_url']}/{$this->_request_data['rating']}"); 
    511560                break; 
    512561        }