Plugin Directory

Changeset 194062


Ignore:
Timestamp:
01/14/2010 10:32:05 PM (16 years ago)
Author:
zeeg
Message:

Some initial support for buddypress: Front page will do show_owners. Added show_owners to get_events options. Owner names will become profile links in BP.

Location:
lifestream/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • lifestream/trunk/inc/core.php

    r193742 r194062  
    120120        if (count($this->data) > 1)
    121121        {
    122             if ($this->lifestream->get_option('show_owners'))
     122            if (@$options['show_owners'] || $this->lifestream->get_option('show_owners'))
    123123            {
    124124                $label = $label_inst->get_label_plural_user();
     
    131131        else
    132132        {
    133             if ($this->lifestream->get_option('show_owners'))
     133            if (@$options['show_owners'] || $this->lifestream->get_option('show_owners'))
    134134            {
    135135                $label = $label_inst->get_label_single_user();
     
    653653        }
    654654        add_feed('lifestream-feed', 'lifestream_rss_feed');
     655
     656        $this->is_buddypress = (function_exists('bp_is_blog_page') ? true : false);
    655657
    656658        // If this is an update we need to force reactivation
  • lifestream/trunk/inc/labels.php

    r193355 r194062  
    2222   
    2323    // backwards compatibility
    24     function _get_user_label() { return $this->get_user_label(); }
     24    function _get_user_label()
     25    {
     26        return $this->get_user_label();
     27    }
    2528   
    2629    function get_single_link()
     
    3639    function get_user_label()
    3740    {
     41        if ($this->lifestream->is_buddypress)
     42        {
     43            return $this->lifestream->get_anchor_html(htmlspecialchars($this->event->owner), htmlspecialchars(bp_core_get_userurl($this->event->owner_id)));
     44        }
    3845        return $this->event->owner;
    3946    }
  • lifestream/trunk/inc/widget.php

    r193666 r194062  
    2828    echo $before_title . ($options['title'] ? apply_filters('widget_title', $options['title']) : $lifestream->__('Lifestream')) . $after_title;
    2929
    30     lifestream_sidebar_widget(array(
     30    $args = array(
    3131        'limit'=>$options['amount'],
    3232        'feed_ids'=>$options['feeds'],
     
    3535        'event_total_max'=>-1,
    3636        'date_interval'=>-1,
    37     ));
     37    );
     38
     39    if ($lifestream->is_buddypress && is_home())
     40    {
     41        $args['show_owners'] = 1;
     42    }
     43    lifestream_sidebar_widget($args);
    3844    // Do stuff for this widget, drawing data from $options[$number]
    3945
  • lifestream/trunk/lifestream.php

    r193745 r194062  
    2121define('LIFESTREAM_PLUGIN_FILE', plugin_basename(__FILE__));
    2222define('LIFESTREAM_PATH', dirname(__FILE__));
     23define('LIFESTREAM_URL', plugins_url($path = '/'.LIFESTREAM_PATH));
    2324define('LIFESTREAM_FEEDS_PER_PAGE', 10);
    2425define('LIFESTREAM_EVENTS_PER_PAGE', 25);
Note: See TracChangeset for help on using the changeset viewer.