• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wfMsgHtml函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中wfMsgHtml函数的典型用法代码示例。如果您正苦于以下问题:PHP wfMsgHtml函数的具体用法?PHP wfMsgHtml怎么用?PHP wfMsgHtml使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: doSubmit

 function doSubmit()
 {
     global $wgOut, $wgRequest, $wgUser;
     // Link an author to a wiki user
     if (!$wgUser->matchEditToken($wgRequest->getVal('linktoken'), 'link')) {
         $wgOut->addWikiMsg('code-author-badtoken');
         return;
     }
     if (strlen($this->mTarget) && $wgRequest->getCheck('newname')) {
         $user = User::newFromName($this->mTarget, false);
         if (!$user || !$user->getId()) {
             $wgOut->addWikiMsg('nosuchusershort', $this->mTarget);
             return;
         }
         $this->mRepo->linkUser($this->mAuthor, $user);
         $userlink = $this->skin->userLink($user->getId(), $user->getName());
         $wgOut->addHTML('<div class="successbox">' . wfMsgHtml('code-author-success', $this->authorLink($this->mAuthor), $userlink) . '</div>');
         // Unlink an author to a wiki users
     } elseif ($wgRequest->getVal('unlink')) {
         if (!$this->mUser) {
             $wgOut->addHTML(wfMsg('code-author-orphan', $this->authorLink($this->mAuthor)));
             return;
         }
         $this->mRepo->unlinkUser($this->mAuthor);
         $wgOut->addHTML('<div class="successbox">' . wfMsgHtml('code-author-unlinksuccess', $this->authorLink($this->mAuthor)) . '</div>');
     }
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:27,代码来源:CodeRevisionAuthorLink.php


示例2: wfIFI_uploadWarning

function wfIFI_uploadWarning($u, $warning)
{
    global $wgOut;
    global $wgUseCopyrightUpload;
    $u->mSessionKey = $u->stashSession();
    if (!$u->mSessionKey) {
        # Couldn't save file; an error has been displayed so let's go.
        return;
    }
    $wgOut->addHTML("<h2>" . wfMsgHtml('uploadwarning') . "</h2>\n");
    $wgOut->addHTML("<ul class='warning'>{$warning}</ul><br />\n");
    $save = wfMsgHtml('savefile');
    $reupload = wfMsgHtml('reupload');
    $iw = wfMsgWikiHtml('ignorewarning');
    $reup = wfMsgWikiHtml('reuploaddesc');
    $titleObj = Title::makeTitle(NS_SPECIAL, 'Upload');
    $action = $titleObj->escapeLocalURL('action=submit');
    if ($wgUseCopyrightUpload) {
        $copyright = "\n    <input type='hidden' name='wpUploadCopyStatus' value=\"" . htmlspecialchars($u->mUploadCopyStatus) . "\" />\n    <input type='hidden' name='wpUploadSource' value=\"" . htmlspecialchars($u->mUploadSource) . "\" />\n    ";
    } else {
        $copyright = "";
    }
    $wgOut->addHTML("\n    <form id='uploadwarning' method='post' enctype='multipart/form-data' action='{$action}'>\n        <input type='hidden' name='wpIgnoreWarning' value='1' />\n        <input type='hidden' name='wpSessionKey' value=\"" . htmlspecialchars($u->mSessionKey) . "\" />\n        <input type='hidden' name='wpUploadDescription' value=\"" . htmlspecialchars($u->mUploadDescription) . "\" />\n        <input type='hidden' name='wpLicense' value=\"" . htmlspecialchars($u->mLicense) . "\" />\n        <input type='hidden' name='wpDestFile' value=\"" . htmlspecialchars($u->mDestFile) . "\" />\n        <input type='hidden' name='wpWatchu' value=\"" . htmlspecialchars(intval($u->mWatchu)) . "\" />\n    {$copyright}\n    <table border='0'>\n        <tr>\n            <tr>\n                <td align='right'>\n                    <input tabindex='2' type='submit' name='wpUpload' value=\"{$save}\" />\n                </td>\n                <td align='left'>{$iw}</td>\n            </tr>\n        </tr>\n    </table></form>\n" . wfMsg('importfreeimages_returntoform', $_SERVER["HTTP_REFERER"]));
    //  $_SERVER["HTTP_REFERER"]; -- javascript.back wasn't working for some reason... hmph.
}
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:25,代码来源:ImportFreeImages.php


示例3: formatResult

 function formatResult($skin, $result)
 {
     global $wgUser, $wgContLang;
     $fromObj = Title::makeTitle($result->namespace, $result->title);
     if (isset($result->rd_title)) {
         $toObj = Title::makeTitle($result->rd_namespace, $result->rd_title);
     } else {
         $blinks = $fromObj->getBrokenLinksFrom();
         # TODO: check for redirect, not for links
         if ($blinks) {
             $toObj = $blinks[0];
         } else {
             $toObj = false;
         }
     }
     // $toObj may very easily be false if the $result list is cached
     if (!is_object($toObj)) {
         return '<s>' . $skin->makeLinkObj($fromObj) . '</s>';
     }
     $from = $skin->makeKnownLinkObj($fromObj, '', 'redirect=no');
     $edit = $skin->makeKnownLinkObj($fromObj, wfMsgHtml('brokenredirects-edit'), 'action=edit');
     $to = $skin->makeBrokenLinkObj($toObj);
     $arr = $wgContLang->getArrow();
     $out = "{$from} {$edit}";
     if ($wgUser->isAllowed('delete')) {
         $delete = $skin->makeKnownLinkObj($fromObj, wfMsgHtml('brokenredirects-delete'), 'action=delete');
         $out .= " {$delete}";
     }
     $out .= " {$arr} {$to}";
     return $out;
 }
开发者ID:Jobava,项目名称:diacritice-meta-repo,代码行数:31,代码来源:SpecialBrokenRedirects.php


示例4: addPreferences

 /**
  * GetPreferences hook
  *
  * Add module-releated items to the preferences
  */
 public static function addPreferences($user, $defaultPreferences)
 {
     $defaultPreferences['jsbreadcrumbs-showcrumbs'] = array('type' => 'toggle', 'label-message' => 'prefs-jsbreadcrumbs-showcrumbs', 'section' => 'rendering/jsbreadcrumbs');
     $defaultPreferences['jsbreadcrumbs-showsite'] = array('type' => 'toggle', 'label-message' => 'prefs-jsbreadcrumbs-showsite', 'section' => 'rendering/jsbreadcrumbs');
     $defaultPreferences['jsbreadcrumbs-numberofcrumbs'] = array('type' => 'int', 'min' => 1, 'max' => 20, 'section' => 'rendering/jsbreadcrumbs', 'help' => wfMsgHtml('prefs-jsbreadcrumbs-numberofcrumbs-max'), 'label-message' => 'prefs-jsbreadcrumbs-numberofcrumbs');
     return true;
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:12,代码来源:JSBreadCrumbs.hooks.php


示例5: getFormattedValue

 /**
  * (non-PHPdoc)
  * @see EPPager::getFormattedValue()
  */
 protected function getFormattedValue($name, $value)
 {
     switch ($name) {
         case 'id':
             $value = Linker::linkKnown(SpecialPage::getTitleFor('Student', $value), htmlspecialchars($this->getLanguage()->formatNum($value, true)));
             break;
         case 'user_id':
             $user = User::newFromId($value);
             $name = $user->getRealName() === '' ? $user->getName() : $user->getRealName();
             $value = Linker::userLink($value, $name) . Linker::userToolLinks($value, $name);
             break;
         case 'first_enroll':
         case 'last_active':
             $value = htmlspecialchars($this->getLanguage()->date($value));
             break;
         case 'active_enroll':
             $value = wfMsgHtml($value === '1' ? 'epstudentpager-yes' : 'epstudentpager-no');
             break;
         case '_courses_current':
             $value = $this->getLanguage()->pipeList(array_map(function (EPCourse $course) {
                 return $course->getLink();
             }, $this->currentObject->getCoursesWithState('current', 'name')));
             break;
     }
     return $value;
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:30,代码来源:EPStudentPager.php


示例6: getPageHeader

 /**
  * Show a drop down list to select a group as well as a user name
  * search box.
  * @todo localize
  */
 function getPageHeader()
 {
     global $wgScript;
     // Various variables used for the form
     $action = htmlspecialchars($wgScript);
     $title = Title::makeTitle(NS_SPECIAL, 'Listusers');
     $special = htmlspecialchars($title->getPrefixedDBkey());
     // form header
     $out = '<form method="get" action="' . $action . '">' . '<input type="hidden" name="title" value="' . $special . '" />' . wfMsgHtml('groups-editgroup-name') . '<select name="group">';
     // get all group names and IDs
     $groups = User::getAllGroups();
     // we want a default empty group
     $out .= '<option value=""></option>';
     // build the dropdown list menu using datas from the database
     foreach ($groups as $group) {
         $selected = $group == $this->requestedGroup;
         $out .= wfElement('option', array_merge(array('value' => $group), $selected ? array('selected' => 'selected') : array()), User::getGroupName($group));
     }
     $out .= '</select> ';
     $out .= wfMsgHtml('specialloguserlabel') . '<input type="text" name="username" /> ';
     // OK button, end of form.
     $out .= '<input type="submit" /></form>';
     // congratulations the form is now build
     return $out;
 }
开发者ID:BackupTheBerlios,项目名称:openzaurus-svn,代码行数:30,代码来源:SpecialListusers.php


示例7: showRequestForm

 /**
  * Show a nice form for the user to request a confirmation mail
  */
 function showRequestForm()
 {
     global $wgOut, $wgUser, $wgLang, $wgRequest;
     if ($wgRequest->wasPosted() && $wgUser->matchEditToken($wgRequest->getText('token'))) {
         $ok = $wgUser->sendConfirmationMail();
         if (WikiError::isError($ok)) {
             $wgOut->addWikiMsg('confirmemail_sendfailed', $ok->toString());
         } else {
             $wgOut->addWikiMsg('confirmemail_sent');
         }
     } else {
         if ($wgUser->isEmailConfirmed()) {
             $time = $wgLang->timeAndDate($wgUser->mEmailAuthenticated, true);
             $wgOut->addWikiMsg('emailauthenticated', $time);
         }
         if ($wgUser->isEmailConfirmationPending()) {
             $wgOut->addWikiMsg('confirmemail_pending');
         }
         $wgOut->addWikiMsg('confirmemail_text');
         $self = SpecialPage::getTitleFor('Confirmemail');
         $form = wfOpenElement('form', array('method' => 'post', 'action' => $self->getLocalUrl()));
         $form .= wfHidden('token', $wgUser->editToken());
         $form .= wfSubmitButton(wfMsgHtml('confirmemail_send'));
         $form .= wfCloseElement('form');
         $wgOut->addHtml($form);
     }
 }
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:30,代码来源:SpecialConfirmemail.php


示例8: execute

 function execute()
 {
     global $wgOut, $wgLang;
     $authors = $this->mRepo->getAuthorList();
     $repo = $this->mRepo->getName();
     $text = wfMsg('code-authors-text') . "\n\n";
     $text .= '<strong>' . wfMsg('code-author-total', $wgLang->formatNum($this->mRepo->getAuthorCount())) . "</strong>\n";
     $wgOut->addWikiText($text);
     $wgOut->addHTML('<table class="wikitable">' . '<tr><th>' . wfMsgHtml('code-field-author') . '</th><th>' . wfMsgHtml('code-author-lastcommit') . '</th></tr>');
     foreach ($authors as $committer) {
         if ($committer) {
             $wgOut->addHTML("<tr><td>");
             $author = $committer["author"];
             $text = "[[Special:Code/{$repo}/author/{$author}|{$author}]]";
             $user = $this->mRepo->authorWikiUser($author);
             if ($user) {
                 $title = htmlspecialchars($user->getUserPage()->getPrefixedText());
                 $name = htmlspecialchars($user->getName());
                 $text .= " ([[{$title}|{$name}]])";
             }
             $wgOut->addWikiText($text);
             $wgOut->addHTML("</td><td>{$wgLang->timeanddate($committer['lastcommit'], true)}</td></tr>");
         }
     }
     $wgOut->addHTML('</table>');
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:26,代码来源:CodeAuthorListView.php


示例9: getNavItem

 /**
  * @static
  * @param  $repo CodeRepository
  * @return string
  */
 public static function getNavItem($repo)
 {
     global $wgLang, $wgUser;
     $name = $repo->getName();
     $code = SpecialPage::getTitleFor('Code', $name);
     $links[] = "[[{$code}/comments|" . wfMsgHtml('code-notes') . "]]";
     $links[] = "[[{$code}/statuschanges|" . wfMsgHtml('code-statuschanges') . "]]";
     if ($wgUser->getId()) {
         $author = $repo->wikiUserAuthor($wgUser->getName());
         if ($author !== false) {
             $links[] = "[[{$code}/author/{$author}|" . wfMsgHtml('code-mycommits') . "]]";
         }
     }
     if ($wgUser->isAllowed('codereview-post-comment')) {
         $userName = $wgUser->getName();
         $links[] = "[[{$code}/comments/author/{$userName}|" . wfMsgHtml('code-mycomments') . "]]";
     }
     $links[] = "[[{$code}/tag|" . wfMsgHtml('code-tags') . "]]";
     $links[] = "[[{$code}/author|" . wfMsgHtml('code-authors') . "]]";
     $links[] = "[[{$code}/status|" . wfMsgHtml('code-status') . "]]";
     $links[] = "[[{$code}/releasenotes|" . wfMsgHtml('code-releasenotes') . "]]";
     $links[] = "[[{$code}/stats|" . wfMsgHtml('code-stats') . "]]";
     if ($wgUser->isAllowed('repoadmin')) {
         $links[] = "[[Special:RepoAdmin/{$name}|" . wfMsgHtml('repoadmin-nav') . "]]";
     }
     $text = "'''[[{$code}|{$name}]]''' " . wfMsg('parentheses', $wgLang->pipeList($links));
     return $text;
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:33,代码来源:CodeRepoListView.php


示例10: getContributorsText

 public function getContributorsText($title)
 {
     global $wgUser, $wgLang;
     $this->target = $title;
     $contribText = '';
     if ($this->target->exists()) {
         $total = 0;
         $skin = $wgUser->getSkin();
         $link = $skin->makeKnownLinkObj($this->target);
         $contribText .= '<h2>' . wfMsgHtml('contributors-subtitle', $link) . '</h2>';
         list($contributors, $others) = $this->getMainContributors($title);
         $contribText .= '<ul>';
         foreach ($contributors as $username => $info) {
             list($id, $count) = $info;
             $line = $skin->userLink($id, $username) . $skin->userToolLinks($id, $username);
             $line .= ' [' . $wgLang->formatNum($count) . ']';
             $contribText .= '<li>' . $line . '</li>';
         }
         $contribText .= '</ul>';
         if ($others > 0) {
             $others = $wgLang->formatNum($others);
             $contribText .= wfMsgNoTrans('contributors-others-long', $others);
         }
     } else {
         $contribText .= '<p>' . htmlspecialchars(wfMsg('contributors-nosuchpage', $this->target->getPrefixedText())) . '</p>';
     }
     return preg_replace('/"/', '\\"', $contribText);
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:28,代码来源:ContributorsAddonClass.php


示例11: makeActionText

 /**
  * Generate the log action text corresponding to a patrol log item
  *
  * @param Title $title Title of the page that was patrolled
  * @param array $params Log parameters (from logging.log_params)
  * @param Skin $skin Skin to use for building links, etc.
  * @return string
  */
 public static function makeActionText($title, $params, $skin)
 {
     list($cur, , $auto) = $params;
     if (is_object($skin)) {
         # Standard link to the page in question
         $link = $skin->makeLinkObj($title);
         if ($title->exists()) {
             # Generate a diff link
             $bits[] = 'oldid=' . urlencode($cur);
             $bits[] = 'diff=prev';
             $bits = implode('&', $bits);
             $diff = $skin->makeKnownLinkObj($title, htmlspecialchars(wfMsg('patrol-log-diff', $cur)), $bits);
         } else {
             # Don't bother with a diff link, it's useless
             $diff = htmlspecialchars(wfMsg('patrol-log-diff', $cur));
         }
         # Indicate whether or not the patrolling was automatic
         $auto = $auto ? wfMsgHtml('patrol-log-auto') : '';
         # Put it all together
         return wfMsgHtml('patrol-log-line', $diff, $link, $auto);
     } else {
         $text = $title->getPrefixedText();
         return wfMsgForContent('patrol-log-line', wfMsgHtml('patrol-log-diff', $cur), "[[{$text}]]", '');
     }
 }
开发者ID:ruizrube,项目名称:spdef,代码行数:33,代码来源:PatrolLog.php


示例12: linkStatus

 function linkStatus()
 {
     if (!$this->mUser) {
         return wfMsg('code-author-orphan', $this->authorLink($this->mAuthor));
     }
     return wfMsgHtml('code-author-haslink', $this->skin->userLink($this->mUser->getId(), $this->mUser->getName()) . $this->skin->userToolLinks($this->mUser->getId(), $this->mUser->getName(), false, Linker::TOOL_LINKS_EMAIL));
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:7,代码来源:CodeRevisionAuthorView.php


示例13: getForm

	/**
	 * Returns HTML5 output of the form
	 * GLOBALS: $wgLang, $wgScript
	 * @return string
	 */
	protected function getForm() {
		global $wgLang, $wgScript;

		$form = Xml::tags( 'form',
			array(
				'action' => $wgScript,
				'method' => 'get'
			),

			'<table><tr><td>' .
				wfMsgHtml( 'translate-page-language' ) .
			'</td><td>' .
				TranslateUtils::languageSelector( $wgLang->getCode(), $this->options['language'] ) .
			'</td></tr><tr><td>' .
				wfMsgHtml( 'translate-magic-module' ) .
			'</td><td>' .
				$this->moduleSelector( $this->options['module'] ) .
			'</td></tr><tr><td colspan="2">' .
				Xml::submitButton( wfMsg( 'translate-magic-submit' ) ) . ' ' .
				Xml::submitButton( wfMsg( 'translate-magic-cm-export' ), array( 'name' => 'export' ) ) .
			'</td></tr></table>' .
			Html::hidden( 'title', $this->getTitle()->getPrefixedText() )
		);
		return $form;
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:30,代码来源:SpecialMagic.php


示例14: wfSpamDiffToolOnDiffView

function wfSpamDiffToolOnDiffView( $diffEngine, $oldRev, $newRev ) {
	global $wgOut, $wgUser, $wgSpamBlacklistArticle;

	$sb = Title::newFromDBKey( $wgSpamBlacklistArticle );
	if ( !$sb->userCan( 'edit' ) ) {
		return true;
	}

	if ( !$oldRev || !$newRev ) {
		return true;
	}

	$wgOut->addHTML(
		'<table style="width:100%"><tr><td style="width:50%"></td><td style="width:50%">
		<div style="text-align:center">[' . $wgUser->getSkin()->link(
			SpecialPage::getTitleFor( 'SpamDiffTool' ),
			wfMsgHtml( 'spamdifftool_spam_link_text' ),
			array(),
			array(
				'target' => $diffEngine->getTitle()->getPrefixedDBkey(),
				'oldid2' => $oldRev->getId(),
				'diff2' => $newRev->getId(),
				'returnto' => $_SERVER['QUERY_STRING']
			) ) .
		']</div></td></tr></table>' );

	return true;
}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:28,代码来源:SpamDiffTool.php


示例15: show

 /**
  * @param WebRequest $request
  */
 function show($request)
 {
     global $wgOut, $wgUser;
     $first = $this->revisions[0];
     $wgOut->addWikiText(wfMsg('revdelete-selected', $this->page->getPrefixedText()));
     $wgOut->addHtml("<ul>");
     foreach ($this->revisions as $revid) {
         $rev = Revision::newFromTitle($this->page, $revid);
         $wgOut->addHtml($this->historyLine($rev));
         $bitfields[] = $rev->mDeleted;
         // FIXME
     }
     $wgOut->addHtml("</ul>");
     $wgOut->addWikiText(wfMsg('revdelete-text'));
     $items = array(wfInputLabel(wfMsg('revdelete-log'), 'wpReason', 'wpReason', 60), wfSubmitButton(wfMsg('revdelete-submit')));
     $hidden = array(wfHidden('wpEditToken', $wgUser->editToken()), wfHidden('target', $this->page->getPrefixedText()));
     foreach ($this->revisions as $revid) {
         $hidden[] = wfHidden('oldid[]', $revid);
     }
     $special = Title::makeTitle(NS_SPECIAL, 'Revisiondelete');
     $wgOut->addHtml(wfElement('form', array('method' => 'post', 'action' => $special->getLocalUrl('action=submit'))));
     $wgOut->addHtml('<fieldset><legend>' . wfMsgHtml('revdelete-legend') . '</legend>');
     foreach ($this->checks as $item) {
         list($message, $name, $field) = $item;
         $wgOut->addHtml('<div>' . wfCheckLabel(wfMsg($message), $name, $name, $rev->isDeleted($field)) . '</div>');
     }
     $wgOut->addHtml('</fieldset>');
     foreach ($items as $item) {
         $wgOut->addHtml('<p>' . $item . '</p>');
     }
     foreach ($hidden as $item) {
         $wgOut->addHtml($item);
     }
     $wgOut->addHtml('</form>');
 }
开发者ID:k-hasan-19,项目名称:wiki,代码行数:38,代码来源:SpecialRevisiondelete.php


示例16: wfSpecialRestrictUser

function wfSpecialRestrictUser($par = null)
{
    global $wgOut, $wgRequest;
    $user = $userOrig = null;
    if ($par) {
        $userOrig = $par;
    } elseif ($wgRequest->getVal('user')) {
        $userOrig = $wgRequest->getVal('user');
    } else {
        $wgOut->addHTML(RestrictUserForm::selectUserForm());
        return;
    }
    $isIP = User::isIP($userOrig);
    $user = $isIP ? $userOrig : User::getCanonicalName($userOrig);
    $uid = User::idFromName($user);
    if (!$uid && !$isIP) {
        $err = '<strong class="error">' . wfMsgHtml('restrictuser-notfound') . '</strong>';
        $wgOut->addHTML(RestrictUserForm::selectUserForm($userOrig, $err));
        return;
    }
    $wgOut->addHTML(RestrictUserForm::selectUserForm($user));
    UserRestriction::purgeExpired();
    $old = UserRestriction::fetchForUser($user, true);
    RestrictUserForm::pageRestrictionForm($uid, $user, $old);
    RestrictUserForm::namespaceRestrictionForm($uid, $user, $old);
    // Renew it after possible changes in previous two functions
    $old = UserRestriction::fetchForUser($user, true);
    if ($old) {
        $wgOut->addHTML(RestrictUserForm::existingRestrictions($old));
    }
}
开发者ID:ruizrube,项目名称:spdef,代码行数:31,代码来源:SpecialRestrictUser.php


示例17: formatResult

 /**
  * Format a row, providing the timestamp, links to the page/history, size, user links, and a comment
  *
  * @param $skin Skin to use
  * @param $result Result row
  * @return string
  */
 function formatResult($skin, $result)
 {
     global $wgLang, $wgContLang;
     $dm = $wgContLang->getDirMark();
     $statusMsg = @FamilyTreeUtil::$STATUS_MESSAGES[$result->fg_status];
     if (!$statusMsg) {
         $statusMsg = "Error {$result->fg_status}";
     }
     $statusDate = $wgLang->timeAndDate($result->fg_status_date, true);
     $statusReason = $result->fg_status_reason ? htmlspecialchars(': ' . $result->fg_status_reason) : '';
     $userid = User::idFromName($result->ft_user);
     $ulink = $skin->userLink($userid, $result->ft_user) . $skin->userToolLinks($userid, $result->ft_user);
     if ($result->fg_status >= FG_STATUS_READY && $result->fg_status <= FG_STATUS_ADMIN_REVIEW || $result->fg_status == FG_STATUS_HOLD) {
         $filename = '<a href="/gedcom/index.php?gedcomId=' . $result->fg_id . '" rel="nofollow">' . htmlspecialchars($result->fg_gedcom_filename) . '</a>';
     } else {
         $filename = htmlspecialchars($result->fg_gedcom_filename);
     }
     $filesize = wfMsgHtml('nbytes', $wgLang->formatNum(htmlspecialchars($result->fg_file_size)));
     $reviewerid = User::idFromName($result->fg_reviewer);
     if ($result->fg_reviewer) {
         $rlink = " reviewer: " . $skin->userLink($reviewerid, $result->fg_reviewer) . $skin->userToolLinks($reviewerid, $result->fg_reviewer);
     } else {
         if ($result->fg_status == FG_STATUS_ADMIN_REVIEW) {
             $rlink = ' <b>needs admin review</b>';
         } else {
             $rlink = '';
         }
     }
     return "{$statusDate} <i>{$statusMsg}{$statusReason}</i> {$dm}{$filename} [{$filesize}] {$ulink} {$dm}{$rlink}";
 }
开发者ID:k-hasan-19,项目名称:wiki,代码行数:37,代码来源:SpecialGedcoms.php


示例18: formatResult

 function formatResult($skin, $result)
 {
     global $wgUser, $wgContLang, $wgLang;
     $fromObj = Title::makeTitle($result->namespace, $result->title);
     if (isset($result->rd_title)) {
         $toObj = Title::makeTitle($result->rd_namespace, $result->rd_title);
     } else {
         $blinks = $fromObj->getBrokenLinksFrom();
         # TODO: check for redirect, not for links
         if ($blinks) {
             $toObj = $blinks[0];
         } else {
             $toObj = false;
         }
     }
     // $toObj may very easily be false if the $result list is cached
     if (!is_object($toObj)) {
         return '<s>' . $skin->link($fromObj) . '</s>';
     }
     $from = $skin->linkKnown($fromObj, null, array(), array('redirect' => 'no'));
     $links = array();
     $links[] = $skin->linkKnown($fromObj, wfMsgHtml('brokenredirects-edit'), array(), array('action' => 'edit'));
     $to = $skin->link($toObj, null, array(), array(), array('broken'));
     $arr = $wgContLang->getArrow();
     $out = $from . wfMsg('word-separator');
     if ($wgUser->isAllowed('delete')) {
         $links[] = $skin->linkKnown($fromObj, wfMsgHtml('brokenredirects-delete'), array(), array('action' => 'delete'));
     }
     $out .= wfMsg('parentheses', $wgLang->pipeList($links));
     $out .= " {$arr} {$to}";
     return $out;
 }
开发者ID:rocLv,项目名称:conference,代码行数:32,代码来源:SpecialBrokenRedirects.php


示例19: formatResult

 function formatResult($skin, $result)
 {
     $title = Title::makeTitle(NS_TEMPLATE, $result->title);
     $pageLink = $skin->makeKnownLinkObj($title, '', 'redirect=no');
     $wlhLink = $skin->makeKnownLinkObj(Title::makeTitle(NS_SPECIAL, 'Whatlinkshere'), wfMsgHtml('unusedtemplateswlh'), 'target=' . $title->getPrefixedUrl());
     return wfSpecialList($pageLink, $wlhLink);
 }
开发者ID:BackupTheBerlios,项目名称:blahtex,代码行数:7,代码来源:SpecialUnusedtemplates.php


示例20: formatRow

 public function formatRow($row)
 {
     $title = Title::newFromRow($row);
     # Link to page
     $link = Linker::link($title);
     # Link to page configuration
     $config = Linker::linkKnown(SpecialPage::getTitleFor('Stabilization'), wfMsgHtml('configuredpages-config'), array(), 'page=' . $title->getPrefixedUrl());
     # Show which version is the default (stable or draft)
     if (intval($row->fpc_override)) {
         $default = wfMsgHtml('configuredpages-def-stable');
     } else {
         $default = wfMsgHtml('configuredpages-def-draft');
     }
     # Autoreview/review restriction level
     $restr = '';
     if ($row->fpc_level != '') {
         $restr = 'autoreview=' . htmlspecialchars($row->fpc_level);
         $restr = "[{$restr}]";
     }
     # When these configuration settings expire
     if ($row->fpc_expiry != 'infinity' && strlen($row->fpc_expiry)) {
         $expiry_description = " (" . wfMsgForContent('protect-expiring', $this->getLang()->timeanddate($row->fpc_expiry), $this->getLang()->date($row->fpc_expiry), $this->getLang()->time($row->fpc_expiry)) . ")";
     } else {
         $expiry_description = "";
     }
     return "<li>{$link} ({$config}) <b>[{$default}]</b> " . "{$restr}<i>{$expiry_description}</i></li>";
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:27,代码来源:ConfiguredPages_body.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wfMsgNoTrans函数代码示例发布时间:2022-05-23
下一篇:
PHP wfMsgHTML函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap