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

PHP wfMsg函数代码示例

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

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



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

示例1: wfAutotimestamp

function wfAutotimestamp(&$article, &$user, &$text, &$summary, $minor, $watch, $sectionanchor, &$flags)
{
    if (strpos($text, "{{") !== false) {
        $t1 = preg_replace('/\\<nowiki\\>.*<\\/nowiki>/', '', $text);
        preg_match_all('/{{[^}]*}}/im', $t1, $matches);
        $templates = split(' ', strtolower(wfMsg('templates_needing_autotimestamps')));
        $templates = array_flip($templates);
        foreach ($matches[0] as $m) {
            $mm = preg_replace('/\\|[^}]*/', '', $m);
            $mm = preg_replace('/[}{]/', '', $mm);
            if (isset($templates[strtolower($mm)])) {
                if (strpos($m, "date=") === false) {
                    $m1 = str_replace("}}", "|date=" . date('Y-m-d') . "}}", $m);
                    $text = str_replace($m, $m1, $text);
                } else {
                    preg_match('/date=(.*)}}/', $m, $mmatches);
                    $mmm = $mmatches[1];
                    if ($mmm !== date('Y-m-d', strtotime($mmm))) {
                        $text = str_replace($mmm, date('Y-m-d', strtotime($mmm)), $text);
                    }
                }
            } else {
                //echo "wouldn't substitute on $m<br/>";
            }
        }
    }
    return true;
}
开发者ID:biribogos,项目名称:wikihow-src,代码行数:28,代码来源:AutotimestampTemplates.php


