当前位置: 首页>>代码示例>>PHP>>正文


PHP Members::list_users_by_posts_for_member方法代码示例

本文整理汇总了PHP中Members::list_users_by_posts_for_member方法的典型用法代码示例。如果您正苦于以下问题:PHP Members::list_users_by_posts_for_member方法的具体用法?PHP Members::list_users_by_posts_for_member怎么用?PHP Members::list_users_by_posts_for_member使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Members的用法示例。


在下文中一共展示了Members::list_users_by_posts_for_member方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: sprintf

 /**
  * 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:' . $id;
     }
     // page editors, except target surfer
     if ($friends =& Members::list_users_by_posts_for_member('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;
 }
开发者ID:rair,项目名称:yacs,代码行数:23,代码来源:thread.php

示例2: encode_field

 }
 // 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:' . $item['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) . '"');
 }
开发者ID:rair,项目名称:yacs,代码行数:31,代码来源:describe.php

示例3: array

         // 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>';
开发者ID:rair,项目名称:yacs,代码行数:31,代码来源:select.php


注:本文中的Members::list_users_by_posts_for_member方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。