本文整理汇总了PHP中UserStatus::displayStatusMessages方法的典型用法代码示例。如果您正苦于以下问题:PHP UserStatus::displayStatusMessages方法的具体用法?PHP UserStatus::displayStatusMessages怎么用?PHP UserStatus::displayStatusMessages使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserStatus
的用法示例。
在下文中一共展示了UserStatus::displayStatusMessages方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wfAddUserStatusNetwork
function wfAddUserStatusNetwork( $sport_id, $team_id, $text, $count ) {
global $wgUser;
// Don't do anything if the user is blocked or the DB is read-only
if ( $wgUser->isBlocked() || wfReadOnly() ) {
return '';
}
$s = new UserStatus();
$m = $s->addStatus( $sport_id, $team_id, urldecode( $text ) );
return $s->displayStatusMessages( 0, $sport_id, $team_id, $count, 1 );
}
示例2: execute
//.........这里部分代码省略.........
$output .= '</div>';
$output .= '<div class="cleared"></div>';
$output .= '</div>';
$this_count = count( SportsTeams::getUsersByFavorite( $sport_id, $team_id, 7, 0 ) );
$output .= '<div class="fan-top-right">';
$output .= '<h1>' . wfMsg( 'sportsteams-network-fans', $this->network ) . '</h1>';
$output .= '<p style="margin:-8px 0px 0px 0px; color:#797979;">' .
wfMsgExt(
'sportsteams-network-fan-display',
'parsemag',
$this_count,
$view_fans_title->getFullURL( array(
'sport_id' => $sport_id, 'team_id' => $team_id
) ),
$this->network_count
) . '</p>';
$output .= $this->getFans();
$output .= '</div>';
$output .= '<div class="cleared"></div>';
$output .= '</div>';
$output .= '<div class="fan-left">';
// Latest Network User Updates
$updates_show = 25;
$s = new UserStatus();
$output .= '<div class="network-updates">';
$output .= '<h1 class="network-page-title">' .
wfMsg( 'sportsteams-network-latest-thoughts' ) . '</h1>';
$output .= '<div style="margin-bottom:10px;">
<a href="' . SportsTeams::getFanUpdatesURL( $sport_id, $team_id ) . '">' .
wfMsg( 'sportsteams-network-all-thoughts' ) . '</a>
</div>';
// Registered users (whether they're members of the network or not) can
// post new status updates on the network's page from the network's
// page
if( $wgUser->isLoggedIn() ) {
$output .= "\n<script type=\"text/javascript\">
var __sport_id__ = {$sport_id};
var __team_id__ = {$team_id};
var __updates_show__ = {$updates_show};
var __user_status_link__ = '" . SpecialPage::getTitleFor( 'UserStatus' )->getFullURL() . "';</script>\n";
$output .= "<div class=\"user-status-form\">
<span class=\"user-name-top\">{$wgUser->getName()}</span> <input type=\"text\" name=\"user_status_text\" id=\"user_status_text\" size=\"40\" onkeypress=\"detEnter(event)\" maxlength=\"150\" />
<input type=\"button\" value=\"" . wfMsg( 'sportsteams-add-button' ) . '" class="site-button" onclick="add_status()" />
</div>';
}
$output .= '<div id="network-updates">';
$output .= $s->displayStatusMessages(
0, $sport_id, $team_id, $updates_show, 1/*$page*/
);
$output .= '</div>';
$output .= '</div></div>';
$output .= '<div class="fan-right">';
// Network location map
$output .= '<div class="fan-map">';
$output .= '<h1 class="network-page-title">' .
wfMsg( 'sportsteams-network-fan-locations' ) . '</h1>';
$output .= '<div class="gMap" id="gMap"></div>
<div class="gMapInfo" id="gMapInfo"></div>';
$output .= '</div>';
// Top network fans
$output .= '<div class="top-fans">';
$output .= '<h1 class="network-page-title">' .
wfMsg( 'sportsteams-network-top-fans' ) . '</h1>';
$tfr = SpecialPage::getTitleFor( 'TopUsersRecent' );
$output .= "<p class=\"fan-network-sub-text\">
<a href=\"" . $tfr->escapeFullURL( 'period=weekly' ) . '">' .
wfMsg( 'sportsteams-network-top-fans-week' ) .
"</a> -
<a href=\"{$view_fans_title->getFullURL( array( 'sport_id' => $sport_id, 'team_id' => $team_id ))}\">" .
wfMsg( 'sportsteams-network-complete-list' ) . '</a>
</p>';
$output .= $this->getTopFans();
$output .= '</div>';
$output .= '<div class="network-articles">';
$output .= '<h1 class="network-page-title">' .
wfMsg( 'sportsteams-network-articles', $this->network ) . '</h1>';
$output .= '<p class="fan-network-sub-text">';
if ( class_exists( 'BlogPage' ) ) { // @todo CHECKME: is there any point in this check?
$createBlogPage = SpecialPage::getTitleFor( 'CreateBlogPage' );
$output .= '<a href="' . $createBlogPage->escapeFullURL() . '">' .
wfMsg( 'sportsteams-network-write-article' ) . '</a> - ';
}
$output .= "<a href=\"{$homepage_title->getFullURL()}\">" . wfMsg( 'sportsteams-network-main-page' ) . '</a>
</p>';
$output .= $this->getArticles();
$output .= '</div>';
$output .= '</div>';
$output .= '<div class="cleared"></div>';
$wgOut->addHTML( $output );
}