if (isset($user['full_name']) && $user['full_name']) { $label = $user['full_name'] . ' (' . $user['nick_name'] . ')'; } else { $label = $user['nick_name']; } // surfer cannot be deselected if ($anchor->is_owned($id, FALSE)) { $suffix .= ' - <span class="details">' . i18n::s('owner') . '</span>'; } // format the item $new_users[$url] = array($prefix, $label, $suffix, $type, $icon); } // display attached users with unlink buttons $context['text'] .= Skin::build_list($new_users, 'compact') . '</div>'; // the current list of linked users } elseif (!strncmp($anchor->get_reference(), 'user:'******'raw')) && count($users)) { // splash message $context['text'] .= '<div style="margin-top: 2em;">' . sprintf(i18n::s('Persons followed by %s'), $anchor->get_title()); // browse the list foreach ($users as $id => $user) { // make an url $url = Users::get_permalink($user); // gather information on this user $prefix = $suffix = $type = $icon = ''; if (isset($user['full_name']) && $user['full_name']) { $label = $user['full_name'] . ' (' . $user['nick_name'] . ')'; } else { $label = $user['nick_name']; } // surfer cannot be deselected if ($anchor->is_owned($id, FALSE)) {
} elseif ($action == 'watch') { render_raw(); // we return some HTML $output = ''; // horizontal menu $menu = array(); // manage command if (Surfer::is_associate() || Surfer::get_id() == $item['id']) { Skin::define_img('USERS_WATCH_IMG', 'users/watch.gif'); $menu[] = Skin::build_link(Users::get_url('user:'******'id'], 'select'), USERS_WATCH_IMG . i18n::s('Manage followers'), 'span'); } // build the menu $output .= Skin::finalize_list($menu, 'menu_bar'); // list watched users by posts $watched = ''; if ($items =& Members::list_connections_for_user('user:'******'id'], 0, 200, 'watch')) { if (is_array($items)) { $items = Skin::build_list($items, 'decorated'); } $watched .= $items; } elseif (Surfer::get_id() == $item['id']) { $watched .= '<p>' . i18n::s('Click on the link above to follow someone.') . '</p>'; } else { $watched .= '<p>' . sprintf(i18n::s('%s is not yet following other persons.'), $item['full_name']) . '</p>'; } // the list of followers $followers = ''; if ($items = Members::list_watchers_by_name_for_anchor('user:'******'id'], 0, 1000, 'compact')) { if (is_array($items)) { $items = Skin::build_list($items, 'compact'); }