- $sub = DB_DataObject::factory('subscriptions');
- $sub->subscriber = $profile->id;
-
- # We ask for an extra one to know if we need to do another page
-
- $sub->limit((($page-1)*SUBSCRIPTIONS_PER_PAGE)+1, SUBSCRIPTIONS_PER_PAGE + 1);
-
- $subs_count = $subs->find();
-
- common_start_element('div', 'subscriptions');
-
- $idx = 0;
-
- while ($subs->fetch()) {
- $idx++;
- if ($idx % SUBSCRIPTIONS_PER_ROW == 1) {
- common_start_element('div', 'row');
- }
-
- common_start_element('a', array('title' => $subs->fullname ||
- $subs->nickname,
- 'href' => $subs->profileurl,
- 'class' => 'subscription'));
- $avatar = $subs->getAvatar(AVATAR_STREAM_SIZE);
- common_element('img', array('src' => (($avatar) ? $avatar->url : DEFAULT_STREAM_AVATAR),
- 'width' => AVATAR_STREAM_SIZE,
- 'height' => AVATAR_STREAM_SIZE,
- 'class' => 'avatar stream'));
- common_end_element('a');