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


PHP XoopsUser::attachsig方法代码示例

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


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

示例1: array

 $posterarr = array();
 if (0 != $eachpost->uid()) {
     if (!isset($foundusers['user' . $eachpost->uid()])) {
         $eachposter = new XoopsUser($eachpost->uid());
         $foundusers['user' . $eachpost->uid()] =& $eachposter;
     } else {
         $eachposter =& $foundusers['user' . $eachpost->uid()];
     }
     $poster_rank = $eachposter->rank();
     if (!empty($poster_rank['image'])) {
         $poster_rank['image'] = '<img src="' . XOOPS_UPLOAD_URL . '/' . $poster_rank['image'] . '" alt="" />';
     }
     if ($eachposter->isActive()) {
         $poster_status = $eachposter->isOnline() ? _MD_XHNEWBB_ONLINE : '';
         $posterarr = array('poster_uid' => $eachposter->getVar('uid'), 'poster_uname' => '<a href="' . XOOPS_URL . '/userinfo.php?uid=' . $eachposter->getVar('uid') . '">' . $eachposter->getVar('uname') . '</a>', 'poster_avatar' => $eachposter->getVar('user_avatar'), 'poster_from' => $eachposter->getVar('user_from'), 'poster_regdate' => formatTimestamp($eachposter->getVar('user_regdate'), 's'), 'poster_postnum' => $eachposter->getVar('posts'), 'poster_sendpmtext' => sprintf(_SENDPMTO, $eachposter->getVar('uname')), 'poster_rank_title' => $poster_rank['title'], 'poster_rank_image' => @$poster_rank['image'], 'poster_status' => $poster_status);
         if (1 == $forumdata['allow_sig'] && $eachpost->attachsig() == 1 && $eachposter->attachsig() == 1) {
             $myts =& MytextSanitizer::getInstance();
             $post_text .= '<p><br />----------------<br />' . $myts->displayTarea($eachposter->getVar('user_sig', 'N'), 0, 1, 1, $xoopsModuleConfig['xhnewbb_allow_sigimg']) . '</p>';
         }
         if (is_object(@$xoopsUser)) {
             $can_edit = $isadminormod || $eachpost->uid() == $xoopsUser->getVar('uid') && time() < $eachpost->posttime() + $xoopsModuleConfig['xhnewbb_selfeditlimit'] ? true : false;
             $can_delete = $isadminormod || $eachpost->uid() == $xoopsUser->getVar('uid') && time() < $eachpost->posttime() + $xoopsModuleConfig['xhnewbb_selfdellimit'] ? true : false;
         } else {
             $can_edit = $can_delete = false;
         }
         $can_reply = $can_post;
     }
 }
 // this is a post from guests or quitted users
 if (empty($posterarr)) {
     $posterarr = array('poster_uid' => 0, 'poster_uname' => $xoopsConfig['anonymous'], 'poster_avatar' => '', 'poster_from' => '', 'poster_regdate' => '', 'poster_postnum' => '', 'poster_sendpmtext' => '', 'poster_rank_title' => '', 'poster_rank_image' => '');
开发者ID:BackupTheBerlios,项目名称:peakxoops-svn,代码行数:31,代码来源:viewtopic.php


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