当前位置: 首页>>代码示例>>PHP>>正文


PHP wfCloseElement函数代码示例

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


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

示例1: showForm

 function showForm()
 {
     global $wgOut, $wgUser, $wgLang, $wgRequest;
     $self = SpecialPage::getTitleFor('Resetpass');
     $form = '<div id="userloginForm">' . wfOpenElement('form', array('method' => 'post', 'action' => $self->getLocalUrl())) . '<h2>' . wfMsgHtml('resetpass_header') . '</h2>' . '<div id="userloginprompt">' . wfMsgExt('resetpass_text', array('parse')) . '</div>' . '<table>' . wfHidden('token', $wgUser->editToken()) . wfHidden('wpName', $this->mName) . wfHidden('wpPassword', $this->mTemporaryPassword) . wfHidden('returnto', $wgRequest->getVal('returnto')) . $this->pretty(array(array('wpName', 'username', 'text', $this->mName), array('wpNewPassword', 'newpassword', 'password', ''), array('wpRetype', 'yourpasswordagain', 'password', ''))) . '<tr>' . '<td></td>' . '<td>' . Xml::checkLabel(wfMsg('remembermypassword'), 'wpRemember', 'wpRemember', $wgRequest->getCheck('wpRemember')) . '</td>' . '</tr>' . '<tr>' . '<td></td>' . '<td>' . wfSubmitButton(wfMsgHtml('resetpass_submit')) . '</td>' . '</tr>' . '</table>' . wfCloseElement('form') . '</div>';
     $wgOut->addHtml($form);
 }
开发者ID:negabaro,项目名称:alfresco,代码行数:7,代码来源:SpecialResetpass.php

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

示例3: wfSpecialMIMEsearch

/**
 * constructor
 */
function wfSpecialMIMEsearch($par = null)
{
    global $wgRequest, $wgTitle, $wgOut;
    $mime = isset($par) ? $par : $wgRequest->getText('mime');
    $wgOut->addHTML(wfElement('form', array('id' => 'specialmimesearch', 'method' => 'get', 'action' => $wgTitle->escapeLocalUrl()), null) . wfOpenElement('label') . wfMsgHtml('mimetype') . wfElement('input', array('type' => 'text', 'size' => 20, 'name' => 'mime', 'value' => $mime), '') . ' ' . wfElement('input', array('type' => 'submit', 'value' => wfMsg('ilsubmit')), '') . wfCloseElement('label') . wfCloseElement('form'));
    list($major, $minor) = wfSpecialMIMEsearchParse($mime);
    if ($major == '' or $minor == '' or !wfSpecialMIMEsearchValidType($major)) {
        return;
    }
    $wpp = new MIMEsearchPage($major, $minor);
    list($limit, $offset) = wfCheckLimits();
    $wpp->doQuery($offset, $limit);
}
开发者ID:negabaro,项目名称:alfresco,代码行数:16,代码来源:SpecialMIMEsearch.php

