+ $idx = 0;
+
+ while ($subs->fetch()) {
+ $idx++;
+ if ($idx % SUBSCRIPTIONS_PER_ROW == 1) {
+ common_element_start('div', 'row');
+ }
+
+ $other = Profile::staticGet($subs->subscribed);
+
+ common_element_start('a', array('title' => ($other->fullname) ?
+ $other->fullname :
+ $other->nickname,
+ 'href' => $other->profileurl,
+ 'class' => 'subscription'));
+ $avatar = $other->getAvatar(AVATAR_MINI_SIZE);
+ common_element('img', array('src' => (($avatar) ? $avatar->url : common_default_avatar(AVATAR_MINI_SIZE)),
+ 'width' => AVATAR_MINI_SIZE,
+ 'height' => AVATAR_MINI_SIZE,
+ 'class' => 'avatar mini',
+ 'alt' => ($other->fullname) ?
+ $other->fullname :
+ $other->nickname));
+ common_element_end('a');
+
+ if ($idx % SUBSCRIPTIONS_PER_ROW == 0) {
+ common_element_end('div');
+ }
+
+ if ($idx == SUBSCRIPTIONS) {
+ break;