當前位置: 首頁>>代碼示例>>PHP>>正文


PHP EditPage::getEditToolbar方法代碼示例

本文整理匯總了PHP中EditPage::getEditToolbar方法的典型用法代碼示例。如果您正苦於以下問題:PHP EditPage::getEditToolbar方法的具體用法?PHP EditPage::getEditToolbar怎麽用?PHP EditPage::getEditToolbar使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在EditPage的用法示例。


在下文中一共展示了EditPage::getEditToolbar方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getWriteForm

	/**
	 * Get the editor form for writing a new thread, a reply, etc.
	 *
	 * @param $type String: either 'addthread' or 'editthread', depending on
	 * what we are doing to a thread.
	 * @param $action Array: action parameter(s) to be passed to the WikiForum
	 * special page call (i.e. array( 'thread' => $threadId ))
	 * @param $input String: usually whatever WikiForumGui::getInput() returns
	 * @param $height String: height of the textarea, i.e. '10em'
	 * @param $text_prev
	 * @param $saveButton String: save button text
	 * @return String: HTML
	 */
	public static function getWriteForm( $type, $action, $input, $height, $text_prev, $saveButton ) {
		global $wgOut, $wgUser, $wgWikiForumAllowAnonymous;

		$output = '';

		if ( $wgWikiForumAllowAnonymous || $wgUser->isLoggedIn() ) {
			// Required for the edit buttons to display
			$wgOut->addModules( 'mediawiki.action.edit' );
			$toolbar = EditPage::getEditToolbar();
			$specialPage = SpecialPage::getTitleFor( 'WikiForum' );

			$output = '<form name="frmMain" method="post" action="' . $specialPage->escapeFullURL( $action ) . '" id="writereply">
			<table class="mw-wikiforum-frame" cellspacing="10">' . $input . '
				<tr>
					<td>' . $toolbar . '</td>
				</tr>
				<tr>
					<td><textarea name="frmText" id="wpTextbox1" style="height: ' . $height . ';">' . $text_prev . '</textarea></td>
				</tr>
				<tr>
					<td>
						<input name="butSave" type="submit" value="' . $saveButton . '" accesskey="s" title="' . $saveButton . ' [s]" />
						<input name="butPreview" type="submit" value="' . wfMsg( 'wikiforum-button-preview' ) . '" accesskey="p" title="' . wfMsg( 'wikiforum-button-preview' ) . ' [p]" />';
			if ( $type == 'addthread' ) {
				$output .= ' <input name="butCancel" type="button" value="' . wfMsg( 'cancel' ) . '" accesskey="c" onclick="javascript:history.back();" title="' . wfMsg( 'cancel' ) . ' [c]" />';
			}
			$output .= '</td>
					</td>
				</tr>
			</table>
			</form>' . "\n";
		}
		return $output;
	}
開發者ID:realsoc,項目名稱:mediawiki-extensions,代碼行數:47,代碼來源:WikiForumGui.php

