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

PHP wfMsgWikiHtml函数代码示例

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

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



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

示例1: wfSpecialIpblocklist

/**
 * @todo document
 */
function wfSpecialIpblocklist()
{
    global $wgUser, $wgOut, $wgRequest;
    $ip = $wgRequest->getVal('wpUnblockAddress', $wgRequest->getVal('ip'));
    $reason = $wgRequest->getText('wpUnblockReason');
    $action = $wgRequest->getText('action');
    $ipu = new IPUnblockForm($ip, $reason);
    if ("success" == $action) {
        $ipu->showList(wfMsgWikiHtml('unblocked', htmlspecialchars($ip)));
    } else {
        if ("submit" == $action && $wgRequest->wasPosted() && $wgUser->matchEditToken($wgRequest->getVal('wpEditToken'))) {
            if (!$wgUser->isAllowed('block')) {
                $wgOut->sysopRequired();
                return;
            }
            $ipu->doSubmit();
        } else {
            if ("unblock" == $action) {
                $ipu->showForm("");
            } else {
                $ipu->showList("");
            }
        }
    }
}
开发者ID:k-hasan-19,项目名称:wiki,代码行数:28,代码来源:SpecialIpblocklist.php


示例2: wfSpecialCheckmylinks

function wfSpecialCheckmylinks($par)
{
    global $wgRequest, $wgSitename, $wgLanguageCode;
    global $wgDeferredUpdateList, $wgOut, $wgUser, $wgServer, $wgParser, $wgTitle;
    $fname = "wfCheckmylinks";
    $wgOut->addHTML(wfMsgWikiHtml('checkmylinks_summary'));
    if ($wgUser->getID() > 0) {
        $t = Title::makeTitle(NS_USER, $wgUser->getName() . "/Mylinks");
        if ($t->getArticleID() > 0) {
            $r = Revision::newFromTitle($t);
            $text = $r->getText();
            if ($text != "") {
                $ret = "<h3>" . wfMsg('mylinks') . "</h3>";
                $options = new ParserOptions();
                $output = $wgParser->parse($text, $wgTitle, $options);
                $ret .= $output->getText();
            }
            $size = strlen($ret);
            if ($size > 3000) {
                $wgOut->addHTML(wfMsgWikiHtml('checkmylinks_size_bad', number_format($size, 0, "", ",")));
            } else {
                $wgOut->addHTML(wfMsgWikiHtml('checkmylinks_size_good', number_format($size, 0, "", ",")));
            }
        } else {
            $wgOut->addHTML(wfMsgWikiHtml('checkmylinks_error'));
        }
    } else {
        $wgOut->addHTML(wfMsgWikiHtml('checkmylinks_notloggedin'));
    }
}
开发者ID:biribogos,项目名称:wikihow-src,代码行数:30,代码来源:Checkmylinks.php


示例3: 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