示例2: getDisabledMessage

 protected function getDisabledMessage()
 {
     if ($this->disabledExtension) {
         return wfMsg('oasis-toolbar-not-enabled-here');
     }
     return parent::getDisabledMessage();
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:7,代码来源:SpecialPageUserCommand.php


示例3: doTagRow

 function doTagRow($tag, $hitcount)
 {
     static $sk = null, $doneTags = array();
     if (!$sk) {
         global $wgUser;
         $sk = $wgUser->getSkin();
     }
     if (in_array($tag, $doneTags)) {
         return '';
     }
     $newRow = '';
     $newRow .= Xml::tags('td', null, Xml::element('tt', null, $tag));
     $disp = ChangeTags::tagDescription($tag);
     $disp .= ' (' . $sk->link(Title::makeTitle(NS_MEDIAWIKI, "Tag-{$tag}"), wfMsg('tags-edit')) . ')';
     $newRow .= Xml::tags('td', null, $disp);
     $desc = wfMsgExt("tag-{$tag}-description", 'parseinline');
     $desc = wfEmptyMsg("tag-{$tag}-description", $desc) ? '' : $desc;
     $desc .= ' (' . $sk->link(Title::makeTitle(NS_MEDIAWIKI, "Tag-{$tag}-description"), wfMsg('tags-edit')) . ')';
     $newRow .= Xml::tags('td', null, $desc);
     $hitcount = wfMsg('tags-hitcount', $hitcount);
     $hitcount = $sk->link(SpecialPage::getTitleFor('RecentChanges'), $hitcount, array(), array('tagfilter' => $tag));
     $newRow .= Xml::tags('td', null, $hitcount);
     $doneTags[] = $tag;
     return Xml::tags('tr', null, $newRow) . "\n";
 }
开发者ID:ruizrube,项目名称:spdef,代码行数:25,代码来源:SpecialTags.php


示例4: create

 /**
  * Create a new poll
  * @param wgRequest question
  * @param wgRequest answer   (expects PHP array style in the form <input name=answer[]>)
  * Page Content should be of a different style so we have to translate
  *	  *question 1\n
  *	  *question 2\n
  */
 public static function create()
 {
     wfProfileIn(__METHOD__);
     $app = F::app();
     $title = $app->wg->Request->getVal('question');
     $answers = $app->wg->Request->getArray('answer');
     // array
     $title_object = Title::newFromText($title, NS_WIKIA_POLL);
     if (is_object($title_object) && $title_object->exists()) {
         $res = array('success' => false, 'error' => $app->renderView('Error', 'Index', array(wfMsg('wikiapoll-error-duplicate'))));
     } else {
         if ($title_object == null) {
             $res = array('success' => false, 'error' => $app->renderView('Error', 'Index', array(wfMsg('wikiapoll-error-invalid-title'))));
         } else {
             $content = "";
             foreach ($answers as $answer) {
                 $content .= "*{$answer}\n";
             }
             /* @var $article WikiPage */
             $article = new Article($title_object, NS_WIKIA_POLL);
             $article->doEdit($content, 'Poll Created', EDIT_NEW, false, $app->wg->User);
             $title_object = $article->getTitle();
             // fixme: check status object
             $res = array('success' => true, 'pollId' => $article->getID(), 'url' => $title_object->getLocalUrl(), 'question' => $title_object->getPrefixedText());
         }
     }
     wfProfileOut(__METHOD__);
     return $res;
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:37,代码来源:WikiaPollAjax.class.php


示例5: wfFormatEmail

function wfFormatEmail(&$to, &$from, &$subject, &$text)
{
    global $wgUser;
    $ul = $wgUser->getUserPage();
    $text = wfMsg('email_header') . $text . wfMsg('email_footer', $wgUser->getName(), $ul->getFullURL());
    return true;
}
开发者ID:biribogos,项目名称:wikihow-src,代码行数:7,代码来源:FormatEmail.php


示例6: getHtml

 /**
  * Returns the HTML which is added to $wgOut after the article text.
  *
  * @return string
  */
 protected function getHtml()
 {
     wfProfileIn(__METHOD__ . ' (SMW)');
     if ($this->limit > 0) {
         // limit==0: configuration setting to disable this completely
         $store = smwfGetStore();
         $description = new SMWConceptDescription($this->getDataItem());
         $query = SMWPageLister::getQuery($description, $this->limit, $this->from, $this->until);
         $queryResult = $store->getQueryResult($query);
         $diWikiPages = $queryResult->getResults();
         if ($this->until !== '') {
             $diWikiPages = array_reverse($diWikiPages);
         }
         $errors = $queryResult->getErrors();
     } else {
         $diWikiPages = array();
         $errors = array();
     }
     $pageLister = new SMWPageLister($diWikiPages, null, $this->limit, $this->from, $this->until);
     $this->mTitle->setFragment('#SMWResults');
     // Make navigation point to the result list.
     $navigation = $pageLister->getNavigationLinks($this->mTitle);
     $titleText = htmlspecialchars($this->mTitle->getText());
     $resultNumber = min($this->limit, count($diWikiPages));
     $result = "<a name=\"SMWResults\"></a><div id=\"mw-pages\">\n" . '<h2>' . wfMsg('smw_concept_header', $titleText) . "</h2>\n" . wfMsgExt('smw_conceptarticlecount', array('parsemag'), $resultNumber) . smwfEncodeMessages($errors) . "\n" . $navigation . $pageLister->formatList() . $navigation . "</div>\n";
     wfProfileOut(__METHOD__ . ' (SMW)');
     return $result;
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:33,代码来源:SMW_ConceptPage.php


示例7: onGetPreferences

 /**
  * @param User $user
  * @param Array $defaultPreferences
  * @return bool
  */
 function onGetPreferences($user, &$defaultPreferences)
 {
     global $wgOut, $wgJsMimeType, $wgExtensionsPath, $wgCityId;
     $wgOut->addScript("<script type=\"{$wgJsMimeType}\" src=\"{$wgExtensionsPath}/wikia/SpecialUnsubscribe/UnsubscribePreferences.js\"></script>");
     $unsubscribe = array('unsubscribed' => array('type' => 'toggle', 'section' => 'personal/email', 'label-message' => 'unsubscribe-preferences-toggle'));
     $notice = array('no-email-notice-followedpages' => array('type' => 'info', 'section' => 'watchlist/basic', 'default' => wfMsg('unsubscribe-preferences-notice')));
     // move e-mail options higher up
     $emailAddress = array('emailaddress' => $defaultPreferences['emailaddress']);
     unset($defaultPreferences['emailaddress']);
     $defaultPreferences = self::insert($defaultPreferences, 'language', $emailAddress, false);
     // move founder emails higher up
     $founderEmailsFirstKey = "adoptionmails-label-{$wgCityId}";
     if (!empty($defaultPreferences[$founderEmailsFirstKey])) {
         $founderEmails = array($founderEmailsFirstKey => $defaultPreferences[$founderEmailsFirstKey]);
         unset($defaultPreferences[$founderEmailsFirstKey]);
         $defaultPreferences = self::insert($defaultPreferences, 'emailaddress', $founderEmails);
     }
     // add the unsubscribe checkbox
     $defaultPreferences = self::insert($defaultPreferences, 'emailauthentication', $unsubscribe);
     // add a notice if needed
     if ($user->getOption('unsubscribe')) {
         $defaultPreferences = self::insert($defaultPreferences, 'watchdefault', $notice, false);
     }
     $defaultPreferences = self::insert($defaultPreferences, 'language', $emailAddress, false);
     return true;
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:31,代码来源:UnsubscribePreferences.class.php


示例8: tag_runphp

 public function tag_runphp(&$code, &$params, &$parser)
 {
     if (!self::checkExecuteRight($parser->mTitle)) {
         return 'SecurePHP: ' . wfMsg('badaccess');
     }
     return self::executeCode($code);
 }
开发者ID:clrh,项目名称:mediawiki,代码行数:7,代码来源:SecurePHP.body.php


示例9: index

 /**
  * @brief Displays the main menu for the admin dashboard
  *
  */
 public function index()
 {
     $this->wg->Out->setPageTitle(wfMsg('admindashboard-title'));
     if (!$this->wg->User->isAllowed('admindashboard')) {
         $this->displayRestrictionError();
         return false;
         // skip rendering
     }
     $this->tab = $this->getVal('tab', 'general');
     // links
     $this->urlThemeDesigner = Title::newFromText('ThemeDesigner', NS_SPECIAL)->getFullURL();
     $this->urlRecentChanges = Title::newFromText('RecentChanges', NS_SPECIAL)->getFullURL();
     $this->urlTopNavigation = Title::newFromText('Wiki-navigation', NS_MEDIAWIKI)->getFullURL('action=edit');
     $this->urlWikiFeatures = Title::newFromText('WikiFeatures', NS_SPECIAL)->getFullURL();
     $this->urlPageLayoutBuilder = Title::newFromText('PageLayoutBuilder', NS_SPECIAL)->getFullURL('action=list');
     $this->urlListUsers = Title::newFromText('ListUsers', NS_SPECIAL)->getFullURL();
     $this->urlUserRights = Title::newFromText('UserRights', NS_SPECIAL)->getFullURL();
     $this->urlCommunityCorner = Title::newFromText('Community-corner', NS_MEDIAWIKI)->getFullURL('action=edit');
     $this->urlAllCategories = Title::newFromText('Categories', NS_SPECIAL)->getFullURL();
     $this->urlAddPage = Title::newFromText('CreatePage', NS_SPECIAL)->getFullURL();
     $this->urlAddPhoto = Title::newFromText('Upload', NS_SPECIAL)->getFullURL();
     $this->urlCreateBlogPage = Title::newFromText('CreateBlogPage', NS_SPECIAL)->getFullURL();
     $this->urlMultipleUpload = Title::newFromText('MultipleUpload', NS_SPECIAL)->getFullURL();
     $this->urlGetPromoted = Title::newFromText('Promote', NS_SPECIAL)->getFullURL();
     // special:specialpages
     $this->advancedSection = (string) $this->app->sendRequest('AdminDashboardSpecialPage', 'getAdvancedSection', array());
     // icon display logic
     $this->displayPageLayoutBuilder = !empty($this->wg->EnablePageLayoutBuilder);
     $this->displayWikiFeatures = !empty($this->wg->EnableWikiFeatures);
     $this->displaySpecialPromote = !empty($this->wg->EnableSpecialPromoteExt);
     // add messages package
     F::build('JSMessages')->enqueuePackage('AdminDashboard', JSMessages::INLINE);
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:37,代码来源:AdminDashboardSpecialPageController.class.php


示例10: wfSpecialExport

/**
 *
 */
function wfSpecialExport($page = '')
{
    global $wgOut, $wgLang, $wgRequest;
    if ($wgRequest->getVal('action') == 'submit') {
        $page = $wgRequest->getText('pages');
        $curonly = $wgRequest->getCheck('curonly');
    } else {
        # Pre-check the 'current version only' box in the UI
        $curonly = true;
    }
    if ($page != '') {
        $wgOut->disable();
        header("Content-type: application/xml; charset=utf-8");
        $pages = explode("\n", $page);
        $db =& wfGetDB(DB_SLAVE);
        $history = $curonly ? MW_EXPORT_CURRENT : MW_EXPORT_FULL;
        $exporter = new WikiExporter($db, $history);
        $exporter->openStream();
        $exporter->pagesByName($pages);
        $exporter->closeStream();
        return;
    }
    $wgOut->addWikiText(wfMsg("exporttext"));
    $titleObj = Title::makeTitle(NS_SPECIAL, "Export");
    $action = $titleObj->escapeLocalURL('action=submit');
    $wgOut->addHTML("\n<form method='post' action=\"{$action}\">\n<input type='hidden' name='action' value='submit' />\n<textarea name='pages' cols='40' rows='10'></textarea><br />\n<label><input type='checkbox' name='curonly' value='true' checked='checked' />\n" . wfMsg("exportcuronly") . "</label><br />\n<input type='submit' />\n</form>\n");
}
开发者ID:BackupTheBerlios,项目名称:openzaurus-svn,代码行数:30,代码来源:SpecialExport.php


示例11: execute

 /**
  * Show the special page
  *
  * @param $par Mixed: parameter passed to the page or null
  */
 public function execute($par)
 {
     global $wgOut;
     $wgOut->setPageTitle(wfMsg('myip'));
     $ip = wfGetIP();
     $wgOut->addWikiText(wfMsg('myip-out') . " {$ip}");
 }
开发者ID:aahashderuffy,项目名称:extensions,代码行数:12,代码来源:MyIP_body.php


示例12: getHtmlResult

	function getHtmlResult() {
		$ballot = $this->election->getBallot();
		if ( !is_callable( array( $ballot, 'getColumnLabels' ) ) ) {
			throw new MWException( __METHOD__.': ballot type not supported by this tallier' );
		}
		$optionLabels = array();
		foreach ( $this->question->getOptions() as $option ) {
			$optionLabels[$option->getId()] = $option->parseMessageInline( 'text' );
		}

		$labels = $ballot->getColumnLabels( $this->question );
		$s = "<table class=\"securepoll-table\">\n" .
			"<tr>\n" .
			"<th>&#160;</th>\n";
		foreach ( $labels as $label ) {
			$s .= Xml::element( 'th', array(), $label ) . "\n";
		}
		$s .= Xml::element( 'th', array(), wfMsg( 'securepoll-average-score' ) );
		$s .= "</tr>\n";
		
		foreach ( $this->averages as $oid => $average ) {
			$s .= "<tr>\n" . 
				Xml::tags( 'td', array( 'class' => 'securepoll-results-row-heading' ),
					$optionLabels[$oid] ) .
				"\n";
			foreach ( $labels as $score => $label ) {
				$s .= Xml::element( 'td', array(), $this->histogram[$oid][$score] ) . "\n";
			}
			$s .= Xml::element( 'td', array(), $average ) . "\n";
			$s .= "</tr>\n";
		}
		$s .= "</table>\n";
		return $s;
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:34,代码来源:HistogramRangeTallier.php


示例13: execute

 public function execute($parameters)
 {
     global $wgOut, $wgRequest, $wgDisableTextSearch, $wgScript;
     $this->setHeaders();
     list($limit, $offset) = wfCheckLimits();
     $wgOut->addWikiText(wfMsgForContentNoTrans('proofreadpage_specialpage_text'));
     $this->searchList = null;
     $this->searchTerm = $wgRequest->getText('key');
     $this->suppressSqlOffset = false;
     if (!$wgDisableTextSearch) {
         $self = $this->getTitle();
         $wgOut->addHTML(Xml::openElement('form', array('action' => $wgScript)) . Html::hidden('title', $this->getTitle()->getPrefixedText()) . Xml::input('limit', false, $limit, array('type' => 'hidden')) . Xml::openElement('fieldset') . Xml::element('legend', null, wfMsg('proofreadpage_specialpage_legend')) . Xml::input('key', 20, $this->searchTerm) . ' ' . Xml::submitButton(wfMsg('ilsubmit')) . Xml::closeElement('fieldset') . Xml::closeElement('form'));
         if ($this->searchTerm) {
             $index_namespace = $this->index_namespace;
             $index_ns_index = MWNamespace::getCanonicalIndex(strtolower(str_replace(' ', '_', $index_namespace)));
             $searchEngine = SearchEngine::create();
             $searchEngine->setLimitOffset($limit, $offset);
             $searchEngine->setNamespaces(array($index_ns_index));
             $searchEngine->showRedirects = false;
             $textMatches = $searchEngine->searchText($this->searchTerm);
             $escIndex = preg_quote($index_namespace, '/');
             $this->searchList = array();
             while ($result = $textMatches->next()) {
                 $title = $result->getTitle();
                 if ($title->getNamespace() == $index_ns_index) {
                     array_push($this->searchList, $title->getDBkey());
                 }
             }
             $this->suppressSqlOffset = true;
         }
     }
     parent::execute($parameters);
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:33,代码来源:SpecialProofreadPages.php


示例14: addToolboxLink

	/**
	 * @param $tpl
	 * @return bool
	 */
	public static function addToolboxLink( &$tpl ) {
		global $wgOut, $wgShortUrlPrefix;

		if ( !is_string( $wgShortUrlPrefix ) ) {
			$urlPrefix = SpecialPage::getTitleFor( 'ShortUrl' )->getCanonicalUrl() . '/';
		} else {
			$urlPrefix = $wgShortUrlPrefix;
		}

		$title = $wgOut->getTitle();
		if ( ShortUrlUtils::needsShortUrl( $title ) ) {
			$shortId = ShortUrlUtils::encodeTitle( $title );
			$shortURL = $urlPrefix . $shortId;
			$html = Html::rawElement( 'li',	array( 'id' => 't-shorturl' ),
				Html::Element( 'a', array(
					'href' => $shortURL,
					'title' => wfMsg( 'shorturl-toolbox-title' )
				),
				wfMsg( 'shorturl-toolbox-text' ) )
			);

			echo $html;
		}
		return true;
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:29,代码来源:ShortUrl.hooks.php


示例15: efFastCatSelector

function efFastCatSelector(&$categories)
{
    global $wgTitle, $wgArticle;
    // BugId:26491
    if (empty($wgTitle) || empty($wgArticle)) {
        return true;
    }
    $artname = $wgTitle->getText();
    $artid = $wgArticle->getID();
    $spice = sha1("Kroko-katMeNot-" . $artid . "-" . $artname . "-NotMekat-Schnapp");
    $catUrl = Title::newFromText('FastCat', NS_SPECIAL)->getFullURL();
    $ret = "<form action=\"{$catUrl}\" method='post'>\n<p><b>" . wfMsg('fastcat-box-title') . "</b><br>\n<small>" . wfMsg('fastcat-box-intro') . "</small>\n</p>\n<input type='hidden' name='id' value='{$artid}'>\n<input type='hidden' name='spice' value='{$spice}'>\n<input type='hidden' name='artname' value='{$artname}'>\n<p style=\"text-indent:-1em;margin-left:1em\">";
    $kat = explode("\n", wfMsgForContent('fastcat-categories-list'));
    foreach ($kat as $k) {
        if (strpos($k, '* ') === 0) {
            $k = trim($k, '* ');
            $ret .= "</p><p style=\"text-indent:-1em;margin-left:1em\">\n";
            $ret .= "<button style=\"font-size:smaller;\" name=\"cat\" value=\"{$k}\"><b>{$k}</b></button>\n";
        } else {
            $k = trim($k, '* ');
            $ret .= "<button style=\"font-size:smaller;\" name=\"cat\" value=\"{$k}\">{$k}</button>\n";
        }
    }
    $ret .= <<<EORET
\t\t</p>
\t\t</form>
EORET;
    $categories = $ret;
    return true;
}
开发者ID:schwarer2006,项目名称:wikia,代码行数:30,代码来源:FastCat.php


示例16: execute

 /**
  * This function is called when the special page is accessed
  * @param $par parameters
  * @see includes/SpecialPage.php
  */
 function execute($par)
 {
     global $wgRequest, $wgOut;
     $this->setHeaders();
     $param = $wgRequest->getText('param');
     wfDebugLog(basename(__FILE__, ".php"), __METHOD__ . ': ' . "Parameters: {$param}");
     // build the page
     $html = "";
     if ($this->multiAuthPlugin->isLoggedIn()) {
         // login success
         $html .= "<p>" . wfMsg('msg_loginSuccess') . "</p>\n";
     } else {
         if (isset($_GET['method']) && $this->multiAuthPlugin->isValidMethod($_GET['method'])) {
             $this->initLogin($_GET['method']);
             // the above function will issue a redirect
         } else {
             if (!is_null($this->multiAuthPlugin->getCurrentMethodName()) && $this->multiAuthPlugin->getCurrentMethodName() != 'local') {
                 // external authentication success but not authorized
                 $html .= "<p>" . wfMsg('msg_notAuthorized') . "</p>\n";
                 unset($_SESSION['MA_methodName']);
             } else {
                 $this->addLoginLinks($html);
             }
         }
     }
     $wgOut->addHTML($html);
     $wgOut->returnToMain();
 }
开发者ID:BackupTheBerlios,项目名称:multiauth-svn,代码行数:33,代码来源:SpecialLogin.body.php


示例17: execute

 /**
  * Main method.
  *
  * @since 0.1
  *
  * @param string $subPage
  */
 public function execute($subPage)
 {
     parent::execute($subPage);
     $out = $this->getOutput();
     if (trim($subPage) === '') {
         $this->getOutput()->redirect(SpecialPage::getTitleFor('Institutions')->getLocalURL());
     } else {
         $out->setPageTitle(wfMsgExt('ep-institution-title', 'parsemag', $this->subPage));
         $org = EPOrg::selectRow(null, array('name' => $this->subPage));
         if ($org === false) {
             $this->displayNavigation();
             if ($this->getUser()->isAllowed('ep-org')) {
                 $out->addWikiMsg('ep-institution-create', $this->subPage);
                 EPOrg::displayAddNewControl($this->getContext(), array('name' => $this->subPage));
             } else {
                 $out->addWikiMsg('ep-institution-none', $this->subPage);
             }
         } else {
             $links = array();
             if ($this->getUser()->isAllowed('ep-org')) {
                 $links[wfMsg('ep-institution-nav-edit')] = SpecialPage::getTitleFor('EditInstitution', $this->subPage);
             }
             $this->displayNavigation($links);
             $this->displaySummary($org);
             $out->addHTML(Html::element('h2', array(), wfMsg('ep-institution-courses')));
             EPCourse::displayPager($this->getContext(), array('org_id' => $org->getId()));
             if ($this->getUser()->isAllowed('ep-course')) {
                 $out->addHTML(Html::element('h2', array(), wfMsg('ep-institution-add-course')));
                 EPCourse::displayAddNewControl($this->getContext(), array('org' => $org->getId()));
             }
         }
     }
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:40,代码来源:SpecialInstitution.php


示例18: createUserJudgeHTML

    public static function createUserJudgeHTML($edit_id, $page_id, $timestamp, $username, $html_diff)
    {
        $notSpamMsg = wfMsg('not-spam');
        $delSpamMsg = wfMsg('delete-permanently');
        $page_title = self::getArticleTitleFromID($page_id);
        $pageName = wfMsg('page-name', $page_title);
        $authorLabel = wfMsg('author-label', $username);
        $submittedOn = wfMsg('submitted-on', $timestamp);
        $htmlout = <<<HTML
        <div class="spam-diff">
            <div class="diff-header">
                <h4>{$pageName}</h4>
                <p>{$authorLabel}<br />
                {$submittedOn}</p>
            </div>
            <div class="diff-holder">
                {$html_diff}
            </div>
            <div class="diff-footer">
                <fieldset>
                    <label for="del-spam-{$edit_id}">
                        <input type="radio" id="del-spam-{$edit_id}" name="spam_not_spam-{$edit_id}" value="del-{$edit_id}" checked="checked" /> {$delSpamMsg}
                    </label>
                    <label for="not-spam-{$edit_id}">
                        <input type="radio" id="not-spam-{$edit_id}" name="spam_not_spam-{$edit_id}" value="not-spam-{$edit_id}" /> {$notSpamMsg}
                    </label>
                </fieldset>
            </div>
        </div><br /><br />
HTML;
        return $htmlout;
    }
开发者ID:aag,项目名称:mwakismet,代码行数:32,代码来源:AkismetEdit.class.php


示例19: execute

 /**
  * Execute special page. Only available to wikiHow staff.
  */
 public function execute()
 {
     global $wgRequest, $wgOut, $wgUser, $wgLang, $wgLanguageCode, $wgHooks;
     $wgHooks['ShowSideBar'][] = array($this, 'removeSideBarCallback');
     $userGroups = $wgUser->getGroups();
     if ($wgLanguageCode != 'en' || $wgUser->isBlocked() || !in_array('staff', $userGroups) && $wgUser->getName() != "G.bahij") {
         $wgOut->setRobotpolicy('noindex,nofollow');
         $wgOut->errorpage('nosuchspecialpage', 'nospecialpagetext');
     }
     // Fetch images before or after time 't'
     $timeCutoff = $wgRequest->getVal('t') or wfTimestamp(TS_MW);
     if (!ctype_digit($timeCutoff)) {
         $timeCutoff = wfTimestamp(TS_MW);
     }
     $after = (bool) $wgRequest->getVal('a');
     $gridView = (bool) $wgRequest->getVal('g');
     $rowsPerPage = $wgRequest->getVal('r');
     if ($rowsPerPage && is_numeric($rowsPerPage) && ctype_digit($rowsPerPage)) {
         $rowsPerPage = max(5, min(100, $rowsPerPage));
     } else {
         $rowsPerPage = $this->defaultRowsPerPage;
     }
     $copyVioFilter = (bool) $wgRequest->getVal('c');
     $title = 'Admin - Manage User Completed Images';
     $wgOut->setHTMLTitle(wfMsg('pagetitle', $title));
     $wgOut->setPageTitle('Manage User Completed Images');
     $tmpl = $this->genAdminForm($timeCutoff, $after, $rowsPerPage, $gridView, $copyVioFilter);
     $wgOut->addHTML($tmpl);
 }
开发者ID:ErdemA,项目名称:wikihow,代码行数:32,代码来源:AdminUserCompletedImages.body.php


示例20: getTypeProperties

 protected function getTypeProperties($typeLabel)
 {
     global $wgRequest, $smwgTypePagingLimit;
     if ($smwgTypePagingLimit <= 0) {
         return '';
     }
     // not too useful, but we comply to this request
     $from = $wgRequest->getVal('from');
     $until = $wgRequest->getVal('until');
     $typeValue = SMWDataValueFactory::newTypeIDValue('__typ', $typeLabel);
     $store = smwfGetStore();
     $options = SMWPageLister::getRequestOptions($smwgTypePagingLimit, $from, $until);
     $diWikiPages = $store->getPropertySubjects(new SMWDIProperty('_TYPE'), $typeValue->getDataItem(), $options);
     if (!$options->ascending) {
         $diWikiPages = array_reverse($diWikiPages);
     }
     $result = '';
     if (count($diWikiPages) > 0) {
         $pageLister = new SMWPageLister($diWikiPages, null, $smwgTypePagingLimit, $from, $until);
         $title = $this->getTitleFor('Types', $typeLabel);
         $title->setFragment('#SMWResults');
         // Make navigation point to the result list.
         $navigation = $pageLister->getNavigationLinks($title);
         $resultNumber = min($smwgTypePagingLimit, count($diWikiPages));
         $typeName = $typeValue->getLongWikiText();
         $result .= "<a name=\"SMWResults\"></a><div id=\"mw-pages\">\n" . '<h2>' . wfMsg('smw_type_header', $typeName) . "</h2>\n<p>" . wfMsgExt('smw_typearticlecount', array('parsemag'), $resultNumber) . "</p>\n" . $navigation . $pageLister->formatList() . $navigation . "\n</div>";
     }
     return $result;
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:29,代码来源:SMW_SpecialTypes.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP wfMsgExt函数代码示例发布时间:2022-05-23
下一篇:
PHP wfMkdirParents函数代码示例发布时间: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