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


PHP OutputPage::msg方法代码示例

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


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

示例1: getHTMLPreviousNextPageLinks

 protected function getHTMLPreviousNextPageLinks(OutputPage $out, $edit_token, $offset, $next_offset, $button_name, $page_name)
 {
     global $wgNewManuscriptOptions, $wgArticleUrl;
     $max_on_page = $wgNewManuscriptOptions['max_on_page'];
     $html = "";
     if ($offset >= $max_on_page) {
         $previous_message_hover = $out->msg('singlemanuscriptpages-previoushover');
         $previous_message = $out->msg('singlemanuscriptpages-previous');
         $previous_offset = $offset - $max_on_page;
         $html .= '<form class="summarypage-form" id="previous-link" action="' . $wgArticleUrl . 'Special:' . $page_name . '" method="post">';
         $html .= "<input type='hidden' name='offset' value = '{$previous_offset}'>";
         $html .= "<input type='hidden' name='{$button_name}' value='{$button_name}'>";
         $html .= "<input type='submit' class='button-transparent' name='redirect_page_back' title='{$previous_message_hover}'  value='{$previous_message}'>";
         $html .= "<input type='hidden' name='default_page_posted' value='default_page_posted'>";
         $html .= "<input type='hidden' name='wpEditToken' value='{$edit_token}'>";
         $html .= "</form>";
     }
     if (isset($next_offset)) {
         if (!$offset >= $max_on_page) {
             $html .= '<br>';
         }
         $next_message_hover = $out->msg('singlemanuscriptpages-nexthover');
         $next_message = $out->msg('singlemanuscriptpages-next');
         $html .= '<form class="summarypage-form" id="next-link" action="' . $wgArticleUrl . 'Special:' . $page_name . '" method="post">';
         $html .= "<input type='hidden' name='offset' value = '{$next_offset}'>";
         $html .= "<input type='hidden' name='{$button_name}' value='{$button_name}'>";
         $html .= "<input type='submit' class='button-transparent' name = 'redirect_page_forward' title='{$next_message_hover}' value='{$next_message}'>";
         $html .= "<input type='hidden' name='default_page_posted' value='default_page_posted'>";
         $html .= "<input type='hidden' name='wpEditToken' value='{$edit_token}'>";
         $html .= "</form>";
     }
     return $html;
 }
开发者ID:akvankorlaar,项目名称:manuscriptdesk,代码行数:33,代码来源:HTMLPreviousNextPageLinks.php

示例2: showEditFormFields

 /**
  * Show error message for missing or incorrect captcha on EditPage.
  * @param EditPage $editPage
  * @param OutputPage $out
  */
 function showEditFormFields(&$editPage, &$out)
 {
     $page = $editPage->getArticle()->getPage();
     if (!isset($page->ConfirmEdit_ActivateCaptcha)) {
         return;
     }
     unset($page->ConfirmEdit_ActivateCaptcha);
     $out->addHTML(Html::openElement('div', array('id' => 'mw-confirmedit-error-area', 'class' => 'errorbox')) . Html::element('strong', array(), $out->msg('errorpagetitle')->text()) . Html::element('div', array('id' => 'errorbox-body'), $out->msg('captcha-sendemail-fail')->text()) . Html::closeElement('div'));
     $this->showEditCaptcha = true;
 }
开发者ID:eliagbayani,项目名称:LiteratureEditor,代码行数:15,代码来源:Captcha.php

示例3: getHTMLMessageSpaceLeftOnDisk

 private function getHTMLMessageSpaceLeftOnDisk(OutputPage $out)
 {
     global $wgPrimaryDisk;
     $free_disk_space_bytes = disk_free_space($wgPrimaryDisk);
     $free_disk_space_mb = round($free_disk_space_bytes / 1048576);
     $free_disk_space_gb = round($free_disk_space_mb / 1024);
     $admin_message1 = $out->msg('userpage-admin1');
     $admin_message2 = $out->msg('userpage-admin2');
     $admin_message3 = $out->msg('userpage-admin3');
     $admin_message4 = $out->msg('userpage-admin4');
     return "<p>" . $admin_message1 . ' ' . $free_disk_space_bytes . ' ' . $admin_message2 . ' ' . $free_disk_space_mb . ' ' . $admin_message3 . ' ' . $free_disk_space_gb . ' ' . $admin_message4 . ".</p>";
 }
