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


PHP MEMBER::getRealName方法代码示例

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


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

示例1: doSkinVar

 function doSkinVar($skinType, $numberOfWritebacks = 5, $filter = '', $TBorCm = 'all', $numberOfCharacters = 60, $numberOfTitleCharacters = 40, $toadd = "...")
 {
     global $manager, $CONF, $blog;
     if (!is_numeric($numberOfWritebacks)) {
         $filter = $numberOfWritebacks;
         $numberOfWritebacks = 5;
         // defaults to 5
     }
     $b =& $manager->getBlog($CONF['DefaultBlog']);
     $this->defaultblogurl = $b->getURL();
     if (!$this->defaultblogurl) {
         $this->defaultblogurl = $CONF['IndexURL'];
     }
     if ($blog) {
         $b =& $blog;
     }
     $blogid = $b->getID();
     //for select
     $filter = trim($filter);
     if ($filter == 'current') {
         $filter = 'cblog = ' . $blogid;
     } elseif (strstr($filter, '=')) {
         $filter = str_replace('=', '', $filter);
         $filter = ' cblog IN(' . str_replace('/', ',', $filter) . ')';
     } elseif (strstr($filter, '<>')) {
         $filter = str_replace('<>', '', $filter);
         $filter = ' cblog <> ' . str_replace('/', ' AND cblog <> ', $filter);
     }
     setlocale(LC_TIME, $this->getOption('timelocale'));
     $arr_res = array();
     if ($TBorCm != 't') {
         $join = '';
         $query = 'SELECT' . ' c.cnumber as commentid,' . ' c.cuser   as commentator,' . ' c.cbody   as commentbody,' . ' c.citem   as itemid,' . ' c.cmember as memberid,' . ' SUBSTRING(c.ctime, 6, 5) as commentday,' . ' UNIX_TIMESTAMP(c.ctime)  as ctimest';
         if ($EzComment2 = $this->pluginCheck('EzComment2')) {
             if (method_exists($EzComment2, 'getTemplateParts')) {
                 $query .= ', s.comid   as cid, ' . 's.secflg  as secret, ' . 's.module  as modname, ' . 's.userID  as identity ';
                 $join = ' LEFT OUTER JOIN ' . sql_table('plug_ezcomment2') . ' as s ' . ' ON c.cnumber = s.comid ';
             }
         }
         // select
         $query .= ' FROM ' . sql_table('comment') . ' as c ' . $join;
         if ($filter) {
             $query .= ' WHERE ' . $filter;
         }
         $query .= ' ORDER by c.ctime DESC LIMIT 0, ' . $numberOfWritebacks;
         $comments = sql_query($query);
         if (sql_num_rows($comments)) {
             while ($row = sql_fetch_object($comments)) {
                 $content = (array) $row;
                 $tempBody = strip_tags($content['commentbody']);
                 $tempBody = htmlspecialchars($tempBody, ENT_QUOTES, _CHARSET);
                 $tempBody = shorten($tempBody, $numberOfCharacters, $toadd);
                 $tempBody = htmlspecialchars($tempBody, ENT_QUOTES, _CHARSET);
                 $tempBody = str_replace("\r\n", ' ', $tempBody);
                 $tempBody = str_replace("&amp;", '&', $tempBody);
                 $tempBody = str_replace("&gt;", '>', $tempBody);
                 $tempBody = str_replace("&lt;", '<', $tempBody);
                 $content['commentdate'] = strftime($this->getOption('cmdateformat'), $content['ctimest']);
                 $content['commentbody'] = str_replace("&amp;amp;", '&amp;', $tempBody);
                 if (!empty($row->memberid)) {
                     $mem = new MEMBER();
                     $mem->readFromID(intval($row->memberid));
                     $content['commentator'] = $mem->getRealName();
                 }
                 if ($EzComment2) {
                     $bid = intval(getBlogIDFromItemID(intval($comment['itemid'])));
                     if ($EzComment2->getBlogOption($bid, 'secret') == 'yes') {
                         $b = $manager->getBlog($bid);
                         global $member;
                         $judge = $EzComment2->setSecretJudge($bid, $member, $b);
                     }
                 }
                 if ($judge && $content['secret']) {
                     $content = $EzComment2->JudgementCommentSecrets($content, $judge);
                 }
                 /*					$cid  = $row->cnumber;
                 					$ct  = $row->ctimest;
                 					$ctst  = date("y-m-d H:i",$ct);
                 					$text = strip_tags($row->cbody);
                 					$text = htmlspecialchars($text, ENT_QUOTES,_CHARSET);
                 					$ctext = shorten($text,$numberOfCharacters,$toadd);
                  
                 					if (!$row->cmember) $myname = $row->cuser;
                 					else {
                 						$mem = new MEMBER;
                 						$mem->readFromID(intval($row->cmember));
                 						$myname = $mem->getRealName();
                 					}*/
                 //					$itemlink = $this->_createItemLink($row->citem, '');
                 //					$arr_res[$ct] =  "<li>&clubs;<a href=\"".$itemlink."#c".$cid."\">$ctst|".$myname."&gt;".$ctext."</a></li>" ;
                 $itemlink = $this->_createItemLink($content['itemid']);
                 $content['itemlink'] = $itemlink;
                 $arr_res[$content['ctimest']] = TEMPLATE::fill($this->getOption('cmttemplate'), $content);
             }
         }
     }
     //=========================
     if ($manager->pluginInstalled('NP_TrackBack') && $TBorCm != 'c') {
         $query = 'SELECT' . ' t.id        as tbid,' . ' t.title     as entrytitle,' . ' t.excerpt   as expect,' . ' t.url       as tburl,' . ' t.tb_id     as trackbackid,' . ' t.blog_name as blogname,' . ' t.timestamp as tbdate,' . ' SUBSTRING(t.timestamp, 6, 5) as tbday,' . ' UNIX_TIMESTAMP(t.timestamp)  as ttimest' . ' FROM ' . sql_table('plugin_tb') . ' t,' . sql_table('item') . ' i' . ' WHERE t.tb_id = i.inumber';
         if ($this->checkTBVersion()) {
//.........这里部分代码省略.........
开发者ID:NucleusCMS,项目名称:NP_LatestWritebacks,代码行数:101,代码来源:NP_LatestWritebacks.php

示例2: _getUserInfo

function _getUserInfo($username, $password)
{
    // 1. login
    $mem = new MEMBER();
    if (!$mem->login($username, $password)) {
        return _error(1, "Could not log in");
    }
    // 3. return the info
    // Structure returned has nickname, userid, url, email, lastname, firstname
    $newstruct = new xmlrpcval(array("nickname" => new xmlrpcval($mem->getDisplayName(), "string"), "userid" => new xmlrpcval($mem->getID(), "string"), "url" => new xmlrpcval($mem->getURL(), "string"), "email" => new xmlrpcval($mem->getEmail(), "string"), "lastname" => new xmlrpcval("", "string"), "firstname" => new xmlrpcval($mem->getRealName(), "string")), 'struct');
    return new xmlrpcresp($newstruct);
}
开发者ID:hatone,项目名称:Nucleus-v3.64,代码行数:12,代码来源:server.php


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