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


PHP Html::closeElement方法代码示例

本文整理汇总了PHP中Html::closeElement方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::closeElement方法的具体用法?PHP Html::closeElement怎么用?PHP Html::closeElement使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Html的用法示例。


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

示例1: executeWhenAvailable

 /**
  * Render the special page and redirect the user to the editor (if page exists)
  * @param string $subpage The name of the page to edit
  */
 public function executeWhenAvailable($subpage)
 {
     if (!is_string($subpage)) {
         $this->showPageNotFound();
         return;
     } else {
         $title = Title::newFromText($subpage);
         if (is_null($title)) {
             $this->showPageNotFound();
             return;
         }
     }
     $data = $this->getRequest()->getValues();
     unset($data['title']);
     // Remove the title of the special page
     $section = (int) $this->getRequest()->getVal('section', 0);
     $output = $this->getOutput();
     $output->addModules('mobile.special.mobileeditor.scripts');
     $output->setPageTitle($this->msg('mobile-frontend-editor-redirect-title')->text());
     $context = MobileContext::singleton();
     $articleUrl = $context->getMobileUrl($title->getFullURL($data));
     $targetUrl = $articleUrl . '#/editor/' . $section;
     $html = Html::openElement('div', array('id' => 'mw-mf-editor', 'data-targeturl' => $targetUrl)) . Html::openElement('noscript') . MobileUI::errorBox($this->msg('mobile-frontend-editor-unavailable')->text()) . Html::openElement('p') . Html::element('a', array('href' => $title->getLocalUrl()), $this->msg('returnto', $title->getText())->text()) . Html::closeElement('noscript') . Html::closeElement('div');
     // #mw-mf-editorunavailable
     $output->addHTML($html);
 }
开发者ID:micha6554,项目名称:mediawiki-extensions-MobileFrontend,代码行数:30,代码来源:SpecialMobileEditor.php

示例2: getUserUploadsPageHtml

 /**
  * Generates HTML for the uploads page for the passed user.
  *
  * @param User $user
  * @return string
  */
 public function getUserUploadsPageHtml(User $user)
 {
     $uploadCount = $this->getUserUploadCount($user->getName());
     $mobileContext = MobileContext::singleton();
     $html = '';
     $attrs = array();
     if ($uploadCount !== false) {
         $threshold = $this->getUploadCountThreshold();
         // FIXME: Use Html class?
         $html .= '<div class="content">';
         if ($mobileContext->userCanUpload()) {
             $html .= '<div class="ctaUploadPhoto"></div>';
         }
         if ($uploadCount > $threshold) {
             $msg = $this->msg('mobile-frontend-photo-upload-user-count-over-limit')->text();
         } else {
             $msg = $this->msg('mobile-frontend-photo-upload-user-count')->numParams($uploadCount)->parse();
             if ($uploadCount === 0) {
                 $attrs = array('style' => 'display:none');
             }
         }
         $html .= Html::openElement('h2', $attrs) . $msg . Html::closeElement('h2');
         $html .= '</div>';
     }
     return $html;
 }
开发者ID:micha6554,项目名称:mediawiki-extensions-MobileFrontend,代码行数:32,代码来源:SpecialUploads.php