开发者ID:akvankorlaar,项目名称:manuscriptdesk,代码行数:12,代码来源:UserPageDefaultViewer.php

示例4: getHTMLUserPageMenuBar

 /**
  * This function constructs the menu bar for the user page
  */
 protected function getHTMLUserPageMenuBar(OutputPage $out, $edit_token, array $button_ids = array())
 {
     global $wgArticleUrl;
     $manuscripts_message = $out->msg('userpage-mymanuscripts');
     $collations_message = $out->msg('userpage-mycollations');
     $collections_message = $out->msg('userpage-mycollections');
     $stylometricanalysis_message = $out->msg('userpage-mystylometricanalysis');
     $id_manuscripts = isset($button_ids[0]) ? $button_ids[0] : 'button';
     $id_collations = isset($button_ids[1]) ? $button_ids[1] : 'button';
     $id_collections = isset($button_ids[2]) ? $button_ids[2] : 'button';
     $id_stylometricanalysis = isset($button_ids[3]) ? $button_ids[3] : 'button';
     $html = '<form class="summarypage-form-default" action="' . $wgArticleUrl . 'Special:UserPage" method="post">';
     $html .= "<input type='submit' name='view_manuscripts_posted' id='{$id_manuscripts}' value='{$manuscripts_message}'>";
     $html .= "<input type='submit' name='view_collations_posted' id='{$id_collations}' value='{$collations_message}'>";
     $html .= "<input type='submit' name='view_collections_posted' id='{$id_collections}' value='{$collections_message}'>";
     $html .= "<input type='submit' name='view_stylometricanalysis_posted' id='{$id_stylometricanalysis}' value='{$stylometricanalysis_message}'>";
     $html .= "<input type='hidden' name='default_page_posted' value='default_page_posted'>";
     $html .= "<input type='hidden' name='wpEditToken' value='{$edit_token}'>";
     $html .= '</form>';
     return $html;
 }
开发者ID:akvankorlaar,项目名称:manuscriptdesk,代码行数:24,代码来源:HTMLUserPageMenuBar.php

示例5: setPageTitle

 /**
  * @param \OutputPage $out
  */
 public function setPageTitle(\OutputPage $out)
 {
     $topic = $this->findTopicTitle();
     $title = $this->workflow->getOwnerTitle();
     $out->setPageTitle($out->msg('flow-topic-first-heading', $title->getPrefixedText()));
     if ($this->permissions->isAllowed($topic, 'view')) {
         if ($this->action === 'undo-edit-topic-summary') {
             $key = 'flow-undo-edit-topic-summary';
         } else {
             $key = 'flow-topic-html-title';
         }
         $out->setHtmlTitle($out->msg($key, array(Message::rawParam($topic->getContent('wikitext')), $title->getPrefixedText())));
     } else {
         $out->setHtmlTitle($title->getPrefixedText());
     }
     $out->setSubtitle('&lt; ' . \Linker::link($title));
 }
开发者ID:TarLocesilion,项目名称:mediawiki-extensions-Flow,代码行数:20,代码来源:TopicSummary.php