示例4: execute

 public function execute($mode = false)
 {
     global $wgOut, $wgUser;
     $this->setHeaders();
     $this->user =& $wgUser;
     if (strtolower($mode) == 'results') {
         if ($wgUser->isAllowed('voteadmin')) {
             $this->showResults();
         }
     } else {
         if ($wgUser->isAnon()) {
             $skin =& $wgUser->getSkin();
             $self = SpecialPage::getTitleFor('Vote');
             $login = SpecialPage::getTitleFor('Userlogin');
             $link = $skin->makeKnownLinkObj($login, wfMsgHtml('vote-login-link'), 'returnto=' . $self->getPrefixedUrl());
             $wgOut->addHtml(wfMsgWikiHtml('vote-login', $link));
             return;
         } elseif (!$wgUser->mEmailAuthenticated) {
             $wgOut->addWikiText("'''Email authentication is required to vote.'''\n\t\t\t\t\nPlease edit/add your e-mail using [[Special:Preferences]] and a confirmation e-mail will be sent to your e-mail address.\n\nFollow the instructions in the e-mail, to confirm that the account is actually yours.");
             return;
         } elseif (!$wgUser->isAllowed('vote')) {
             $wgOut->permissionRequired('vote');
             return;
         } else {
             $this->showNormal();
         }
     }
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:28,代码来源:Vote.page.php


示例5: view

 /**
  * Called on every video page view.
  */
 public function view()
 {
     $this->video = new Video($this->getTitle(), $this->getContext());
     $out = $this->getContext()->getOutput();
     $videoLinksHTML = '<br />' . Xml::element('h2', array('id' => 'filelinks'), wfMsg('video-links')) . "\n";
     $sk = $this->getContext()->getSkin();
     // No need to display noarticletext, we use our own message
     if ($this->getID()) {
         parent::view();
     } else {
         // Just need to set the right headers
         $out->setArticleFlag(true);
         $out->setRobotPolicy('index,follow');
         $out->setPageTitle($this->mTitle->getPrefixedText());
     }
     if ($this->video->exists()) {
         // Display flash video
         $out->addHTML($this->video->getEmbedCode());
         // Force embed this code to have width of 300
         $this->video->setWidth(300);
         $out->addHTML($this->getEmbedThisTag());
         $this->videoHistory();
         //$wgOut->addHTML( $videoLinksHTML );
         //$this->videoLinks();
     } else {
         // Video doesn't exist, so give a link allowing user to add one with this name
         $title = SpecialPage::getTitleFor('AddVideo');
         $link = $sk->linkKnown($title, wfMsgHtml('video-novideo-linktext'), array(), array('wpTitle' => $this->video->getName()));
         $out->addHTML(wfMsgWikiHtml('video-novideo', $link));
         //$wgOut->addHTML( $videoLinksHTML );
         //$this->videoLinks();
         $this->viewUpdates();
     }
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:37,代码来源:VideoPage.php


示例6: execute

 /**
  * Main execution point
  *
  * @param $code Confirmation code passed to the page
  */
 function execute($code)
 {
     global $wgUser, $wgOut;
     $this->setHeaders();
     if (wfReadOnly()) {
         $wgOut->readOnlyPage();
         return;
     }
     if (empty($code)) {
         if ($wgUser->isLoggedIn()) {
             if (User::isValidEmailAddr($wgUser->getEmail())) {
                 $this->showRequestForm();
             } else {
                 $wgOut->addWikiMsg('confirmemail_noemail');
             }
         } else {
             $title = SpecialPage::getTitleFor('Userlogin');
             $skin = $wgUser->getSkin();
             $llink = $skin->linkKnown($title, wfMsgHtml('loginreqlink'), array(), array('returnto' => $this->getTitle()->getPrefixedText()));
             $wgOut->addHTML(wfMsgWikiHtml('confirmemail_needlogin', $llink));
         }
     } else {
         $this->attemptConfirm($code);
     }
 }
开发者ID:GodelDesign,项目名称:Godel,代码行数:30,代码来源:SpecialConfirmemail.php


示例7: showChunk

 /**
  * @param integer $namespace (Default NS_MAIN)
  * @param string $from list all pages from this name (default FALSE)
  */
 function showChunk($namespace = NS_MAIN, $prefix, $including = false, $from = null)
 {
     global $wgOut, $wgUser, $wgContLang;
     $fname = 'indexShowChunk';
     $sk = $wgUser->getSkin();
     if (!isset($from)) {
         $from = $prefix;
     }
     $fromList = $this->getNamespaceKeyAndText($namespace, $from);
     $prefixList = $this->getNamespaceKeyAndText($namespace, $prefix);
     if (!$prefixList || !$fromList) {
         $out = wfMsgWikiHtml('allpagesbadtitle');
     } else {
         list($namespace, $prefixKey, $prefix) = $prefixList;
         list($fromNs, $fromKey, $from) = $fromList;
         ### FIXME: should complain if $fromNs != $namespace
         $dbr =& wfGetDB(DB_SLAVE);
         $res = $dbr->select('page', array('page_namespace', 'page_title', 'page_is_redirect'), array('page_namespace' => $namespace, 'page_title LIKE \'' . $dbr->escapeLike($prefixKey) . '%\'', 'page_title >= ' . $dbr->addQuotes($fromKey)), $fname, array('ORDER BY' => 'page_title', 'LIMIT' => $this->maxPerPage + 1, 'USE INDEX' => 'name_title'));
         ### FIXME: side link to previous
         $n = 0;
         $out = '<table style="background: inherit;" border="0" width="100%">';
         $namespaces = $wgContLang->getFormattedNamespaces();
         while ($n < $this->maxPerPage && ($s = $dbr->fetchObject($res))) {
             $t = Title::makeTitle($s->page_namespace, $s->page_title);
             if ($t) {
                 $link = ($s->page_is_redirect ? '<div class="allpagesredirect">' : '') . $sk->makeKnownLinkObj($t, htmlspecialchars($t->getText()), false, false) . ($s->page_is_redirect ? '</div>' : '');
             } else {
                 $link = '[[' . htmlspecialchars($s->page_title) . ']]';
             }
             if ($n % 3 == 0) {
                 $out .= '<tr>';
             }
             $out .= "<td>{$link}</td>";
             $n++;
             if ($n % 3 == 0) {
                 $out .= '</tr>';
             }
         }
         if ($n % 3 != 0) {
             $out .= '</tr>';
         }
         $out .= '</table>';
     }
     if ($including) {
         $out2 = '';
     } else {
         $nsForm = $this->namespaceForm($namespace, $prefix);
         $out2 = '<table style="background: inherit;" width="100%" cellpadding="0" cellspacing="0" border="0">';
         $out2 .= '<tr valign="top"><td align="left">' . $nsForm;
         $out2 .= '</td><td align="right" style="font-size: smaller; margin-bottom: 1em;">' . $sk->makeKnownLink($wgContLang->specialPage($this->name), wfMsg('allpages'));
         if (isset($dbr) && $dbr && $n == $this->maxPerPage && ($s = $dbr->fetchObject($res))) {
             $namespaceparam = $namespace ? "&namespace={$namespace}" : "";
             $out2 .= " | " . $sk->makeKnownLink($wgContLang->specialPage($this->name), wfMsg('nextpage', $s->page_title), "from=" . wfUrlEncode($s->page_title) . "&prefix=" . wfUrlEncode($prefix) . $namespaceparam);
         }
         $out2 .= "</td></tr></table><hr />";
     }
     $wgOut->addHtml($out2 . $out);
 }
开发者ID:puring0815,项目名称:OpenKore,代码行数:62,代码来源:SpecialPrefixindex.php


示例8: getBadge

 function getBadge($badgeName)
 {
     $html = "<div class='ab-box'>";
     $html .= "<div class='ab-badge ab-" . $badgeName . "'></div>";
     $html .= "<h3>" . wfMsg("ab-" . $badgeName . "-title") . "</h3>";
     $html .= wfMsgWikiHtml("ab-" . $badgeName . "-description");
     $html .= "</div>";
     return $html;
 }
开发者ID:ErdemA,项目名称:wikihow,代码行数:9,代码来源:ProfileBadges.body.php


示例9: execute

 function execute($par)
 {
     global $wgRequest, $wgOut, $wgUser, $wgLang;
     $target = isset($par) ? $par : $wgRequest->getVal('target');
     $sk = $wgUser->getSkin();
     $dbr =& wfGetDB(DB_SLAVE);
     $wgOut->setHTMLTitle('Edits Patrol Count - wikiHow');
     $wgOut->addHTML('  <style type="text/css" media="all">/*<![CDATA[*/ @import "/extensions/wikihow/Patrolcount.css"; /*]]>*/</style>');
     $me = Title::makeTitle(NS_SPECIAL, "Patrolcount");
     // allow the user to grab the local patrol count relative to their own timezone
     if ($wgRequest->getVal('patrolcountview', null)) {
         $wgUser->setOption('patrolcountlocal', $wgRequest->getVal('patrolcountview'));
         $wgUser->saveSettings();
     }
     if ($wgUser->getOption('patrolcountlocal', "GMT") != "GMT") {
         $links = "[" . $sk->makeLinkObj($me, wfMsg('patrolcount_viewGMT'), "patrolcountview=GMT") . "] [" . wfMsg('patrolcount_viewlocal') . "]";
         $result = Patrolcount::getPatrolcountWindow();
         $date1 = $result[0];
         $date2 = $result[1];
         //echo "$date1 , $date2";
     } else {
         $links = "[" . wfMsg('patrolcount_viewGMT') . "] [" . $sk->makeLinkObj($me, wfMsg('patrolcount_viewlocal'), "patrolcountview=local") . "]";
         $now = wfTimestamp(TS_UNIX);
         $date1 = substr(wfTimestamp(TS_MW), 0, 8) . "000000";
         $date2 = substr(wfTimestamp(TS_MW, $now + 24 * 3600), 0, 8) . "000000";
     }
     //echo "<h3>date1 $date1 to $date2</h3>";
     //grab the total
     $total = $dbr->selectField('logging', 'count(*)', array('log_type' => 'patrol', "log_timestamp>'{$date1}'", "log_timestamp<'{$date2}'"));
     $wgOut->addHTML("<div id='Patrolcount'>");
     $wgOut->addHTML(wfMsg('patrolcount_summary') . "<br/><br/>" . wfMsg('patrolcount_total', number_format($total, 0, '', ',')) . "<br/><br/><center>");
     $wgOut->addHTML($links);
     $wgOut->addHTML("<br/><br/><table width='500px' align='center' class='status'>");
     $sql = "select log_user, count(*) as C from logging where log_type='patrol' and log_timestamp > '{$date1}' and log_timestamp < '{$date2}' group by log_user order by C desc limit 20;";
     $res = $dbr->query($sql);
     $index = 1;
     $wgOut->addHTML("<tr>\n\t                       <td></td>\n\t                        <td>User</td>\n\t                        <td  align='right'>" . wfMsg('patrolcount_numberofeditspatrolled') . "</td>\n\t                        <td align='right'>" . wfMsg('patrolcount_percentangeheader') . "</td>\n\t                        </tr>\n\t        ");
     while (($row = $dbr->fetchObject($res)) != null) {
         $u = User::newFromID($row->log_user);
         $percent = $total == 0 ? "0" : number_format($row->C / $total * 100, 2);
         $count = number_format($row->C, 0, "", ',');
         $class = "";
         if ($index % 2 == 1) {
             $class = 'class="odd"';
         }
         $log = $sk->makeLinkObj(Title::makeTitle(NS_SPECIAL, 'Log'), $count, 'type=patrol&user=' . $u->getName());
         $wgOut->addHTML("<tr {$class}>\n\t\t\t\t<td>{$index}</td>\n\t\t\t\t<td>" . $sk->makeLinkObj($u->getUserPage(), $u->getName()) . "</td>\n\t\t\t\t<td  align='right'>{$log}</td>\n\t\t\t\t<td align='right'> {$percent} % </td>\n\t\t\t\t</tr>\n\t\t\t");
         $index++;
     }
     $wgOut->addHTML("</table></center>");
     if ($wgUser->getOption('patrolcountlocal', "GMT") != "GMT") {
         $wgOut->addHTML("<br/><br/><i><font size='-2'>" . wfMsgWikiHtml('patrolcount_viewlocal_info') . "</font></i>");
     }
     $wgOut->addHTML("</div>");
 }
开发者ID:ErdemA,项目名称:wikihow,代码行数:55,代码来源:Patrolcount.body.php


示例10: acceptNewUserName

 /**
  * Check whether a user name is acceptable,
  * and set a message if unacceptable.
  *
  * Used by abortNewAccount and centralAuthAutoCreate
  *
  * @return bool Acceptable
  */
 private static function acceptNewUserName($userName, $permissionsUser, &$err, $override = true)
 {
     $title = Title::makeTitleSafe(NS_USER, $userName);
     $blacklisted = TitleBlacklist::singleton()->userCannot($title, $permissionsUser, 'new-account', $override);
     if ($blacklisted instanceof TitleBlacklistEntry) {
         $message = $blacklisted->getErrorMessage('new-account');
         $err = wfMsgWikiHtml($message, $blacklisted->getRaw(), $userName);
         return false;
     }
     return true;
 }
开发者ID:eFFemeer,项目名称:seizamcore,代码行数:19,代码来源:TitleBlacklist.hooks.php


示例11: onSpecialListusersHeader

	/**
	 * Show a message that you are viewing a list of users of a certain test wiki
	 * @param $pager
	 * @param $out
	 * @return bool
	 */
	static function onSpecialListusersHeader( $pager, &$out ) {
		$project = self::getProjectInput();
		if( $project ) {
			$out .= wfMsgWikiHtml( 'wminc-listusers-testwiki', '"' . $project['name'] . '"' );
		} else {
			$testwiki = IncubatorTest::getUrlParam();
			if ( $testwiki ) {
				$link = Linker::linkKnown( Title::newFromText( $testwiki['prefix'] ) );
				$out .= wfMsgWikiHtml( 'wminc-listusers-testwiki', $link );
			}
		}
		return true;
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:19,代码来源:ListUsersTestWiki.php


示例12: execute

 /**
  * Main execution point
  *
  * @param $code Confirmation code passed to the page
  */
 function execute($code)
 {
     global $wgUser, $wgOut;
     if (empty($code)) {
         if ($wgUser->isLoggedIn()) {
             $this->showRequestForm();
         } else {
             $title = Title::makeTitle(NS_SPECIAL, 'Userlogin');
             $self = Title::makeTitle(NS_SPECIAL, 'Confirmemail');
             $skin = $wgUser->getSkin();
             $llink = $skin->makeKnownLinkObj($title, wfMsgHtml('loginreqlink'), 'returnto=' . $self->getPrefixedUrl());
             $wgOut->addHtml(wfMsgWikiHtml('confirmemail_needlogin', $llink));
         }
     } else {
         $this->attemptConfirm($code);
     }
 }
开发者ID:k-hasan-19,项目名称:wiki,代码行数:22,代码来源:SpecialConfirmemail.php


示例13: recent_images

function recent_images($rsargs)
{
    global $wgUploadPath, $wgDBprefix;
    $u = User::newFromSession();
    $dbw =& wfGetDB(DB_MASTER);
    $res = $dbw->query('select img_name from ' . $wgDBprefix . 'image where img_user=' . $u->getId() . ';');
    $return_text = '';
    $return_empty = true;
    for ($i = 0; $i < $res->numRows(); $i++) {
        $ret = $res->fetchRow();
        $return_text = $return_text . '<tr><td><img src="' . $wgUploadPath . '/' . $ret['img_name'] . '" height="100px" width="100px" onclick="n=document.getElementById(\'image_name\'); n.value=\'' . $ret['img_name'] . '\';" /></td></tr><tr><td>' . $ret['img_name'] . '</td></tr>';
        $return_empty = false;
    }
    if ($return_empty) {
        return '<tr><td colspan="2"><strong>' . wfMsgWikiHtml('no_recent_images') . '</strong>' . ($u->isLoggedIn() ? '' : wfMsgWikiHtml('try_login')) . '</td></tr>';
    } else {
        return $return_text;
    }
}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:19,代码来源:MeanEditor.php


示例14: showList

 function showList()
 {
     global $wgOut, $wgContLang;
     $fname = "BookSourceList::showList()";
     # First, see if we have a custom list setup in
     # [[Wikipedia:Book sources]] or equivalent.
     $bstitle = Title::makeTitleSafe(NS_PROJECT, wfMsg("booksources"));
     if ($bstitle) {
         $revision = Revision::newFromTitle($bstitle);
         if ($revision) {
             $bstext = $revision->getText();
             if ($bstext) {
                 $bstext = str_replace("MAGICNUMBER", $this->mIsbn, $bstext);
                 $wgOut->addWikiText($bstext);
                 return;
             }
         }
     }
     # Otherwise, use the list of links in the default Language.php file.
     $s = wfMsgWikiHtml('booksourcetext') . "<ul>\n";
     $bs = $wgContLang->getBookstoreList();
     $bsn = array_keys($bs);
     foreach ($bsn as $name) {
         $adr = $bs[$name];
         if (!$this->mIsbn) {
             $adr = explode(":", $adr, 2);
             $adr = explode("/", $adr[1]);
             $a = "";
             while ($a == "") {
                 $a = array_shift($adr);
             }
             $adr = "http://" . $a;
         } else {
             $adr = str_replace("\$1", $this->mIsbn, $adr);
         }
         $name = htmlspecialchars($name);
         $adr = htmlspecialchars($adr);
         $s .= "<li><a href=\"{$adr}\" class=\"external\">{$name}</a></li>\n";
     }
     $s .= "</ul>\n";
     $wgOut->addHTML($s);
 }
开发者ID:puring0815,项目名称:OpenKore,代码行数:42,代码来源:SpecialBooksources.php


示例15: wfSpecialCompare

/**
 * Called to display the Special:Compare page
 *
 * @param unknown_type $par
 * @param unknown_type $specialPage
 */
function wfSpecialCompare($par = NULL, $specialPage)
{
    global $wgOut, $wgScriptPath, $wgUser, $wrSidebarHtml;
    $compareForm = new CompareForm();
    $wgOut->setPageTitle('Compare pages');
    // read query parameters into variables
    if (!$compareForm->readQueryParms($par)) {
        $sideText = '';
        $results = $compareForm->getCompareForm();
    } else {
        $wgOut->addScript("<script type=\"text/javascript\" src=\"{$wgScriptPath}/compare.7.js\"></script>");
        $isGedcom = $compareForm->isGedcom();
        $sideText = '<p>' . ($isGedcom ? 'Matching GEDCOM families' : 'Merge') . ' is a two-step process.  In this compare step, check the boxes above the matching pages.</p>' . ($compareForm->getNamespace() == 'Family' ? '<p>To match children, choose the child number to match with.</p>' : '') . ($isGedcom ? '<p>Then scroll to the bottom of the page and click "Match" to match this family.</p>' . '<p>In the next step you\'ll be given a chance to update the matched pages with information from your GEDCOM</p>' : '<p>Then click "Prepare to merge" at the bottom of the page.</p>' . '<p>In the next step you\\ll be given a chance to decide what information to keep on the merged page.</p>') . '<p><font color="green">Green</font> boxes mean the information is specific and matches exactly.</p>' . '<p><font color="yellow">Yellow</font> boxes mean the information is non-specific (missing some pieces) or is a partial match.</p>' . '<p><font color="red">Red</font> boxes mean the information differs.</p>' . '<p>(<a href="/wiki/Help:Merging_pages">more help</a>)</p>';
        $results = $compareForm->getCompareResults();
    }
    $skin = $wgUser->getSkin();
    //$wrSidebarHtml = $skin->makeKnownLink('Help:Merging pages', "Help", '', '', '', 'class="popup"');
    $wrSidebarHtml = wfMsgWikiHtml('CompareHelp');
    $wgOut->addHTML($results);
}
开发者ID:k-hasan-19,项目名称:wiki,代码行数:26,代码来源:SpecialCompare.php


示例16: execute

 /**
  * Main execution point
  *
  * @param $code Confirmation code passed to the page
  */
 function execute($code)
 {
     global $wgUser, $wgOut;
     if (empty($code)) {
         if ($wgUser->isLoggedIn()) {
             if (User::isValidEmailAddr($wgUser->getEmail())) {
                 $this->showRequestForm();
             } else {
                 $wgOut->addWikiText(wfMsg('confirmemail_noemail'));
             }
         } else {
             $title = SpecialPage::getTitleFor('Userlogin');
             $self = SpecialPage::getTitleFor('Confirmemail');
             $skin = $wgUser->getSkin();
             $llink = $skin->makeKnownLinkObj($title, wfMsgHtml('loginreqlink'), 'returnto=' . $self->getPrefixedUrl());
             $wgOut->addHtml(wfMsgWikiHtml('confirmemail_needlogin', $llink));
         }
     } else {
         $this->attemptConfirm($code);
     }
 }
开发者ID:negabaro,项目名称:alfresco,代码行数:26,代码来源:SpecialConfirmemail.php


示例17: wfSpecialFavoritelist

 function wfSpecialFavoritelist($par)
 {
     global $wgUser, $wgOut, $wgLang, $wgRequest;
     global $wgRCShowFavoritingUsers, $wgEnotifFavoritelist, $wgShowUpdatedMarker;
     // Add feed links
     $flToken = $wgUser->getOption('favoritelisttoken');
     if (!$flToken) {
         $flToken = sha1(mt_rand() . microtime(true));
         $wgUser->setOption('favoritelisttoken', $flToken);
         $wgUser->saveSettings();
     }
     global $wgServer, $wgScriptPath, $wgFeedClasses;
     $apiParams = array('action' => 'feedfavoritelist', 'allrev' => 'allrev', 'flowner' => $wgUser->getName(), 'fltoken' => $flToken);
     $feedTemplate = wfScript('api') . '?';
     foreach ($wgFeedClasses as $format => $class) {
         $theseParams = $apiParams + array('feedformat' => $format);
         $url = $feedTemplate . wfArrayToCGI($theseParams);
         $wgOut->addFeedLink($format, $url);
     }
     $skin = $wgUser->getSkin();
     $specialTitle = SpecialPage::getTitleFor('Favoritelist');
     $wgOut->setRobotPolicy('noindex,nofollow');
     # Anons don't get a favoritelist
     if ($wgUser->isAnon()) {
         $wgOut->setPageTitle(wfMsg('favoritenologin'));
         $llink = $skin->linkKnown(SpecialPage::getTitleFor('Userlogin'), wfMsgHtml('loginreqlink'), array(), array('returnto' => $specialTitle->getPrefixedText()));
         $wgOut->addHTML(wfMsgWikiHtml('favoritelistanontext', $llink));
         return;
     }
     $wgOut->setPageTitle(wfMsg('favoritelist'));
     $sub = wfMsgExt('favoritelistfor', 'parseinline', $wgUser->getName());
     $sub .= '<br />' . FavoritelistEditor::buildTools($wgUser->getSkin());
     $wgOut->setSubtitle($sub);
     if (($mode = FavoritelistEditor::getMode($wgRequest, $par)) !== false) {
         $editor = new FavoritelistEditor();
         $editor->execute($wgUser, $wgOut, $wgRequest, $mode);
         return;
     }
     $this->viewFavList($wgUser, $wgOut, $wgRequest, $mode);
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:40,代码来源:SpecialFavoritelist.php


示例18: uploadMessage

 protected function uploadMessage($statusCode, $details)
 {
     $msg = '';
     switch ($statusCode) {
         case UploadBase::SUCCESS:
             break;
         case UploadBase::EMPTY_FILE:
             $msg = wfMsgHtml('emptyfile');
             break;
         case UploadBase::MIN_LENGTH_PARTNAME:
             $msg = wfMsgHtml('minlength1');
             break;
         case UploadBase::ILLEGAL_FILENAME:
             $filtered = $details['filtered'];
             $msg = wfMsgWikiHtml('illegalfilename', htmlspecialchars($filtered));
             break;
         case UploadBase::OVERWRITE_EXISTING_FILE:
             $msg = $details['overwrite'];
             break;
         case UploadBase::FILETYPE_MISSING:
             $msg = wfMsgExt('filetype-missing', array('parseinline'));
             break;
         case UploadBase::FILETYPE_BADTYPE:
             $finalExt = $details['finalExt'];
             $msg = wfMsgExt('filetype-banned-type', array('parseinline'), htmlspecialchars($finalExt), $this->wg->Lang->commaList($this->wg->FileExtensions), $this->wg->Lang->formatNum(count($this->wg->FileExtensions)));
             break;
         case UploadBase::VERIFICATION_ERROR:
             $msg = wfMsgHtml($details['details'][0]);
             break;
         case UploadBase::UPLOAD_VERIFICATION_ERROR:
             $msg = $details['error'];
             break;
         case self::UPLOAD_PERMISSION_ERROR:
             $msg = wfMsg('badaccess');
             break;
         default:
             throw new MWException(__METHOD__ . ": Unknown value `{$statusCode}`");
     }
     return $msg;
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:40,代码来源:ImageDropController.class.php


示例19: processLoginRequest

 function processLoginRequest($user, $pass)
 {
     global $wgUser, $wgRequest;
     $userlogin = new LoginForm($wgRequest);
     $userlogin->mName = $user;
     $userlogin->mPassword = $pass;
     //$auth = $userlogin->authenticateUserData();
     //$r= new AjaxResponse($auth);
     //return $r;
     $msg = '';
     switch ($userlogin->authenticateUserData()) {
         case LoginForm::SUCCESS:
             $wgUser->setCookies();
             $msg = wfMsgWikiHtml('loginsuccess', $wgUser->getName());
             break;
         case LoginForm::NO_NAME:
         case LoginForm::ILLEGAL:
             $msg = wfMsgWikiHtml('noname');
             break;
         case LoginForm::WRONG_PLUGIN_PASS:
             $msg = wfMsgWikiHtml('wrongpassword');
             break;
         case LoginForm::NOT_EXISTS:
             $msg = wfMsgWikiHtml('nosuchuser', htmlspecialchars($user));
             break;
         case LoginForm::WRONG_PASS:
             $msg = wfMsgWikiHtml('wrongpassword');
             break;
         case LoginForm::EMPTY_PASS:
             $msg = wfMsgWikiHtml('wrongpasswordempty');
             break;
         case LoginForm::RESET_PASS:
             $msg = wfMsgWikiHtml('resetpass_announce');
             break;
         default:
             wfDebugDieBacktrace("Unhandled case value");
     }
     return new AjaxResponse('<div class="pBody">' . $msg . '</div>');
 }
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:39,代码来源:AjaxLogin.body.php


示例20: printSharedImageText

 function printSharedImageText()
 {
     global $wgRepositoryBaseUrl, $wgFetchCommonsDescriptions, $wgOut, $wgUser;
     $url = $wgRepositoryBaseUrl . urlencode($this->mTitle->getDBkey());
     $sharedtext = "<div class='sharedUploadNotice'>" . wfMsgWikiHtml("sharedupload");
     if ($wgRepositoryBaseUrl && !$wgFetchCommonsDescriptions) {
         $sk = $wgUser->getSkin();
         $title = Title::makeTitle(NS_SPECIAL, 'Upload');
         $link = $sk->makeKnownLinkObj($title, wfMsgHtml('shareduploadwiki-linktext'), array('wpDestFile' => urlencode($this->img->getName())));
         $sharedtext .= " " . wfMsgWikiHtml('shareduploadwiki', $link);
     }
     $sharedtext .= "</div>";
     $wgOut->addHTML($sharedtext);
     if ($wgRepositoryBaseUrl && $wgFetchCommonsDescriptions) {
         require_once "HttpFunctions.php";
         $ur = ini_set('allow_url_fopen', true);
         $text = wfGetHTTP($url . '?action=render');
         ini_set('allow_url_fopen', $ur);
         if ($text) {
             $this->mExtraDescription = $text;
         }
     }
 }
开发者ID:k-hasan-19,项目名称:wiki,代码行数:23,代码来源:ImagePage.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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