示例4: 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();
         $message = WikiError::isError($ok) ? 'confirmemail_sendfailed' : 'confirmemail_sent';
         $wgOut->addWikiText(wfMsg($message));
     } else {
         if ($wgUser->isEmailConfirmed()) {
             $time = $wgLang->timeAndDate($wgUser->mEmailAuthenticated, true);
             $wgOut->addWikiText(wfMsg('emailauthenticated', $time));
         }
         $wgOut->addWikiText(wfMsg('confirmemail_text'));
         $self = Title::makeTitle(NS_SPECIAL, '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:k-hasan-19,项目名称:wiki,代码行数:24,代码来源:SpecialConfirmemail.php

示例5: blockedPage

 /**
  * Call the stock "user is blocked" page
  */
 function blockedPage()
 {
     global $wgOut, $wgUser;
     $wgOut->blockedPage(false);
     # Standard block notice on the top, don't 'return'
     # If the user made changes, preserve them when showing the markup
     # (This happens when a user is blocked during edit, for instance)
     $first = $this->firsttime || !$this->save && $this->textbox1 == '';
     if ($first) {
         $source = $this->mTitle->exists() ? $this->getContent() : false;
     } else {
         $source = $this->textbox1;
     }
     # Spit out the source or the user's modified version
     if ($source !== false) {
         $rows = $wgUser->getOption('rows');
         $cols = $wgUser->getOption('cols');
         $attribs = array('id' => 'wpTextbox1', 'name' => 'wpTextbox1', 'cols' => $cols, 'rows' => $rows, 'readonly' => 'readonly');
         $wgOut->addHtml('<hr />');
         $wgOut->addWikiText(wfMsg($first ? 'blockedoriginalsource' : 'blockededitsource', $this->mTitle->getPrefixedText()));
         $wgOut->addHtml(wfOpenElement('textarea', $attribs) . htmlspecialchars($source) . wfCloseElement('textarea'));
     }
 }
开发者ID:puring0815,项目名称:OpenKore,代码行数:26,代码来源:EditPage.php

示例6: renderNode

 /**
  * Returns a string with a HTML represenation of the given page.
  * $title must be a Title object
  */
 function renderNode(&$title, $mode = NULL, $children = false, $loadchildren = false, $depth = 1)
 {
     global $wgCategoryTreeOmitNamespace, $wgCategoryTreeDefaultMode;
     static $uniq = 0;
     if ($mode === NULL) {
         $wgCategoryTreeDefaultMode;
     }
     $load = false;
     if ($children && $loadchildren) {
         $uniq += 1;
         $load = 'ct-' . $uniq . '-' . mt_rand(1, 100000);
         $children = false;
     }
     $ns = $title->getNamespace();
     $key = $title->getDBkey();
     #$trans = $title->getLocalizedText();
     $trans = '';
     #place holder for when translated titles are available
     #when showing only categories, omit namespace in label unless we explicitely defined the configuration setting
     #patch contributed by Manuel Schneider <manuel.schneider@wikimedia.ch>, Bug 8011
     if ($wgCategoryTreeOmitNamespace || $mode == CT_MODE_CATEGORIES) {
         $label = htmlspecialchars($title->getText());
     } else {
         $label = htmlspecialchars($title->getPrefixedText());
     }
     if ($trans && $trans != $label) {
         $label .= ' ' . wfElement('i', array('class' => 'translation'), $trans);
     }
     $wikiLink = $title->getLocalURL();
     $labelClass = 'CategoryTreeLabel ' . ' CategoryTreeLabelNs' . $ns;
     if ($ns == NS_CATEGORY) {
         $labelClass .= ' CategoryTreeLabelCategory';
     } else {
         $labelClass .= ' CategoryTreeLabelPage';
     }
     if ($ns % 2 > 0) {
         $labelClass .= ' CategoryTreeLabelTalk';
     }
     $linkattr = array('href' => '#');
     if ($load) {
         $linkattr['id'] = $load;
     }
     if (!$children) {
         $txt = '+';
         $linkattr['onclick'] = "this.href='javascript:void(0)'; categoryTreeExpandNode('" . Xml::escapeJsString($key) . "','" . $mode . "',this);";
         # Don't load this message for ajax requests, so that we don't have to initialise $wgLang
         $linkattr['title'] = $this->mIsAjaxRequest ? '##LOAD##' : self::msg('expand');
     } else {
         $txt = '–';
         #NOTE: that's not a minus but a unicode ndash!
         $linkattr['onclick'] = "this.href='javascript:void(0)'; categoryTreeCollapseNode('" . Xml::escapeJsString($key) . "','" . $mode . "',this);";
         $linkattr['title'] = self::msg('collapse');
         $linkattr['class'] = 'CategoryTreeLoaded';
     }
     $s = '';
     #NOTE: things in CategoryTree.js rely on the exact order of tags!
     #      Specifically, the CategoryTreeChildren div must be the first
     #      sibling with nodeName = DIV of the grandparent of the expland link.
     $s .= wfOpenElement('div', array('class' => 'CategoryTreeSection'));
     $s .= wfOpenElement('div', array('class' => 'CategoryTreeItem'));
     if ($ns == NS_CATEGORY) {
         $s .= wfOpenElement('span', array('class' => 'CategoryTreeBullet'));
         $s .= '[' . wfElement('a', $linkattr, $txt) . '] ';
         $s .= wfCloseElement('span');
     } else {
         $s .= ' ';
     }
     $s .= wfOpenElement('a', array('class' => $labelClass, 'href' => $wikiLink)) . $label . wfCloseElement('a');
     $s .= wfCloseElement('div');
     $s .= "\n\t\t";
     $s .= wfOpenElement('div', array('class' => 'CategoryTreeChildren', 'style' => $children ? "display:block" : "display:none"));
     //HACK here?
     if ($children) {
         $s .= $this->renderChildren($title, $mode, $depth);
     }
     $s .= wfCloseElement('div');
     $s .= wfCloseElement('div');
     if ($load) {
         $s .= "\n\t\t";
         $s .= wfOpenElement('script', array('type' => 'text/javascript'));
         $s .= 'categoryTreeExpandNode("' . Xml::escapeJsString($key) . '", "' . $mode . '", document.getElementById("' . $load . '") );';
         $s .= wfCloseElement('script');
     }
     $s .= "\n\t\t";
     return $s;
 }
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:90,代码来源:CategoryTreeFunctions.php

示例7: getPageHeader

 /**
  * Show a drop down list to select a group as well as a user name
  * search box.
  * @todo localize
  */
 function getPageHeader()
 {
     $self = $this->getTitle();
     # Form tag
     $out = wfOpenElement('form', array('method' => 'post', 'action' => $self->getLocalUrl()));
     # Group drop-down list
     $out .= wfElement('label', array('for' => 'group'), wfMsg('group')) . ' ';
     $out .= wfOpenElement('select', array('name' => 'group'));
     $out .= wfElement('option', array('value' => ''), wfMsg('group-all'));
     # Item for "all groups"
     $groups = User::getAllGroups();
     foreach ($groups as $group) {
         $attribs = array('value' => $group);
         if ($group == $this->requestedGroup) {
             $attribs['selected'] = 'selected';
         }
         $out .= wfElement('option', $attribs, User::getGroupName($group));
     }
     $out .= wfCloseElement('select') . ' ';
     # . wfElement( 'br' );
     # Username field
     $out .= wfElement('label', array('for' => 'username'), wfMsg('specialloguserlabel')) . ' ';
     $out .= wfElement('input', array('type' => 'text', 'id' => 'username', 'name' => 'username', 'value' => $this->requestedUser)) . ' ';
     # Preserve offset and limit
     if ($this->offset) {
         $out .= wfElement('input', array('type' => 'hidden', 'name' => 'offset', 'value' => $this->offset));
     }
     if ($this->limit) {
         $out .= wfElement('input', array('type' => 'hidden', 'name' => 'limit', 'value' => $this->limit));
     }
     # Submit button and form bottom
     $out .= wfElement('input', array('type' => 'submit', 'value' => wfMsg('allpagessubmit')));
     $out .= wfCloseElement('form');
     return $out;
 }
开发者ID:k-hasan-19,项目名称:wiki,代码行数:40,代码来源:SpecialListusers.php

示例8: wlHandleClear

/**
 * Allow the user to clear their watchlist
 *
 * @param $out Output object
 * @param $request Request object
 * @param $par Parameters passed to the watchlist page
 * @return bool True if it's been taken care of; false indicates the watchlist
 * 				code needs to do something further
 */
function wlHandleClear(&$out, &$request, $par)
{
    # Check this function has something to do
    if ($request->getText('action') == 'clear' || $par == 'clear') {
        global $wgUser;
        $out->setPageTitle(wfMsgHtml('clearwatchlist'));
        $count = wlCountItems($wgUser);
        if ($count > 0) {
            # See if we're clearing or confirming
            if ($request->wasPosted() && $wgUser->matchEditToken($request->getText('token'), 'clearwatchlist')) {
                # Clearing, so do it and report the result
                $dbw =& wfGetDB(DB_MASTER);
                // WERELATE - don't remove pages in your trees; call WatchedItem::removeWatch
                // $dbw->delete( 'watchlist', array( 'wl_user' => $wgUser->mId ), 'wlHandleClear' );
                $sql = 'SELECT wl_namespace, wl_title FROM watchlist where wl_user=' . $dbw->addQuotes($wgUser->mId) . ' AND NOT EXISTS (SELECT fp_tree_id FROM familytree_page WHERE fp_namespace=(wl_namespace & ~1) AND fp_title=wl_title AND fp_user_id=wl_user)';
                $rows = $dbw->query($sql, 'wlHandleClear');
                while ($row = $dbw->fetchObject($rows)) {
                    $title = Title::makeTitle($row->wl_namespace, $row->wl_title);
                    if ($title) {
                        $wl = WatchedItem::fromUserTitle($wgUser, $title);
                        $wl->removeWatch();
                    }
                }
                $dbw->freeResult($rows);
                $out->addWikiText(wfMsg('watchlistcleardone', $count));
                $out->returnToMain();
            } else {
                # Confirming, so show a form
                $wlTitle = Title::makeTitle(NS_SPECIAL, 'Watchlist');
                $out->addHTML(wfElement('form', array('method' => 'post', 'action' => $wlTitle->getLocalUrl('action=clear')), NULL));
                $out->addWikiText(wfMsg('watchlistcount', $count));
                $out->addWikiText(wfMsg('watchlistcleartext'));
                $out->addHTML(wfElement('input', array('type' => 'hidden', 'name' => 'token', 'value' => $wgUser->editToken('clearwatchlist')), ''));
                $out->addHTML(wfElement('input', array('type' => 'submit', 'name' => 'submit', 'value' => wfMsgHtml('watchlistclearbutton')), ''));
                $out->addHTML(wfCloseElement('form'));
            }
            return true;
        } else {
            # Nothing on the watchlist; nothing to do here
            $out->addWikiText(wfMsg('nowatchlist'));
            $out->returnToMain();
            return true;
        }
    } else {
        return false;
    }
}
开发者ID:k-hasan-19,项目名称:wiki,代码行数:56,代码来源:SpecialWatchlist.php

示例9: recXmlPrint

 /**
  * This method takes an array and converts it into an xml.
  * There are several noteworthy cases:
  *
  *  If array contains a key '_element', then the code assumes that ALL other keys are not important and replaces them with the value['_element'].
  *	Example:	name='root',  value = array( '_element'=>'page', 'x', 'y', 'z') creates <root>  <page>x</page>  <page>y</page>  <page>z</page> </root>
  *
  *  If any of the array's element key is '*', then the code treats all other key->value pairs as attributes, and the value['*'] as the element's content.
  *	Example:	name='root',  value = array( '*'=>'text', 'lang'=>'en', 'id'=>10)   creates  <root lang='en' id='10'>text</root>
  *
  * If neither key is found, all keys become element names, and values become element content.
  * The method is recursive, so the same rules apply to any sub-arrays.
  */
 function recXmlPrint($elemName, $elemValue, $indent)
 {
     if (!is_null($indent)) {
         $indent += 2;
         $indstr = "\n" . str_repeat(" ", $indent);
     } else {
         $indstr = '';
     }
     switch (gettype($elemValue)) {
         case 'array':
             if (isset($elemValue['*'])) {
                 $subElemContent = $elemValue['*'];
                 unset($elemValue['*']);
             } else {
                 $subElemContent = null;
             }
             if (isset($elemValue['_element'])) {
                 $subElemIndName = $elemValue['_element'];
                 unset($elemValue['_element']);
             } else {
                 $subElemIndName = null;
             }
             $indElements = array();
             $subElements = array();
             foreach ($elemValue as $subElemId => &$subElemValue) {
                 if (gettype($subElemId) === 'integer') {
                     $indElements[] = $subElemValue;
                     unset($elemValue[$subElemId]);
                 } elseif (is_array($subElemValue)) {
                     $subElements[$subElemId] = $subElemValue;
                     unset($elemValue[$subElemId]);
                 }
             }
             if (is_null($subElemIndName) && !empty($indElements)) {
                 ApiBase::dieDebug(__METHOD__, "({$elemName}, ...) has integer keys without _element value. Use ApiResult::setIndexedTagName().");
             }
             if (!empty($subElements) && !empty($indElements) && !is_null($subElemContent)) {
                 ApiBase::dieDebug(__METHOD__, "({$elemName}, ...) has content and subelements");
             }
             if (!is_null($subElemContent)) {
                 $this->printText($indstr . wfElement($elemName, $elemValue, $subElemContent));
             } elseif (empty($indElements) && empty($subElements)) {
                 $this->printText($indstr . wfElement($elemName, $elemValue));
             } else {
                 $this->printText($indstr . wfElement($elemName, $elemValue, null));
                 foreach ($subElements as $subElemId => &$subElemValue) {
                     $this->recXmlPrint($subElemId, $subElemValue, $indent);
                 }
                 foreach ($indElements as $subElemId => &$subElemValue) {
                     $this->recXmlPrint($subElemIndName, $subElemValue, $indent);
                 }
                 $this->printText($indstr . wfCloseElement($elemName));
             }
             break;
         case 'object':
             // ignore
             break;
         default:
             $this->printText($indstr . wfElement($elemName, null, $elemValue));
             break;
     }
 }
开发者ID:mediawiki-extensions,项目名称:bizzwiki,代码行数:75,代码来源:ApiFormatXml.php

示例10: getPageHeader

 /**
  * Show a namespace selection form for filtering
  *
  * @return string
  */
 function getPageHeader()
 {
     $thisTitle = Title::makeTitle(NS_SPECIAL, $this->getName());
     $form = wfOpenElement('form', array('method' => 'post', 'action' => $thisTitle->getLocalUrl()));
     $form .= wfElement('label', array('for' => 'namespace'), wfMsg('namespace')) . ' ';
     $form .= HtmlNamespaceSelector($this->namespace);
     # Preserve the offset and limit
     $form .= wfElement('input', array('type' => 'hidden', 'name' => 'offset', 'value' => $this->offset));
     $form .= wfElement('input', array('type' => 'hidden', 'name' => 'limit', 'value' => $this->limit));
     $form .= wfElement('input', array('type' => 'submit', 'name' => 'submit', 'id' => 'submit', 'value' => wfMsg('allpagessubmit')));
     $form .= wfCloseElement('form');
     return $form;
 }
开发者ID:k-hasan-19,项目名称:wiki,代码行数:18,代码来源:SpecialNewpages.php

示例11: showRevision

 function showRevision($timestamp)
 {
     global $wgLang, $wgUser, $wgOut;
     $self = SpecialPage::getTitleFor('Undelete');
     $skin = $wgUser->getSkin();
     if (!preg_match("/[0-9]{14}/", $timestamp)) {
         return 0;
     }
     $archive = new PageArchive($this->mTargetObj);
     $rev = $archive->getRevision($timestamp);
     if (!$rev) {
         $wgOut->addWikiMsg('undeleterevision-missing');
         return;
     }
     $wgOut->setPageTitle(wfMsg('undeletepage'));
     $link = $skin->makeKnownLinkObj(SpecialPage::getTitleFor('Undelete', $this->mTargetObj->getPrefixedDBkey()), htmlspecialchars($this->mTargetObj->getPrefixedText()));
     $time = htmlspecialchars($wgLang->timeAndDate($timestamp, true));
     $user = $skin->userLink($rev->getUser(), $rev->getUserText()) . $skin->userToolLinks($rev->getUser(), $rev->getUserText());
     if ($this->mDiff) {
         $previousRev = $archive->getPreviousRevision($timestamp);
         if ($previousRev) {
             $this->showDiff($previousRev, $rev);
             if ($wgUser->getOption('diffonly')) {
                 return;
             } else {
                 $wgOut->addHtml('<hr />');
             }
         } else {
             $wgOut->addHtml(wfMsgHtml('undelete-nodiff'));
         }
     }
     $wgOut->addHtml('<p>' . wfMsgHtml('undelete-revision', $link, $time, $user) . '</p>');
     wfRunHooks('UndeleteShowRevision', array($this->mTargetObj, $rev));
     if ($this->mPreview) {
         $wgOut->addHtml("<hr />\n");
         $wgOut->addWikiTextTitleTidy($rev->getText(), $this->mTargetObj, false);
     }
     $wgOut->addHtml(wfElement('textarea', array('readonly' => 'readonly', 'cols' => intval($wgUser->getOption('cols')), 'rows' => intval($wgUser->getOption('rows'))), $rev->getText() . "\n") . wfOpenElement('div') . wfOpenElement('form', array('method' => 'post', 'action' => $self->getLocalURL("action=submit"))) . wfElement('input', array('type' => 'hidden', 'name' => 'target', 'value' => $this->mTargetObj->getPrefixedDbKey())) . wfElement('input', array('type' => 'hidden', 'name' => 'timestamp', 'value' => $timestamp)) . wfElement('input', array('type' => 'hidden', 'name' => 'wpEditToken', 'value' => $wgUser->editToken())) . wfElement('input', array('type' => 'submit', 'name' => 'preview', 'value' => wfMsg('showpreview'))) . wfElement('input', array('name' => 'diff', 'type' => 'submit', 'value' => wfMsg('showdiff'))) . wfCloseElement('form') . wfCloseElement('div'));
 }
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:39,代码来源:SpecialUndelete.php

示例12: execute

 function execute()
 {
     global $wgOut, $wgTitle;
     $wgOut->addHTML(wfElement('form', array('id' => 'specialcite', 'method' => 'get', 'action' => $wgTitle->escapeLocalUrl()), null) . wfOpenElement('label') . wfMsgHtml('cite_page') . ' ' . wfElement('input', array('type' => 'text', 'size' => 20, 'name' => 'page', 'value' => is_object($this->mTitle) ? $this->mTitle->getPrefixedText() : ''), '') . ' ' . wfElement('input', array('type' => 'submit', 'value' => wfMsgHtml('cite_submit')), '') . wfCloseElement('label') . wfCloseElement('form'));
 }
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:5,代码来源:SpecialCite_body.php

示例13: makeInputForm

 /**
  * Input form for entering a category
  */
 function makeInputForm()
 {
     global $wgScript;
     $thisTitle = Title::makeTitle(NS_SPECIAL, $this->getName());
     $form = '';
     $form .= wfOpenElement('form', array('name' => 'categorytree', 'method' => 'get', 'action' => $wgScript));
     $form .= wfElement('input', array('type' => 'hidden', 'name' => 'title', 'value' => $thisTitle->getPrefixedDbKey()));
     $form .= wfElement('label', array('for' => 'target'), wfMsg('categorytree-category')) . ' ';
     $form .= wfElement('input', array('type' => 'text', 'name' => 'target', 'id' => 'target', 'value' => $this->target)) . ' ';
     $form .= wfOpenElement('select', array('name' => 'mode'));
     $form .= wfElement('option', array('value' => 'categories') + ($this->mode == CT_MODE_CATEGORIES ? array('selected' => 'selected') : array()), wfMsg('categorytree-mode-categories'));
     $form .= wfElement('option', array('value' => 'pages') + ($this->mode == CT_MODE_PAGES ? array('selected' => 'selected') : array()), wfMsg('categorytree-mode-pages'));
     $form .= wfElement('option', array('value' => 'all') + ($this->mode == CT_MODE_ALL ? array('selected' => 'selected') : array()), wfMsg('categorytree-mode-all'));
     $form .= wfCloseElement('select');
     $form .= wfElement('input', array('type' => 'submit', 'name' => 'dotree', 'value' => wfMsg('categorytree-go')));
     $form .= wfCloseElement('form');
     return $form;
 }
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:21,代码来源:CategoryTreePage.php

示例14: getPageHeader

 /**
  * Show a namespace selection form for filtering
  *
  * @return string
  */
 function getPageHeader()
 {
     $thisTitle = Title::makeTitle(NS_SPECIAL, $this->getName());
     $form = wfOpenElement('form', array('method' => 'get', 'action' => $thisTitle->getLocalUrl()));
     $form .= wfElement('label', array('for' => 'status'), 'Status') . ' ';
     $form .= StructuredData::addSelectToHtml(0, 'status', self::$STATUS_OPTIONS, $this->status, '', false);
     # Preserve the offset and limit
     $form .= wfElement('input', array('type' => 'hidden', 'name' => 'offset', 'value' => $this->offset));
     $form .= wfElement('input', array('type' => 'hidden', 'name' => 'limit', 'value' => $this->limit));
     $form .= wfElement('input', array('type' => 'submit', 'name' => 'submit', 'id' => 'submit', 'value' => wfMsg('allpagessubmit')));
     $form .= wfCloseElement('form');
     return $form;
 }
开发者ID:k-hasan-19,项目名称:wiki,代码行数:18,代码来源:SpecialGedcoms.php

示例15: showRevision

 function showRevision($timestamp)
 {
     global $wgLang, $wgUser, $wgOut;
     if (!preg_match("/[0-9]{14}/", $timestamp)) {
         return 0;
     }
     $archive = new PageArchive($this->mTargetObj);
     $rev = $archive->getRevision($timestamp);
     $wgOut->setPagetitle(wfMsg("undeletepage"));
     $wgOut->addWikiText("(" . wfMsg("undeleterevision", $wgLang->timeAndDate($timestamp)) . ")\n");
     if (!$rev) {
         $wgOut->addWikiText(wfMsg('undeleterevision-missing'));
         return;
     }
     wfRunHooks('UndeleteShowRevision', array($this->mTargetObj, $rev));
     if ($this->mPreview) {
         $wgOut->addHtml("<hr />\n");
         $article = new Article($archive->title);
         # OutputPage wants an Article obj
         $wgOut->addPrimaryWikiText($rev->getText(), $article, false);
     }
     $self = SpecialPage::getTitleFor("Undelete");
     $wgOut->addHtml(wfElement('textarea', array('readonly' => true, 'cols' => intval($wgUser->getOption('cols')), 'rows' => intval($wgUser->getOption('rows'))), $rev->getText() . "\n") . wfOpenElement('div') . wfOpenElement('form', array('method' => 'post', 'action' => $self->getLocalURL("action=submit"))) . wfElement('input', array('type' => 'hidden', 'name' => 'target', 'value' => $this->mTargetObj->getPrefixedDbKey())) . wfElement('input', array('type' => 'hidden', 'name' => 'timestamp', 'value' => $timestamp)) . wfElement('input', array('type' => 'hidden', 'name' => 'wpEditToken', 'value' => $wgUser->editToken())) . wfElement('input', array('type' => 'hidden', 'name' => 'preview', 'value' => '1')) . wfElement('input', array('type' => 'submit', 'value' => wfMsg('showpreview'))) . wfCloseElement('form') . wfCloseElement('div'));
 }
开发者ID:negabaro,项目名称:alfresco,代码行数:24,代码来源:SpecialUndelete.php


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