示例6: getHTMLCollectionMetaTable

 /**
  * Remder HTML for the metadata table 
  */
 protected function getHTMLCollectionMetaTable(OutputPage $out, array $meta_data)
 {
     //get the data
     $metatitle = isset($meta_data['collections_metatitle']) ? $meta_data['collections_metatitle'] : '';
     $metaauthor = isset($meta_data['collections_metaauthor']) ? $meta_data['collections_metaauthor'] : '';
     $metayear = isset($meta_data['collections_metayear']) ? $meta_data['collections_metayear'] : '';
     $metapages = isset($meta_data['collections_metapages']) ? $meta_data['collections_metapages'] : '';
     $metacategory = isset($meta_data['collections_metacategory']) ? $meta_data['collections_metacategory'] : '';
     $metaproduced = isset($meta_data['collections_metaproduced']) ? $meta_data['collections_metaproduced'] : '';
     $metaproducer = isset($meta_data['collections_metaproducer']) ? $meta_data['collections_metaproducer'] : '';
     $metaeditors = isset($meta_data['collections_metaeditors']) ? $meta_data['collections_metaeditors'] : '';
     $metajournal = isset($meta_data['collections_metajournal']) ? $meta_data['collections_metajournal'] : '';
     $metajournalnumber = isset($meta_data['collections_metajournalnumber']) ? $meta_data['collections_metajournalnumber'] : '';
     $metatranslators = isset($meta_data['collections_metatranslators']) ? $meta_data['collections_metatranslators'] : '';
     $metawebsource = isset($meta_data['collections_metawebsource']) ? $meta_data['collections_metawebsource'] : '';
     $metaid = isset($meta_data['collections_metaid']) ? $meta_data['collections_metaid'] : '';
     $metanotes = isset($meta_data['collections_metanotes']) ? $meta_data['collections_metanotes'] : '';
     //get the messages
     $metadata_title = $out->msg('metadata-title');
     $metadata_author = $out->msg('metadata-author');
     $metadata_year = $out->msg('metadata-year');
     $metadata_pages = $out->msg('metadata-pages');
     $metadata_category = $out->msg('metadata-category');
     $metadata_produced = $out->msg('metadata-produced');
     $metadata_producer = $out->msg('metadata-producer');
     $metadata_editors = $out->msg('metadata-editors');
     $metadata_journal = $out->msg('metadata-journal');
     $metadata_journalnumber = $out->msg('metadata-journalnumber');
     $metadata_translators = $out->msg('metadata-translators');
     $metadata_websource = $out->msg('metadata-websource');
     $metadata_id = $out->msg('metadata-id');
     //construct the table
     $html_table = " \n    <table id='metatable' align='center'>\n      <tr>\n          <th style ='text-align: center;' colspan='4'>\n              {$metadata_title}: {$metatitle}\n          </th>\n      </tr>\n       <tr>\n          <th>\n          {$metadata_author}:\n          </th>\n          <td>\n          {$metaauthor}\n          </td>\n          <th>\n          {$metadata_year}:\n          </th>\n          <td>\n          {$metayear}\n          </td>\n      </tr>\n       <tr>\n          <th>\n          {$metadata_pages}:\n          </th>\n          <td>\n          {$metapages}\n          </td>\n          <th>\n          {$metadata_category}:\n          </th>\n          <td>\n          {$metacategory}\n          </td>\n      </tr>\n       <tr>\n          <th>\n          {$metadata_produced}:\n          </th>\n          <td>\n          {$metaproduced}\n          </td>\n          <th>\n          {$metadata_producer}:\n          </th>\n          <td>\n          {$metaproducer}\n          </td>\n      </tr>\n       <tr>\n          <th>\n          {$metadata_id}:\n          </th>\n          <td>\n          {$metaid}\n          </td>\n          <th>\n          {$metadata_editors}:\n          </th>\n          <td>\n          {$metaeditors}\n          </td>\n      </tr>\n        <tr>\n          <th>\n          {$metadata_journal}:\n          </th>\n          <td>\n          {$metajournal}\n          </td>\n          <th>\n          {$metadata_journalnumber}:\n          </th>\n          <td>\n          {$metajournalnumber}\n          </td>\n      </tr>\n           <tr>\n          <th>\n          {$metadata_translators}:\n          </th>\n          <td>\n          {$metatranslators}\n          </td>\n          <th>\n          {$metadata_websource}:\n          </th>\n          <td>\n          {$metawebsource}\n          </td>\n      </tr>\n       </tr>\n        <tr>\n          <th colspan='4' style='text-align: center; background-color: #f7f7f7;'>\n          {$metanotes}\n          </th>\n       </tr>\n    </table>\n  ";
     return $html_table;
 }
开发者ID:akvankorlaar,项目名称:manuscriptdesk,代码行数:38,代码来源:HTMLCollectionMetaTable.php

示例7: getHTML

 /**
  * @return string
  */
 public function getHTML()
 {
     // Select: All, None, Invert
     $links = [$this->checkboxLink('all'), $this->checkboxLink('none'), $this->checkboxLink('invert')];
     return Html::rawElement('div', ['class' => 'mw-checkbox-toggle-controls'], $this->output->msg('checkbox-select')->rawParams($this->output->getLanguage()->commaList($links))->escaped());
 }
开发者ID:paladox,项目名称:mediawiki,代码行数:9,代码来源:ListToggle.php


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