本文整理匯總了PHP中UserStatus::addStatus方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserStatus::addStatus方法的具體用法?PHP UserStatus::addStatus怎麽用?PHP UserStatus::addStatus使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UserStatus
的用法示例。
在下文中一共展示了UserStatus::addStatus方法的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: fnAddFavoriteTeam
function fnAddFavoriteTeam( $user ) {
if ( isset( $_COOKIE['sports_sid'] ) ) {
$sport_id = $_COOKIE['sports_sid'];
$team_id = $_COOKIE['sports_tid'];
$thought = $_COOKIE['thought'];
if( !$team_id ) {
$team_id = 0;
}
if( $sport_id != 0 ) {
$s = new SportsTeams();
$s->addFavorite( $user->getID(), $sport_id, $team_id );
if( $thought ) {
$b = new UserStatus();
$m = $b->addStatus( $sport_id, $team_id, $thought );
}
}
}
return true;
}