Plugin Directory

Changeset 207210


Ignore:
Timestamp:
02/17/2010 07:15:49 PM (16 years ago)
Author:
zeeg
Message:

Merge in changes from Git

Location:
lifestream/trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • lifestream/trunk/extensions/googlereader/extension.inc.php

    r206728 r207210  
    99    const NS            = 'http://www.google.com/schemas/reader/atom/';
    1010    const HAS_EXCERPTS  = true;
     11    const AUTHOR        = 'David Cramer, Kyle McNally';
    1112   
    1213    function __toString()
     
    2526            'url' => array($this->lifestream->__('Website URL:'), true, '', ''),
    2627            'user_id' => array($this->lifestream->__('User ID:'), null, '', ''),
     28            'broadcast' => array($this->lifestream->__('Include Shared'), false, true, false),
     29            'starred' => array($this->lifestream->__('Include Starred'), false, true, false)
    2730        );
    2831    }
     
    3134    {
    3235        if (!$this->get_option('user_id')) return $this->get_option('url');
    33         return 'http://www.google.com/reader/public/atom/user%2F'.$this->get_option('user_id').'%2Fstate%2Fcom.google%2Fbroadcast';
     36        if ( $this->get_option('broadcast') && $this->get_option('starred') )
     37            return array(
     38                'http://www.google.com/reader/public/atom/user%2F'.$this->get_option('user_id').'%2Fstate%2Fcom.google%2Fbroadcast',
     39                'http://www.google.com/reader/public/atom/user%2F'.$this->get_option('user_id').'%2Fstate%2Fcom.google%2Fstarred'
     40            );
     41        elseif ( $this->get_option('starred') )
     42            return 'http://www.google.com/reader/public/atom/user%2F'.$this->get_option('user_id').'%2Fstate%2Fcom.google%2Fstarred';
     43        else
     44            return 'http://www.google.com/reader/public/atom/user%2F'.$this->get_option('user_id').'%2Fstate%2Fcom.google%2Fbroadcast';
     45       
    3446    }
    3547   
  • lifestream/trunk/extensions/twitter/extension.inc.php

    r191677 r207210  
    88    const CAN_GROUP = false;
    99    const DESCRIPTION = 'Specifying your password will allow Lifestream to pull in protected updates from your profile. Your password is stored in plaintext in the database, so only do this is you have no other option.';
     10    const AUTHOR = 'David Cramer, Kyle McNally';
    1011   
    1112    function __toString()
     
    1920            'username' => array($this->lifestream->__('Username:'), true, '', ''),
    2021            'password' => array($this->lifestream->__('Password:'), false, '', ''),
     22            'hide_username' => array($this->lifestream->__('Hide Username'), false, true, false),
    2123            'hide_replies' => array($this->lifestream->__('Hide Replies'), false, true, false),
    2224        );
     
    9092    function render_item($row, $item)
    9193    {
    92         return $this->parse_search_term($this->parse_users($this->parse_urls(htmlspecialchars($item['description'])))) . ' ['.$this->lifestream->get_anchor_html(htmlspecialchars($this->get_option('username')), $item['link']).']';
     94        $url = $this->parse_search_term($this->parse_users($this->parse_urls(htmlspecialchars($item['description']))));
     95        if($this->get_option('hide_username')) return $url;
     96        else return $url . ' ['.$this->lifestream->get_anchor_html(htmlspecialchars($this->get_option('username')), $item['link']).']';
    9397    }
    9498   
  • lifestream/trunk/inc/labels.php

    r196391 r207210  
    133133    {
    134134        return $this->lifestream->__('%1$s ate %3$s.', $this->get_user_label(), $this->get_feed_label(), $this->get_single_link());
     135    }
     136}
     137
     138class Lifestream_DrankLabel extends Lifestream_Label
     139{
     140    function get_label_single()
     141    {
     142        return $this->lifestream->__('Drank %2$s.', $this->get_feed_label(), $this->get_single_link());
     143    }
     144    function get_label_single_user()
     145    {
     146        return $this->lifestream->__('%1$s drank %3$s.', $this->get_user_label(), $this->get_feed_label(), $this->get_single_link());
    135147    }
    136148}
Note: See TracChangeset for help on using the changeset viewer.