/** * list participants * * @see overlays/overlay.php * * @param array the hosting record * @return some HTML to be inserted into the resulting page */ function &get_list_text($host = NULL) { global $context; // we return some text $text = ''; $to_avoid = NULL; if ($id = Surfer::get_id()) { $to_avoid = 'user:'******'article:' . $host['id'], 0, USERS_LIST_SIZE, 'comma', $to_avoid)) { $text = '<p class="details">' . sprintf(i18n::s('with %s'), Skin::build_list($friends, 'comma')) . '</p>'; } return $text; }
} // the web address if ($item['web_address']) { $text .= ' <foaf:homepage rdf:resource="' . encode_field($item['web_address']) . '" />' . "\n"; } else { $text .= ' <foaf:homepage rdf:resource="' . encode_field(Users::get_permalink($item)) . '" />' . "\n"; } // the user avatar if ($item['avatar_url']) { if ($item['avatar_url'][0] == '/') { $item['avatar_url'] = str_replace('//', '/', $context['url_to_home'] . $context['url_to_root'] . $item['avatar_url']); } $text .= ' <foaf:img rdf:resource="' . encode_field($item['avatar_url']) . '" />' . "\n"; } // list watched users by posts if ($items =& Members::list_users_by_posts_for_member('user:'******'id'], 0, USERS_PER_PAGE, 'raw')) { foreach ($items as $id => $attributes) { $text .= ' <foaf:knows>' . "\n" . ' <foaf:Person>' . "\n" . ' <foaf:name>' . encode_field($attributes['full_name']) . '</foaf:name>' . "\n" . ' <rdfs:seeAlso rdf:resource="' . encode_field($context['url_to_home'] . $context['url_to_root'] . Users::get_url($id, 'describe')) . '" />' . "\n" . ' </foaf:Person>' . "\n" . ' </foaf:knows>' . "\n"; } } $text .= ' </foaf:Person>' . "\n" . '</rdf:RDF>'; // // transfer to the user agent // // handle the output correctly render_raw('text/xml; charset=' . $context['charset']); // suggest a name on download if (!headers_sent()) { $file_name = utf8::to_ascii(Skin::strip($context['page_title']) . '.opml.xml'); Safe::header('Content-Disposition: inline; filename="' . str_replace('"', '', $file_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>'; } // list also editors of parent containers $inherited = ''; $handle = $anchor->get_parent(); while ($handle && ($parent = Anchors::get($handle))) { $handle = $parent->get_parent(); if (($users =& Members::list_users_by_posts_for_member($parent->get_reference(), 0, 50 * USERS_LIST_SIZE, 'raw')) && count($users)) { // browse the list $items = array(); 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 ($parent->is_owned($id, FALSE)) { $suffix .= ' - <span class="details">' . i18n::s('owner') . '</span>';