示例2: showEditForm

 /**
  * Send the edit form and related headers to $wgOut
  * @param $formCallback Callback that takes an OutputPage parameter; will be called
  *     during form output near the top, for captchas and the like.
  */
 function showEditForm($formCallback = null)
 {
     global $wgOut, $wgUser;
     wfProfileIn(__METHOD__);
     #need to parse the preview early so that we know which templates are used,
     #otherwise users with "show preview after edit box" will get a blank list
     #we parse this near the beginning so that setHeaders can do the title
     #setting work instead of leaving it in getPreviewText
     $previewOutput = '';
     if ($this->formtype == 'preview') {
         $previewOutput = $this->getPreviewText();
     }
     wfRunHooks('EditPage::showEditForm:initial', array(&$this));
     $this->setHeaders();
     if ($this->showHeader() === false) {
         wfProfileOut(__METHOD__);
         return;
     }
     $wgOut->addHTML($this->editFormPageTop);
     if ($wgUser->getOption('previewontop')) {
         $this->displayPreviewArea($previewOutput, true);
     }
     $wgOut->addHTML($this->editFormTextTop);
     $showToolbar = true;
     if ($this->wasDeletedSinceLastEdit()) {
         if ($this->formtype == 'save') {
             // Hide the toolbar and edit area, user can click preview to get it back
             // Add an confirmation checkbox and explanation.
             $showToolbar = false;
         } else {
             $wgOut->wrapWikiMsg("<div class='error mw-deleted-while-editing'>\n\$1\n</div>", 'deletedwhileediting');
         }
     }
     $wgOut->addHTML(Html::openElement('form', array('id' => 'editform', 'name' => 'editform', 'method' => 'post', 'action' => $this->getActionURL($this->getContextTitle()), 'enctype' => 'multipart/form-data')));
     if (is_callable($formCallback)) {
         call_user_func_array($formCallback, array(&$wgOut));
     }
     wfRunHooks('EditPage::showEditForm:fields', array(&$this, &$wgOut));
     // Put these up at the top to ensure they aren't lost on early form submission
     $this->showFormBeforeText();
     if ($this->wasDeletedSinceLastEdit() && 'save' == $this->formtype) {
         $username = $this->lastDelete->user_name;
         $comment = $this->lastDelete->log_comment;
         // It is better to not parse the comment at all than to have templates expanded in the middle
         // TODO: can the checkLabel be moved outside of the div so that wrapWikiMsg could be used?
         $key = $comment === '' ? 'confirmrecreate-noreason' : 'confirmrecreate';
         $wgOut->addHTML('<div class="mw-confirm-recreate">' . wfMsgExt($key, 'parseinline', $username, "<nowiki>{$comment}</nowiki>") . Xml::checkLabel(wfMsg('recreate'), 'wpRecreate', 'wpRecreate', false, array('title' => Linker::titleAttrib('recreate'), 'tabindex' => 1, 'id' => 'wpRecreate')) . '</div>');
     }
     # If a blank edit summary was previously provided, and the appropriate
     # user preference is active, pass a hidden tag as wpIgnoreBlankSummary. This will stop the
     # user being bounced back more than once in the event that a summary
     # is not required.
     #####
     # For a bit more sophisticated detection of blank summaries, hash the
     # automatic one and pass that in the hidden field wpAutoSummary.
     if ($this->missingSummary || $this->section == 'new' && $this->nosummary) {
         $wgOut->addHTML(Html::hidden('wpIgnoreBlankSummary', true));
     }
     $autosumm = $this->autoSumm ? $this->autoSumm : md5($this->summary);
     $wgOut->addHTML(Html::hidden('wpAutoSummary', $autosumm));
     $wgOut->addHTML(Html::hidden('oldid', $this->oldid));
     if ($this->section == 'new') {
         $this->showSummaryInput(true, $this->summary);
         $wgOut->addHTML($this->getSummaryPreview(true, $this->summary));
     }
     $wgOut->addHTML($this->editFormTextBeforeContent);
     if (!$this->isCssJsSubpage && $showToolbar && $wgUser->getOption('showtoolbar')) {
         $wgOut->addHTML(EditPage::getEditToolbar());
     }
     if ($this->isConflict) {
         // In an edit conflict bypass the overrideable content form method
         // and fallback to the raw wpTextbox1 since editconflicts can't be
         // resolved between page source edits and custom ui edits using the
         // custom edit ui.
         $this->textbox2 = $this->textbox1;
         $this->textbox1 = $this->getCurrentText();
         $this->showTextbox1();
     } else {
         $this->showContentForm();
     }
     $wgOut->addHTML($this->editFormTextAfterContent);
     $wgOut->addWikiText($this->getCopywarn());
     $wgOut->addHTML($this->editFormTextAfterWarn);
     $this->showStandardInputs();
     $this->showFormAfterText();
     $this->showTosSummary();
     $this->showEditTools();
     $wgOut->addHTML($this->editFormTextAfterTools . "\n");
     $wgOut->addHTML(Html::rawElement('div', array('class' => 'templatesUsed'), Linker::formatTemplates($this->getTemplates(), $this->preview, $this->section != '')));
     $wgOut->addHTML(Html::rawElement('div', array('class' => 'hiddencats'), Linker::formatHiddenCategories($this->mArticle->getHiddenCategories())));
     if ($this->isConflict) {
         $this->showConflict();
     }
     $wgOut->addHTML($this->editFormTextBottom . "\n</form>\n");
     if (!$wgUser->getOption('previewontop')) {
//.........這裏部分代碼省略.........
開發者ID:slackfaith,項目名稱:deadbrain_site,代碼行數:101,代碼來源:EditPage.php

示例3: showEditForm

 /**
  * Send the edit form and related headers to $wgOut
  * @param callable|null $formCallback That takes an OutputPage parameter; will be called
  *     during form output near the top, for captchas and the like.
  */
 function showEditForm($formCallback = null)
 {
     global $wgOut, $wgUser;
     wfProfileIn(__METHOD__);
     # need to parse the preview early so that we know which templates are used,
     # otherwise users with "show preview after edit box" will get a blank list
     # we parse this near the beginning so that setHeaders can do the title
     # setting work instead of leaving it in getPreviewText
     $previewOutput = '';
     if ($this->formtype == 'preview') {
         $previewOutput = $this->getPreviewText();
     }
     wfRunHooks('EditPage::showEditForm:initial', array(&$this, &$wgOut));
     $this->setHeaders();
     if ($this->showHeader() === false) {
         wfProfileOut(__METHOD__);
         return;
     }
     $wgOut->addHTML($this->editFormPageTop);
     if ($wgUser->getOption('previewontop')) {
         $this->displayPreviewArea($previewOutput, true);
     }
     $wgOut->addHTML($this->editFormTextTop);
     $showToolbar = true;
     if ($this->wasDeletedSinceLastEdit()) {
         if ($this->formtype == 'save') {
             // Hide the toolbar and edit area, user can click preview to get it back
             // Add an confirmation checkbox and explanation.
             $showToolbar = false;
         } else {
             $wgOut->wrapWikiMsg("<div class='error mw-deleted-while-editing'>\n\$1\n</div>", 'deletedwhileediting');
         }
     }
     // @todo add EditForm plugin interface and use it here!
     //       search for textarea1 and textares2, and allow EditForm to override all uses.
     $wgOut->addHTML(Html::openElement('form', array('id' => self::EDITFORM_ID, 'name' => self::EDITFORM_ID, 'method' => 'post', 'action' => $this->getActionURL($this->getContextTitle()), 'enctype' => 'multipart/form-data')));
     if (is_callable($formCallback)) {
         call_user_func_array($formCallback, array(&$wgOut));
     }
     // Add an empty field to trip up spambots
     $wgOut->addHTML(Xml::openElement('div', array('id' => 'antispam-container', 'style' => 'display: none;')) . Html::rawElement('label', array('for' => 'wpAntiSpam'), wfMessage('simpleantispam-label')->parse()) . Xml::element('input', array('type' => 'text', 'name' => 'wpAntispam', 'id' => 'wpAntispam', 'value' => '')) . Xml::closeElement('div'));
     wfRunHooks('EditPage::showEditForm:fields', array(&$this, &$wgOut));
     // Put these up at the top to ensure they aren't lost on early form submission
     $this->showFormBeforeText();
     if ($this->wasDeletedSinceLastEdit() && 'save' == $this->formtype) {
         $username = $this->lastDelete->user_name;
         $comment = $this->lastDelete->log_comment;
         // It is better to not parse the comment at all than to have templates expanded in the middle
         // TODO: can the checkLabel be moved outside of the div so that wrapWikiMsg could be used?
         $key = $comment === '' ? 'confirmrecreate-noreason' : 'confirmrecreate';
         $wgOut->addHTML('<div class="mw-confirm-recreate">' . wfMessage($key, $username, "<nowiki>{$comment}</nowiki>")->parse() . Xml::checkLabel(wfMessage('recreate')->text(), 'wpRecreate', 'wpRecreate', false, array('title' => Linker::titleAttrib('recreate'), 'tabindex' => 1, 'id' => 'wpRecreate')) . '</div>');
     }
     # When the summary is hidden, also hide them on preview/show changes
     if ($this->nosummary) {
         $wgOut->addHTML(Html::hidden('nosummary', true));
     }
     # If a blank edit summary was previously provided, and the appropriate
     # user preference is active, pass a hidden tag as wpIgnoreBlankSummary. This will stop the
     # user being bounced back more than once in the event that a summary
     # is not required.
     #####
     # For a bit more sophisticated detection of blank summaries, hash the
     # automatic one and pass that in the hidden field wpAutoSummary.
     if ($this->missingSummary || $this->section == 'new' && $this->nosummary) {
         $wgOut->addHTML(Html::hidden('wpIgnoreBlankSummary', true));
     }
     if ($this->undidRev) {
         $wgOut->addHTML(Html::hidden('wpUndidRevision', $this->undidRev));
     }
     if ($this->hasPresetSummary) {
         // If a summary has been preset using &summary= we don't want to prompt for
         // a different summary. Only prompt for a summary if the summary is blanked.
         // (Bug 17416)
         $this->autoSumm = md5('');
     }
     $autosumm = $this->autoSumm ? $this->autoSumm : md5($this->summary);
     $wgOut->addHTML(Html::hidden('wpAutoSummary', $autosumm));
     $wgOut->addHTML(Html::hidden('oldid', $this->oldid));
     $wgOut->addHTML(Html::hidden('format', $this->contentFormat));
     $wgOut->addHTML(Html::hidden('model', $this->contentModel));
     if ($this->section == 'new') {
         $this->showSummaryInput(true, $this->summary);
         $wgOut->addHTML($this->getSummaryPreview(true, $this->summary));
     }
     $wgOut->addHTML($this->editFormTextBeforeContent);
     if (!$this->isCssJsSubpage && $showToolbar && $wgUser->getOption('showtoolbar')) {
         $wgOut->addHTML(EditPage::getEditToolbar());
     }
     if ($this->blankArticle) {
         $wgOut->addHTML(Html::hidden('wpIgnoreBlankArticle', true));
     }
     if ($this->isConflict) {
         // In an edit conflict bypass the overridable content form method
         // and fallback to the raw wpTextbox1 since editconflicts can't be
         // resolved between page source edits and custom ui edits using the
//.........這裏部分代碼省略.........
開發者ID:whysasse,項目名稱:kmwiki,代碼行數:101,代碼來源:EditPage.php

示例4: showEditForm


//.........這裏部分代碼省略.........
        }
        if (!$this->mTitle->exists() && $this->mTitle->getRestrictions('create')) {
            $wgOut->wrapWikiMsg('<div class="mw-titleprotectedwarning">$1</div>', 'titleprotectedwarning');
        }
        if ($this->kblength === false) {
            $this->kblength = (int) (strlen($this->textbox1) / 1024);
        }
        if ($this->tooBig || $this->kblength > $wgMaxArticleSize) {
            $wgOut->addHTML("<div class='error' id='mw-edit-longpageerror'>\n");
            $wgOut->addWikiMsg('longpageerror', $wgLang->formatNum($this->kblength), $wgLang->formatNum($wgMaxArticleSize));
            $wgOut->addHTML("</div>\n");
        } elseif ($this->kblength > 29) {
            $wgOut->addHTML("<div id='mw-edit-longpagewarning'>\n");
            $wgOut->addWikiMsg('longpagewarning', $wgLang->formatNum($this->kblength));
            $wgOut->addHTML("</div>\n");
        }
        $q = 'action=' . $this->action;
        #if ( "no" == $redirect ) { $q .= "&redirect=no"; }
        $action = $wgTitle->escapeLocalURL($q);
        $summary = wfMsg('summary');
        $subject = wfMsg('subject');
        $cancel = $sk->makeKnownLink($wgTitle->getPrefixedText(), wfMsgExt('cancel', array('parseinline')));
        $separator = wfMsgExt('pipe-separator', 'escapenoentities');
        $edithelpurl = Skin::makeInternalOrExternalUrl(wfMsgForContent('edithelppage'));
        $edithelp = '<a target="helpwindow" href="' . $edithelpurl . '">' . htmlspecialchars(wfMsg('edithelp')) . '</a> ' . htmlspecialchars(wfMsg('newwindow'));
        global $wgRightsText;
        if ($wgRightsText) {
            $copywarnMsg = array('copyrightwarning', '[[' . wfMsgForContent('copyrightpage') . ']]', $wgRightsText);
        } else {
            $copywarnMsg = array('copyrightwarning2', '[[' . wfMsgForContent('copyrightpage') . ']]');
        }
        if ($wgUser->getOption('showtoolbar') and !$this->isCssJsSubpage) {
            # prepare toolbar for edit buttons
            $toolbar = EditPage::getEditToolbar();
        } else {
            $toolbar = '';
        }
        // activate checkboxes if user wants them to be always active
        if (!$this->preview && !$this->diff) {
            # Sort out the "watch" checkbox
            if ($wgUser->getOption('watchdefault')) {
                # Watch all edits
                $this->watchthis = true;
            } elseif ($wgUser->getOption('watchcreations') && !$this->mTitle->exists()) {
                # Watch creations
                $this->watchthis = true;
            } elseif ($this->mTitle->userIsWatching()) {
                # Already watched
                $this->watchthis = true;
            }
            # May be overriden by request parameters
            if ($wgRequest->getBool('watchthis')) {
                $this->watchthis = true;
            }
            if ($wgUser->getOption('minordefault')) {
                $this->minoredit = true;
            }
        }
        $wgOut->addHTML($this->editFormPageTop);
        if ($wgUser->getOption('previewontop')) {
            $this->displayPreviewArea($previewOutput, true);
        }
        $wgOut->addHTML($this->editFormTextTop);
        # if this is a comment, show a subject line at the top, which is also the edit summary.
        # Otherwise, show a summary field at the bottom
        $summarytext = $wgContLang->recodeForEdit($this->summary);
開發者ID:ruizrube,項目名稱:spdef,代碼行數:67,代碼來源:EditPage.php

示例5: showEditForm


//.........這裏部分代碼省略.........
        $ew = $wgUser->getOption('editwidth');
        if ($ew) {
            $ew = " style=\"width:100%\"";
        } else {
            $ew = '';
        }
        // do ajax action:
        // $q = 'action=ajax';
        # if ( "no" == $redirect ) { $q .= "&redirect=no"; }
        // $action = $this->mTitle->escapeLocalURL( $q );
        if ($editFormType == 'seq') {
            $summary = wfMsg('mv_seq_summary');
        } else {
            $summary = wfMsg('summary');
        }
        $subject = wfMsg('subject');
        if ($this->mvd_id == 'seq') {
            $cancel = $sk->makeKnownLinkObj($this->mTitle, wfMsgExt('cancel', array('parseinline')));
            $edithelpurl = Skin::makeInternalOrExternalUrl(wfMsgForContent('mv_edithelpsequence'));
        } else {
            $cancel = '<a href="javascript:mv_disp_mvd(\'' . $this->mTitle->getDBkey() . '\',\'' . $this->mvd_id . '\');">' . wfMsgExt('cancel', array('parseinline')) . '</a>';
            $edithelpurl = Skin::makeInternalOrExternalUrl(wfMsgForContent('edithelppage'));
        }
        $edithelp = '<a target="helpwindow" href="' . $edithelpurl . '">' . htmlspecialchars(wfMsg('edithelp')) . '</a> ' . htmlspecialchars(wfMsg('newwindow'));
        global $wgRightsText;
        // copy right here is too verbose for a ajax window
        /*$copywarn = "<div id=\"editpage-copywarn\">\n" .
        			wfMsg( $wgRightsText ? 'copyrightwarning' : 'copyrightwarning2',
        				'[[' . wfMsgForContent( 'copyrightpage' ) . ']]',
        				$wgRightsText ) . "\n</div>";
        		*/
        if ($wgUser->getOption('showtoolbar') and !$this->isCssJsSubpage) {
            # prepare toolbar for edit buttons
            $toolbar = EditPage::getEditToolbar();
        } else {
            $toolbar = '';
        }
        // activate checkboxes if user wants them to be always active
        if (!$this->preview && !$this->diff) {
            # Sort out the "watch" checkbox
            if ($wgUser->getOption('watchdefault')) {
                # Watch all edits
                $this->watchthis = true;
            } elseif ($wgUser->getOption('watchcreations') && !$this->mTitle->exists()) {
                # Watch creations
                $this->watchthis = true;
            } elseif ($this->mTitle->userIsWatching()) {
                # Already watched
                $this->watchthis = true;
            }
            if ($wgUser->getOption('minordefault')) {
                $this->minoredit = true;
            }
        }
        $wgOut->addHTML($this->editFormPageTop);
        $wgOut->addHTML($this->editFormTextTop);
        # if this is a comment, show a subject line at the top, which is also the edit summary.
        # Otherwise, show a summary field at the bottom
        $summarytext = htmlspecialchars($wgContLang->recodeForEdit($this->summary));
        # FIXME
        if ($this->section == 'new') {
            $commentsubject = "<br /><span id='wpSummaryLabel'><label for='wpSummary'>{$subject}:</label></span>\n<div class='editOptions'>\n<input tabindex='1' type='text' value=\"{$summarytext}\" name='wpSummary' id='wpSummary' maxlength='200' size='40' /><br />";
            $editsummary = '';
            $subjectpreview = $summarytext && $this->preview ? "<div class=\"mw-summary-preview\">" . wfMsg('subject-preview') . ':' . $sk->commentBlock($this->summary, $this->mTitle) . "</div>\n" : '';
            $summarypreview = '';
        } else {
開發者ID:realsoc,項目名稱:mediawiki-extensions,代碼行數:67,代碼來源:MV_EditPageAjax.php

示例6: showEditForm

    /**
     * Send the edit form and related headers to $wgOut
     * @param $formCallback Optional callable that takes an OutputPage
     *                      parameter; will be called during form output
     *                      near the top, for captchas and the like.
     */
    function showEditForm($formCallback = null)
    {
        global $wgOut, $wgUser, $wgTitle;
        # If $wgTitle is null, that means we're in API mode.
        # Some hook probably called this function  without checking
        # for is_null($wgTitle) first. Bail out right here so we don't
        # do lots of work just to discard it right after.
        if (is_null($wgTitle)) {
            return;
        }
        wfProfileIn(__METHOD__);
        $sk = $wgUser->getSkin();
        #need to parse the preview early so that we know which templates are used,
        #otherwise users with "show preview after edit box" will get a blank list
        #we parse this near the beginning so that setHeaders can do the title
        #setting work instead of leaving it in getPreviewText
        $previewOutput = '';
        if ($this->formtype == 'preview') {
            $previewOutput = $this->getPreviewText();
        }
        wfRunHooks('EditPage::showEditForm:initial', array(&$this));
        $this->setHeaders();
        # Enabled article-related sidebar, toplinks, etc.
        $wgOut->setArticleRelated(true);
        if ($this->showHeader() === false) {
            return;
        }
        $action = htmlspecialchars($this->getActionURL($wgTitle));
        if ($wgUser->getOption('showtoolbar') and !$this->isCssJsSubpage) {
            # prepare toolbar for edit buttons
            $toolbar = EditPage::getEditToolbar();
        } else {
            $toolbar = '';
        }
        $wgOut->addHTML($this->editFormPageTop);
        if ($wgUser->getOption('previewontop')) {
            $this->displayPreviewArea($previewOutput, true);
        }
        $wgOut->addHTML($this->editFormTextTop);
        $templates = $this->getTemplates();
        $formattedtemplates = $sk->formatTemplates($templates, $this->preview, $this->section != '');
        $hiddencats = $this->mArticle->getHiddenCategories();
        $formattedhiddencats = $sk->formatHiddenCategories($hiddencats);
        if ($this->wasDeletedSinceLastEdit() && 'save' != $this->formtype) {
            $wgOut->wrapWikiMsg("<div class='error mw-deleted-while-editing'>\n\$1</div>", 'deletedwhileediting');
        } elseif ($this->wasDeletedSinceLastEdit()) {
            // Hide the toolbar and edit area, user can click preview to get it back
            // Add an confirmation checkbox and explanation.
            $toolbar = '';
            // @todo move this to a cleaner conditional instead of blanking a variable
        }
        $wgOut->addHTML(<<<HTML
{$toolbar}
<form id="editform" name="editform" method="post" action="{$action}" enctype="multipart/form-data">
HTML
);
        if (is_callable($formCallback)) {
            call_user_func_array($formCallback, array(&$wgOut));
        }
        wfRunHooks('EditPage::showEditForm:fields', array(&$this, &$wgOut));
        // Put these up at the top to ensure they aren't lost on early form submission
        $this->showFormBeforeText();
        if ($this->wasDeletedSinceLastEdit() && 'save' == $this->formtype) {
            $wgOut->addHTML('<div class="mw-confirm-recreate">' . $wgOut->parse(wfMsg('confirmrecreate', $this->lastDelete->user_name, $this->lastDelete->log_comment)) . Xml::checkLabel(wfMsg('recreate'), 'wpRecreate', 'wpRecreate', false, array('title' => $sk->titleAttrib('recreate'), 'tabindex' => 1, 'id' => 'wpRecreate')) . '</div>');
        }
        # If a blank edit summary was previously provided, and the appropriate
        # user preference is active, pass a hidden tag as wpIgnoreBlankSummary. This will stop the
        # user being bounced back more than once in the event that a summary
        # is not required.
        #####
        # For a bit more sophisticated detection of blank summaries, hash the
        # automatic one and pass that in the hidden field wpAutoSummary.
        if ($this->missingSummary || $this->section == 'new' && $this->nosummary) {
            $wgOut->addHTML(Xml::hidden('wpIgnoreBlankSummary', true));
        }
        $autosumm = $this->autoSumm ? $this->autoSumm : md5($this->summary);
        $wgOut->addHTML(Xml::hidden('wpAutoSummary', $autosumm));
        $wgOut->addHTML(Xml::hidden('oldid', $this->mArticle->getOldID()));
        if ($this->section == 'new') {
            $this->showSummaryInput(true, $this->summary);
            $wgOut->addHTML($this->getSummaryPreview(true, $this->summary));
        }
        $wgOut->addHTML($this->editFormTextBeforeContent);
        if ($this->isConflict) {
            // In an edit conflict bypass the overrideable content form method
            // and fallback to the raw wpTextbox1 since editconflicts can't be
            // resolved between page source edits and custom ui edits using the
            // custom edit ui.
            $this->showTextbox1(null, $this->getContent());
        } else {
            $this->showContentForm();
        }
        $wgOut->addHTML($this->editFormTextAfterContent);
        $wgOut->addWikiText($this->getCopywarn());
//.........這裏部分代碼省略.........
開發者ID:rocLv,項目名稱:conference,代碼行數:101,代碼來源:EditPage.php

示例7: GetWiki_ToolBar

function GetWiki_ToolBar()
{
    global $wgVersion;
    /*
            if ( !file_exists($IP . '/includes/AutoLoader.php')){
                require_once($IP . '/includes/EditPage.php');
            }
    */
    if (version_compare($wgVersion, '1.13.0', '>=')) {
        global $wgOut;
        $wgOut->addScriptFile('edit.js');
    }
    $toolbar = EditPage::getEditToolbar();
    return $toolbar;
}
開發者ID:BackupTheBerlios,項目名稱:swahili-dict,代碼行數:15,代碼來源:gen_funk.php


注:本文中的EditPage::getEditToolbar方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。