示例3: execute

 public function execute($par)
 {
     $this->setHeaders();
     $out = $this->getContext()->getOutput();
     $out->addModules('ext.wikihiero.Special');
     $out->addModuleStyles('ext.wikihiero.Special');
     // apply CSS during slow load
     $out->addWikiMsg('wikihiero-special-page-text');
     $out->addHTML('<div id="hiero-result">');
     $text = trim($this->getContext()->getRequest()->getVal('text', ''));
     if ($text !== '') {
         $hiero = new WikiHiero();
         $out->addHTML('<table class="wikitable">' . '<tr><th>' . wfMsg('wikihiero-input') . '</th><th>' . wfMsg('wikihiero-result') . '</th></tr>' . '<tr><td><code>&lt;hiero&gt;' . nl2br(htmlspecialchars($text)) . "&lt;/hiero&gt;</code></td><td>{$hiero->render($text)}</td></tr></table>");
     }
     $out->addHTML('</div>');
     // id="hiero-result"
     $out->addHTML(Html::openElement('form', array('method' => 'get', 'action' => $this->getTitle()->getLinkUrl())) . Html::element('textarea', array('id' => 'hiero-text', 'name' => 'text'), $text) . Html::element('input', array('type' => 'submit', 'id' => 'hiero-submit', 'name' => 'submit')) . Html::closeElement('form'));
     $this->hiero = new WikiHiero();
     $out->addHTML('<table><tr><td>');
     $out->addHTML('<div class="mw-hiero-list">');
     $out->addHTML($this->listHieroglyphs());
     $out->addHTML('</div></td><td>');
     $out->addHTML($this->getToc());
     $out->addHTML('</td></tr></table>');
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:25,代码来源:SpecialHieroglyphs.php

示例4: showForm

 public function showForm()
 {
     global $wgScript;
     // Text to explain level select (if there are several levels)
     if (FlaggedRevs::qualityVersions()) {
         $this->getOutput()->addWikiMsg('reviewedpages-list', $this->getLanguage()->formatNum($this->pager->getNumRows()));
     }
     $form = Html::openElement('form', array('name' => 'reviewedpages', 'action' => $wgScript, 'method' => 'get'));
     $form .= "<fieldset><legend>" . $this->msg('reviewedpages-leg')->escaped() . "</legend>\n";
     // show/hide links
     $showhide = array($this->msg('show')->escaped(), $this->msg('hide')->escaped());
     $onoff = 1 - $this->hideRedirs;
     $link = Linker::link($this->getPageTitle(), $showhide[$onoff], array(), array('hideredirs' => $onoff, 'namespace' => $this->namespace));
     $showhideredirs = $this->msg('whatlinkshere-hideredirs')->rawParams($link)->escaped();
     $fields = array();
     $namespaces = FlaggedRevs::getReviewNamespaces();
     if (count($namespaces) > 1) {
         $fields[] = FlaggedRevsXML::getNamespaceMenu($this->namespace) . ' ';
     }
     if (FlaggedRevs::qualityVersions()) {
         $fields[] = FlaggedRevsXML::getLevelMenu($this->type) . ' ';
     }
     $form .= implode(' ', $fields) . ' ';
     $form .= $showhideredirs;
     if (count($fields)) {
         $form .= " " . Xml::submitButton($this->msg('go')->text());
     }
     $form .= Html::hidden('title', $this->getPageTitle()->getPrefixedDBKey()) . "\n";
     $form .= "</fieldset>";
     $form .= Html::closeElement('form ') . "\n";
     $this->getOutput()->addHTML($form);
 }
开发者ID:crippsy14,项目名称:orange-smorange,代码行数:32,代码来源:ReviewedPages_body.php

示例5: getConnectForm

 public function getConnectForm()
 {
     if ($this->getVar('wgDBserver') == 'localhost') {
         $this->parent->setVar('wgDBserver', '');
     }
     return $this->getTextBox('wgDBserver', 'config-db-host-oracle', array(), $this->parent->getHelpBox('config-db-host-oracle-help')) . Html::openElement('fieldset') . Html::element('legend', array(), wfMsg('config-db-wiki-settings')) . $this->getTextBox('wgDBprefix', 'config-db-prefix') . $this->getTextBox('_OracleDefTS', 'config-oracle-def-ts') . $this->getTextBox('_OracleTempTS', 'config-oracle-temp-ts', array(), $this->parent->getHelpBox('config-db-oracle-help')) . Html::closeElement('fieldset') . $this->parent->getWarningBox(wfMsg('config-db-account-oracle-warn')) . $this->getInstallUserBox() . $this->getWebUserBox();
 }
开发者ID:natalieschauser,项目名称:csp_media_wiki,代码行数:7,代码来源:OracleInstaller.php

示例6: genContributionScoreTable

 /**
  * Function generates Contribution Scores tables in HTML format (not wikiText)
  *
  * @param $days int Days in the past to run report for
  * @param $limit int Maximum number of users to return (default 50)
  * @param $title Title (default null)
  * @param $options array of options (default none; nosort/notools)
  * @return Html Table representing the requested Contribution Scores.
  */
 function genContributionScoreTable($days, $limit, $title = null, $options = 'none')
 {
     global $wgContribScoreIgnoreBots, $wgContribScoreIgnoreBlockedUsers, $wgContribScoresUseRealName;
     $opts = explode(',', strtolower($options));
     $dbr = wfGetDB(DB_SLAVE);
     $userTable = $dbr->tableName('user');
     $userGroupTable = $dbr->tableName('user_groups');
     $revTable = $dbr->tableName('revision');
     $ipBlocksTable = $dbr->tableName('ipblocks');
     $sqlWhere = "";
     $nextPrefix = "WHERE";
     if ($days > 0) {
         $date = time() - 60 * 60 * 24 * $days;
         $dateString = $dbr->timestamp($date);
         $sqlWhere .= " {$nextPrefix} rev_timestamp > '{$dateString}'";
         $nextPrefix = "AND";
     }
     if ($wgContribScoreIgnoreBlockedUsers) {
         $sqlWhere .= " {$nextPrefix} rev_user NOT IN (SELECT ipb_user FROM {$ipBlocksTable} WHERE ipb_user <> 0)";
         $nextPrefix = "AND";
     }
     if ($wgContribScoreIgnoreBots) {
         $sqlWhere .= " {$nextPrefix} rev_user NOT IN (SELECT ug_user FROM {$userGroupTable} WHERE ug_group='bot')";
     }
     $sqlMostPages = "SELECT rev_user,\n\t\t\t\t\t\t COUNT(DISTINCT rev_page) AS page_count,\n\t\t\t\t\t\t COUNT(rev_id) AS rev_count\n\t\t\t\t\t\t FROM {$revTable}\n\t\t\t\t\t\t {$sqlWhere}\n\t\t\t\t\t\t GROUP BY rev_user\n\t\t\t\t\t\t ORDER BY page_count DESC\n\t\t\t\t\t\t LIMIT {$limit}";
     $sqlMostRevs = "SELECT rev_user,\n\t\t\t\t\t\t COUNT(DISTINCT rev_page) AS page_count,\n\t\t\t\t\t\t COUNT(rev_id) AS rev_count\n\t\t\t\t\t\t FROM {$revTable}\n\t\t\t\t\t\t {$sqlWhere}\n\t\t\t\t\t\t GROUP BY rev_user\n\t\t\t\t\t\t ORDER BY rev_count DESC\n\t\t\t\t\t\t LIMIT {$limit}";
     $sql = "SELECT user_id, " . "user_name, " . "user_real_name, " . "page_count, " . "rev_count, " . "page_count+SQRT(rev_count-page_count)*2 AS wiki_rank " . "FROM {$userTable} u JOIN (({$sqlMostPages}) UNION ({$sqlMostRevs})) s ON (user_id=rev_user) " . "ORDER BY wiki_rank DESC " . "LIMIT {$limit}";
     $res = $dbr->query($sql);
     $sortable = in_array('nosort', $opts) ? '' : ' sortable';
     $output = "<table class=\"wikitable contributionscores plainlinks{$sortable}\" >\n" . "<tr class='header'>\n" . Html::element('th', array(), $this->msg('contributionscores-score')->text()) . Html::element('th', array(), $this->msg('contributionscores-pages')->text()) . Html::element('th', array(), $this->msg('contributionscores-changes')->text()) . Html::element('th', array(), $this->msg('contributionscores-username')->text());
     $altrow = '';
     $lang = $this->getLanguage();
     foreach ($res as $row) {
         // Use real name if option used and real name present.
         if ($wgContribScoresUseRealName && $row->user_real_name !== '') {
             $userLink = Linker::userLink($row->user_id, $row->user_name, $row->user_real_name);
         } else {
             $userLink = Linker::userLink($row->user_id, $row->user_name);
         }
         $output .= Html::closeElement('tr');
         $output .= "<tr class='{$altrow}'>\n<td class='content'>" . $lang->formatNum(round($row->wiki_rank, 0)) . "\n</td><td class='content'>" . $lang->formatNum($row->page_count) . "\n</td><td class='content'>" . $lang->formatNum($row->rev_count) . "\n</td><td class='content'>" . $userLink;
         # Option to not display user tools
         if (!in_array('notools', $opts)) {
             $output .= Linker::userToolLinks($row->user_id, $row->user_name);
         }
         $output .= Html::closeElement('td') . "\n";
         if ($altrow == '' && empty($sortable)) {
             $altrow = 'odd ';
         } else {
             $altrow = '';
         }
     }
     $output .= Html::closeElement('tr');
     $output .= Html::closeElement('table');
     $dbr->freeResult($res);
     if (!empty($title)) {
         $output = Html::rawElement('table', array('style' => 'border-spacing: 0; padding: 0', 'class' => 'contributionscores-wrapper', 'lang' => htmlspecialchars($lang->getCode()), 'dir' => $lang->getDir()), "\n" . "<tr>\n" . "<td style='padding: 0px;'>{$title}</td>\n" . "</tr>\n" . "<tr>\n" . "<td style='padding: 0px;'>{$output}</td>\n" . "</tr>\n");
     }
     return $output;
 }
开发者ID:seedbank,项目名称:old-repo,代码行数:69,代码来源:ContributionScores_body.php

示例7: makeInputForm

 /**
  * Input form for entering a category
  */
 function makeInputForm()
 {
     $form = '';
     $form .= Html::openElement('form', array('name' => 'ajaxtest', 'method' => 'GET', 'action' => $this->getTitle()->getLocalUrl()));
     $form .= Html::element('input', array('type' => 'text', 'name' => 'ajaxtest_text', 'id' => 'ajaxtest_text', 'value' => '', 'size' => '64')) . ' ';
     $form .= Html::element('br');
     $form .= Html::element('label', array('for' => 'usestring'), 'use string value');
     $form .= Html::element('input', array('type' => 'checkbox', 'name' => 'usestring', 'id' => 'usestring'));
     $form .= Html::element('br');
     $form .= Html::element('label', array('for' => 'httpcache'), 'use http cache');
     $form .= Html::element('input', array('type' => 'checkbox', 'name' => 'httpcache', 'id' => 'httpcache'));
     $form .= Html::element('br');
     $form .= Html::element('label', array('for' => 'lastmod'), 'use last modified');
     $form .= Html::element('input', array('type' => 'checkbox', 'name' => 'lastmod', 'id' => 'lastmod'));
     $form .= Html::element('br');
     $form .= Html::element('label', array('for' => 'error'), 'trigger error');
     $form .= Html::element('input', array('type' => 'checkbox', 'name' => 'error', 'id' => 'error'));
     $form .= Html::element('br');
     $form .= Html::openElement('select', array('name' => 'ajaxtest_target', 'id' => 'ajaxtest_target'));
     $form .= Html::element('option', array('value' => 'function'), "function");
     $form .= Html::element('option', array('value' => 'element'), "element");
     $form .= Html::element('option', array('value' => 'input'), "input");
     $form .= Html::closeElement('select');
     $form .= Html::element('input', array('type' => 'button', 'onclick' => 'doAjaxTest();', 'value' => 'TEST'));
     $form .= Html::element('input', array('type' => 'button', 'onclick' => 'clearAjaxTest();', 'value' => 'CLEAR'));
     # $form .= Html::element( 'input', array( 'type' => 'button', 'onclick' => 'getElementById("ajaxtest_out").value= getElementById("ajaxtest_text").value;', 'value' => 'DUMMY' ) );
     $form .= Html::closeElement('form');
     $form .= Html::element('hr');
     $form .= Html::element('input', array('type' => 'text', 'name' => 'ajaxtest_out', 'id' => 'ajaxtest_out', 'value' => '', 'size' => '64')) . ' ';
     $form .= Html::element('p', array('id' => 'ajaxtest_area'));
     $form .= Html::element('hr');
     $form .= Html::element('p', array('id' => 'sajax_debug'));
     return $form;
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:37,代码来源:AjaxTestPage.php

示例8: execute

 function execute($par)
 {
     $request = $this->getRequest();
     $output = $this->getOutput();
     $this->setHeaders();
     $this->checkPermissions();
     $output->addModules('ext.translate.special.pagemigration');
     $output->addModuleStyles('jquery.uls.grid');
     # Get request data from, e.g.
     $param = $request->getText('param');
     # Do stuff
     # ...
     $out = '';
     $out .= Html::openElement('div', array('class' => 'grid'));
     $out .= Html::openElement('div', array('class' => 'mw-tpm-sp-error row', 'id' => 'mw-tpm-sp-error-div'));
     $out .= Html::element('div', array('class' => 'mw-tpm-sp-error__message five columns hide'));
     $out .= Html::closeElement('div');
     $out .= Html::openElement('form', array('class' => 'mw-tpm-sp-form row', 'id' => 'mw-tpm-sp-primary-form'));
     $out .= Html::element('input', array('id' => 'pm-summary', 'type' => 'hidden', 'value' => $this->msg('pm-summary-import')->inContentLanguage()->text()));
     $out .= Html::element('input', array('id' => 'title', 'class' => 'mw-searchInput', 'placeholder' => $this->msg('pm-pagename-placeholder')->text()));
     $out .= Html::element('input', array('id' => 'language', 'type' => 'text', 'placeholder' => $this->msg('pm-langcode-placeholder')->text()));
     $out .= Html::element('input', array('id' => 'action-import', 'class' => 'mw-ui-button mw-ui-primary', 'type' => 'button', 'value' => $this->msg('pm-import-button-label')->text()));
     $out .= Html::element('input', array('id' => 'action-save', 'class' => 'mw-ui-button mw-ui-constructive hide', 'type' => 'button', 'value' => $this->msg('pm-savepages-button-label')->text()));
     $out .= Html::element('input', array('id' => 'action-cancel', 'class' => 'mw-ui-button mw-ui-quiet hide', 'type' => 'button', 'value' => $this->msg('pm-cancel-button-label')->text()));
     $out .= Html::closeElement('form');
     $out .= Html::openElement('div', array('class' => 'mw-tpm-sp-unit-listing'));
     $out .= Html::closeElement('div');
     $out .= Html::closeElement('div');
     $output->addHTML($out);
 }
开发者ID:HuijiWiki,项目名称:mediawiki-extensions-Translate,代码行数:30,代码来源:SpecialPageMigration.php

示例9: showForm

 public function showForm()
 {
     global $wgScript;
     # Explanatory text
     $this->getOutput()->addWikiMsg('pendingchanges-list', $this->getLang()->formatNum($this->pager->getNumRows()));
     $form = Html::openElement('form', array('name' => 'pendingchanges', 'action' => $wgScript, 'method' => 'get')) . "\n";
     $form .= "<fieldset><legend>" . wfMsgHtml('pendingchanges-legend') . "</legend>\n";
     $form .= Html::hidden('title', $this->getTitle()->getPrefixedDBKey()) . "\n";
     $items = array();
     if (count(FlaggedRevs::getReviewNamespaces()) > 1) {
         $items[] = "<span style='white-space: nowrap;'>" . FlaggedRevsXML::getNamespaceMenu($this->namespace, '') . '</span>';
     }
     if (FlaggedRevs::qualityVersions()) {
         $items[] = "<span style='white-space: nowrap;'>" . FlaggedRevsXML::getLevelMenu($this->level, 'revreview-filter-stable') . '</span>';
     }
     if (!FlaggedRevs::isStableShownByDefault() && !FlaggedRevs::useOnlyIfProtected()) {
         $items[] = "<span style='white-space: nowrap;'>" . Xml::check('stable', $this->stable, array('id' => 'wpStable')) . Xml::label(wfMsg('pendingchanges-stable'), 'wpStable') . '</span>';
     }
     if ($items) {
         $form .= implode(' ', $items) . '<br />';
     }
     $items = array();
     $items[] = Xml::label(wfMsg("pendingchanges-category"), 'wpCategory') . '&#160;' . Xml::input('category', 30, $this->category, array('id' => 'wpCategory'));
     if ($this->getUser()->getId()) {
         $items[] = Xml::check('watched', $this->watched, array('id' => 'wpWatched')) . Xml::label(wfMsg('pendingchanges-onwatchlist'), 'wpWatched');
     }
     $form .= implode(' ', $items) . '<br />';
     $form .= Xml::label(wfMsg('pendingchanges-size'), 'wpSize') . Xml::input('size', 4, $this->size, array('id' => 'wpSize')) . ' ' . Xml::submitButton(wfMsg('allpagessubmit')) . "\n";
     $form .= "</fieldset>";
     $form .= Html::closeElement('form') . "\n";
     $this->getOutput()->addHTML($form);
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:32,代码来源:PendingChanges_body.php

示例10: execute

 public function execute()
 {
     global $wgRequest, $wgUser, $wgSitename, $wgSitenameshort, $wgCopyrightLink;
     global $wgCopyright, $wgBootstrap, $wgArticlePath, $wgGoogleAnalyticsID;
     global $wgSiteCSS;
     global $wgEnableUploads;
     global $wgLogo;
     global $wgTOCLocation;
     global $wgNavBarClasses;
     global $wgSubnavBarClasses;
     $this->skin = $this->data['skin'];
     $action = $wgRequest->getText('action');
     $url_prefix = str_replace('$1', '', $wgArticlePath);
     // Suppress warnings to prevent notices about missing indexes in $this->data
     wfSuppressWarnings();
     $this->html('headelement');
     ?>
   <div class="ololo-wiki">
   <?php 
     $this->header($wgUser);
     $this->body();
     $this->footer();
     $this->html('bottomscripts');
     /* JS call to runBodyOnloadHook */
     $this->html('reporttime');
     ?>
   </div>
 <?php 
     echo Html::closeElement('body');
     echo Html::closeElement('html');
     wfRestoreWarnings();
 }
开发者ID:alexeygrigorev,项目名称:TyrianMediawiki-Skin,代码行数:32,代码来源:TyrianMediaWiki.skin.php

示例11: renderMessageHtml

 /**
  * Render message box with system messages, e.g. errors or already logged-in notices
  *
  * @param string $action The type of action the page is used for ('login' or 'signup')
  * @param bool $register Whether the user can register an account
  */
 protected function renderMessageHtml($action, $register = false)
 {
     $msgBox = '';
     // placeholder for displaying any login-related system messages (eg errors)
     $message = $this->data['message'];
     $messageType = $this->data['messagetype'];
     // FIXME: Migrate this to a server-side Mustache template
     // If there is a system message (error, warning, or success) display that
     if ($message && $messageType) {
         $msgBox .= Html::openElement('div', array('class' => $messageType . 'box'));
         $msgBox .= $message;
         $msgBox .= Html::closeElement('div');
         // Render already logged-in notice
     } elseif ($this->data['loggedin']) {
         $msg = $register ? 'mobile-frontend-userlogin-loggedin-register' : 'userlogin-loggedin';
         $msgBox .= Html::openElement('div', array('class' => 'warningbox'));
         $msgBox .= wfMessage($msg)->params($this->data['loggedinuser'])->parse();
         $msgBox .= Html::closeElement('div');
         // Show default welcome message
     } else {
         // The warningbox class is used more for informational purposes than actual warnings.
         $msgBox .= Html::openElement('div', array('class' => 'warningbox'));
         $headerMsg = wfMessage('mobile-frontend-generic-login')->parse();
         $msgBox .= Html::element('strong', array(), $headerMsg);
         $msgBox .= Html::element('br');
         $msgBox .= wfMessage("mobile-frontend-generic-{$action}-action")->plain();
         $msgBox .= Html::closeElement('div');
         $msgBox .= $this->getLogoHtml();
     }
     echo $msgBox;
 }
开发者ID:GoProjectOwner,项目名称:mediawiki-extensions-MobileFrontend,代码行数:37,代码来源:UserLoginAndCreateTemplate.php

示例12: showToolbar

	protected function showToolbar() {
		$langSelector = Xml::languageSelector( $this->lang );

		$fontSelector = new XmlSelect();
		$fontSelector->setAttribute( 'id', 'webfonts-font-chooser' );

		$sizeSelector = new XmlSelect();
		$sizeSelector->setAttribute( 'id', 'webfonts-size-chooser' );
		for ( $size = 8; $size <= 28; $size += 2 ) {
			$sizeSelector->addOption( $size , $size );
		}
		$sizeSelector->setDefault( 16 );

		$bold = Html::Element( 'button', array( 'id' => 'webfonts-preview-bold' )  , 'B' );

		$italic = Html::Element( 'button', array( 'id' => 'webfonts-preview-italic' ) , 'I' );

		$underline = Html::Element( 'button', array( 'id' => 'webfonts-preview-underline' ) ,  'U' );

		$download  = Html::Element( 'a', array( 'id' => 'webfonts-preview-download', 'href' => '#' ) ,
			wfMsg( 'webfonts-preview-download' ) );

		return Html::openElement( 'div', array( 'id' => 'webfonts-preview-toolbar' ) )
			. $langSelector[1]
			. $fontSelector->getHtml()
			. $sizeSelector->getHtml()
			. $bold
			. $italic
			. $underline
			. $download
			. Html::closeElement( 'div' );
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:32,代码来源:SpecialWebFonts.php

示例13: render

 private function render($parser, $params)
 {
     if (count($params) > 1) {
         $rating = $params[1];
     } else {
         $rating = 0;
     }
     if (count($params) > 2) {
         $max = $params[2];
     } else {
         $max = $GLOBALS['SemanticRating_DefaultMax'];
     }
     $output = Html::openElement('span', array('style' => 'white-space:nowrap;'));
     if ($rating < 0) {
         $rating = 0;
     } elseif ($rating > $max) {
         $rating = $max;
     }
     $i = 1;
     while ($i <= $rating) {
         $output .= Html::element('img', array('src' => $this->imagepath . 'yellowstar.png'));
         $i++;
     }
     if ($rating - $i + 1 != 0) {
         $output .= Html::element('img', array('src' => $this->imagepath . 'halfstar.png'));
         $i++;
     }
     while ($i <= $max) {
         $output .= Html::element('img', array('src' => $this->imagepath . 'greystar.png'));
         $i++;
     }
     $output .= Html::closeElement('span');
     return $output;
 }
开发者ID:Rikuforever,项目名称:wiki,代码行数:34,代码来源:SemanticRatingHtmlRenderer.php

示例14: showForm

 protected function showForm()
 {
     global $wgScript;
     # Explanatory text
     $this->getOutput()->addWikiMsg('configuredpages-list', $this->getLang()->formatNum($this->pager->getNumRows()));
     $fields = array();
     # Namespace selector
     if (count(FlaggedRevs::getReviewNamespaces()) > 1) {
         $fields[] = FlaggedRevsXML::getNamespaceMenu($this->namespace, '');
     }
     # Default version selector
     $fields[] = FlaggedRevsXML::getDefaultFilterMenu($this->override);
     # Restriction level selector
     if (FlaggedRevs::getRestrictionLevels()) {
         $fields[] = FlaggedRevsXML::getRestrictionFilterMenu($this->autoreview);
     }
     $form = Html::openElement('form', array('name' => 'configuredpages', 'action' => $wgScript, 'method' => 'get'));
     $form .= Html::hidden('title', $this->getTitle()->getPrefixedDBKey());
     $form .= "<fieldset><legend>" . wfMsg('configuredpages') . "</legend>\n";
     $form .= implode('&#160;', $fields) . '<br/>';
     $form .= Xml::submitButton(wfMsg('go'));
     $form .= "</fieldset>\n";
     $form .= Html::closeElement('form') . "\n";
     $this->getOutput()->addHTML($form);
 }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:25,代码来源:ConfiguredPages_body.php

示例15: execute

 /**
  * Show the special page
  *
  * @param $par String: name of the user to sudo into
  */
 public function execute($par)
 {
     global $wgOut, $wgExtensionAssetsPath;
     $this->mSkin = new ThemeDesignerDummySkin();
     $this->setHeaders();
     if (function_exists("OutputPage::includeJQuery")) {
         $wgOut->includeJQuery();
     }
     $wgOut->addExtensionStyle("{$wgExtensionAssetsPath}/ThemeDesigner/frame/style/main.css");
     // Yes, the following is ugly... though I still haven't decided if I want to become completely ResourceLoader dependant
     // While 1.16 is still stable.
     $varScript = array();
     foreach (array('leavewarning', 'resizertext') as $msgName) {
         $varScript[] = 'msg' . ucfirst($msgName) . ' = ' . Xml::encodeJsVar((string) wfMsg("themedesigner-{$msgName}"));
     }
     $varScript = 'var ' . implode(", ", $varScript) . ';';
     $wgOut->addInlineScript($varScript);
     $wgOut->addScriptFile("{$wgExtensionAssetsPath}/ThemeDesigner/frame/designer.js");
     echo $wgOut->headElement($this->mSkin);
     $wgOut->sendCacheControl();
     $wgOut->disable();
     // We've collected our html building into a separate file for readability
     require dirname(__FILE__) . '/frame/layout.php';
     echo $this->mSkin->bottomScripts($wgOut);
     echo Html::closeElement('body');
     echo Html::closeElement('html');
 }
开发者ID:yusufchang,项目名称:app,代码行数:32,代码来源:SpecialThemeDesigner.php


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