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


PHP OutputPage::addHtml方法代码示例

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


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

示例1: onBeforePageDisplay

 public static function onBeforePageDisplay(OutputPage &$out, &$skin)
 {
     global $wgExtensionsPath;
     if (self::isEnabled()) {
         $out->addHtml('<noscript><link rel="stylesheet" href="' . $wgExtensionsPath . '/wikia/ImageLazyLoad/css/ImageLazyLoadNoScript.css" /></noscript>');
     }
     return true;
 }
开发者ID:yusufchang,项目名称:app,代码行数:8,代码来源:ImageLazyLoad.class.php

示例2: TOCcssfornoscript

/**
 * Adds a script to a page that protects users without JavaScript from not being able
 * too see TOC (which is now hidden by default)
 */
function TOCcssfornoscript(OutputPage &$out, &$skin)
{
    // Do not add this asset on VenusSkin
    if ($skin instanceof SkinVenus) {
        return true;
    }
    $out->addHtml('<noscript><link rel="stylesheet" href="' . F::app()->wg->ExtensionsPath . '/wikia/TOCimprovements/TOCNoScript.css" /></noscript>');
    return true;
}
开发者ID:Tjorriemorrie,项目名称:app,代码行数:13,代码来源:TOCimprovements.php

示例3: outputResults

 /**
  * Format and output report results using the given information plus
  * OutputPage
  *
  * @param OutputPage $out OutputPage to print to
  * @param Skin $skin User skin to use
  * @param Database $dbr Database (read) connection to use
  * @param int $res Result pointer
  * @param int $num Number of available result rows
  * @param int $offset Paging offset
  */
 protected function outputResults($out, $skin, $dbr, $res, $num, $offset)
 {
     if ($num > 0) {
         $gallery = new ImageGallery();
         $gallery->useSkin($skin);
         # $res might contain the whole 1,000 rows, so we read up to
         # $num [should update this to use a Pager]
         for ($i = 0; $i < $num && ($row = $dbr->fetchObject($res)); $i++) {
             $image = $this->prepareImage($row);
             if ($image) {
                 $gallery->add($image->getTitle(), $this->getCellHtml($row));
             }
         }
         $out->addHtml($gallery->toHtml());
     }
 }
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:27,代码来源:ImageQueryPage.php

示例4: outputInformation

 /**
  * Dispatched from execute();
  */
 private function outputInformation()
 {
     // TODO RBV (14.12.10 09:59): Display information about WebService availability, configuration settings, etc... Could also be used to monitor Webservice and manually empty cache.
     $this->oOutputPage->setPageTitle(wfMessage('bs-universalexport-page-title-without-param')->text());
     $this->oOutputPage->addHtml(wfMessage('bs-universalexport-page-text-without-param')->text());
     $this->oOutputPage->addHtml('<hr />');
     if (empty($this->aModules)) {
         $this->oOutputPage->addHtml(wfMessage('bs-universalexport-page-text-without-param-no-modules-registered')->text());
         return;
     }
     foreach ($this->aModules as $sKey => $oModule) {
         if ($oModule instanceof BsUniversalExportModule) {
             $oModuleOverview = $oModule->getOverview();
             $this->oOutputPage->addHtml($oModuleOverview->execute());
         } else {
             wfDebugLog('BS::UniversalExport', 'SpecialUniversalExport::outputInformation: Invalid view.');
         }
     }
 }
开发者ID:hfroese,项目名称:mediawiki-extensions-BlueSpiceExtensions,代码行数:22,代码来源:SpecialUniversalExport.class.php

示例5: showEmail

	protected function showEmail( $step ) {
		$header = new HtmlTag( 'h2' );
		$step_message = 'translate-fs-email-title';
		$header->style( 'opacity', 0.4 )->content( wfMsg( $step_message ) );

		if ( $step && ( $step !== 'translate-fs-target-title' && $step !== 'translate-fs-permissions-title' ) ) {
			$this->out->addHtml( $header );
			return $step;
		}

		if ( $this->user->isEmailConfirmed() ) {
			$header->content( $header->content . wfMsg( 'translate-fs-pagetitle-done' ) );
			$this->out->addHtml( $header );
			return $step; // Start translating step
		}

		$this->out->addHtml( $header->style( 'opacity', false ) );
		$this->out->addWikiMsg( 'translate-fs-email-text' );

		return $step_message;
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:21,代码来源:SpecialFirstSteps.php

示例6: viewHook

 /**
  * Hook into Article::view() to provide syntax highlighting for
  * custom CSS and JavaScript pages
  *
  * @param string $text
  * @param Title $title
  * @param OutputPage $output
  * @return bool
  */
 public static function viewHook($text, $title, $output)
 {
     // Determine the language
     preg_match('!\\.(css|js)$!u', $title->getText(), $matches);
     $lang = $matches[1] == 'css' ? 'css' : 'javascript';
     // Attempt to format
     $geshi = self::prepare($text, $lang);
     if ($geshi instanceof GeSHi) {
         $out = $geshi->parse_code();
         if (!$geshi->error()) {
             // Done
             $output->addHeadItem("source-{$lang}", self::buildHeadItem($geshi));
             $output->addHtml("<div dir=\"ltr\">{$out}</div>");
             return false;
         }
     }
     // Bottle out
     return true;
 }
开发者ID:hoonio,项目名称:mediawiki,代码行数:28,代码来源:SyntaxHighlight_GeSHi.class.php

示例7: showDeletionLog

 /**
  * If there are rows in the deletion log for this page, show them,
  * along with a nice little note for the user
  *
  * @param OutputPage $out
  */
 private function showDeletionLog($out)
 {
     $title = $this->mTitle;
     $reader = new LogReader(new FauxRequest(array('page' => $title->getPrefixedText(), 'type' => 'delete')));
     if ($reader->hasRows()) {
         $out->addHtml('<div id="mw-recreate-deleted-warn">');
         $out->addWikiMsg('recreate-deleted-warn');
         $viewer = new LogViewer($reader);
         $viewer->showList($out);
         $out->addHtml('</div>');
     }
 }
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:18,代码来源:EditPage.php

示例8: showLogFragment

 /**
  * Show a rights log fragment for the specified user
  *
  * @param User $user User to show log for
  * @param OutputPage $output OutputPage to use
  */
 protected function showLogFragment($user, $output)
 {
     $viewer = new LogViewer(new LogReader(new FauxRequest(array('type' => 'rights', 'page' => $user->getUserPage()->getPrefixedText()))));
     $output->addHtml("<h2>" . htmlspecialchars(LogPage::logName('rights')) . "</h2>\n");
     $viewer->showList($output);
 }
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:12,代码来源:SpecialUserrights.php

示例9: onBeforePageDisplay

 function onBeforePageDisplay(OutputPage &$out, &$skin)
 {
     if (self::$enabled) {
         $out->addHtml('<noscript><link rel="stylesheet" href="' . $this->app->wg->ExtensionsPath . '/wikia/ImageLazyLoad/css/ImageLazyLoadNoScript.css" /></noscript>');
     }
     return true;
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:7,代码来源:ImageLazyLoad.class.php

示例10: addSpecialHelpLink

	/**
	 * @since 2012-01-12
	 */
	public static function addSpecialHelpLink( OutputPage $out, /*string*/$to ) {
		$out->addModules( 'ext.translate.helplink' );
		$text = wfMessage( 'translate-gethelp' )->escaped();
		$link = Html::rawElement( 'a', array( 'href' => "//www.mediawiki.org/wiki/Special:MyLanguage/$to" ), "$text" );
		$wrapper = Html::rawElement( 'div', array( 'class' => 'mw-translate-helplink' ), $link );
		$out->addHtml( $wrapper );
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:10,代码来源:TranslateUtils.php

示例11: showItemCount

 /**
  * Show a message indicating the number of items on the user's watchlist,
  * and return this count for additional checking
  *
  * @param OutputPage $output
  * @param User $user
  * @return int
  */
 private function showItemCount($output, $user)
 {
     if (($count = $this->countWatchlist($user)) > 0) {
         $output->addHtml(wfMsgExt('watchlistedit-numitems', 'parse', $GLOBALS['wgLang']->formatNum($count)));
     } else {
         $output->addHtml(wfMsgExt('watchlistedit-noitems', 'parse'));
     }
     return $count;
 }
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:17,代码来源:WatchlistEditor.php

示例12: outputResults

 /**
  * Format and output report results using the given information plus
  * OutputPage
  *
  * @param OutputPage $out OutputPage to print to
  * @param Skin $skin User skin to use
  * @param Database $dbr Database (read) connection to use
  * @param int $res Result pointer
  * @param int $num Number of available result rows
  * @param int $offset Paging offset
  */
 protected function outputResults($out, $skin, $dbr, $res, $num, $offset)
 {
     global $wgContLang;
     if ($num > 0) {
         $html = array();
         if (!$this->listoutput) {
             $html[] = $this->openList($offset);
         }
         # $res might contain the whole 1,000 rows, so we read up to
         # $num [should update this to use a Pager]
         for ($i = 0; $i < $num && ($row = $dbr->fetchObject($res)); $i++) {
             $line = $this->formatResult($skin, $row);
             if ($line) {
                 $attr = isset($row->usepatrol) && $row->usepatrol && $row->patrolled == 0 ? ' class="not-patrolled"' : '';
                 $html[] = $this->listoutput ? $line : "<li{$attr}>{$line}</li>\n";
             }
         }
         # Flush the final result
         if ($this->tryLastResult()) {
             $row = null;
             $line = $this->formatResult($skin, $row);
             if ($line) {
                 $attr = isset($row->usepatrol) && $row->usepatrol && $row->patrolled == 0 ? ' class="not-patrolled"' : '';
                 $html[] = $this->listoutput ? $line : "<li{$attr}>{$line}</li>\n";
             }
         }
         if (!$this->listoutput) {
             $html[] = $this->closeList();
         }
         $html = $this->listoutput ? $wgContLang->listToText($html) : implode('', $html);
         $out->addHtml($html);
     }
 }
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:44,代码来源:QueryPage.php

示例13: outputResults

 /**
  * Format and output report results using the given information plus
  * OutputPage
  *
  * @param OutputPage $out OutputPage to print to
  * @param Skin $skin User skin to use
  * @param Database $dbr Database (read) connection to use
  * @param int $res Result pointer
  * @param int $num Number of available result rows
  * @param int $offset Paging offset
  */
 protected function outputResults($out, $skin, $dbr, $res, $num, $offset)
 {
     global $wgContLang, $wgUser, $wgLanguageCode;
     if ($num > 0) {
         $html = array();
         if (!$this->listoutput) {
             $html[] = $this->openList($offset);
         }
         # $res might contain the whole 1,000 rows, so we read up to
         # $num [should update this to use a Pager]
         for ($i = 0; $i < $num && ($row = $dbr->fetchObject($res)); $i++) {
             $line = $this->formatResult($skin, $row);
             $title = preg_replace('/-/', ' ', $row->title);
             if ($line) {
                 $attr = isset($row->usepatrol) && $row->usepatrol && $row->patrolled == 0 ? ' class="not-patrolled"' : '';
                 if ($wgUser->getID() > 0 && ($wgLanguageCode != 'zh' && $wgLanguageCode != 'ru' && $wgLanguageCode != 'hi')) {
                     $html[] = $this->listoutput ? $line : "<li{$attr}><div id=\"" . htmlentities($title, ENT_QUOTES) . "\">{$line}   <input type=\"button\" value=\"" . wfMsg('up_add_category') . "\" onclick=\"frames['dlogBody'].supAC('" . urlencode($title) . "');\"></div> </li>\n";
                 } else {
                     $html[] = $this->listoutput ? $line : "<li{$attr}>{$line}</li>\n";
                 }
             }
         }
         # Flush the final result
         if ($this->tryLastResult()) {
             $row = null;
             $line = $this->formatResult($skin, $row);
             if ($line) {
                 $attr = isset($row->usepatrol) && $row->usepatrol && $row->patrolled == 0 ? ' class="not-patrolled"' : '';
                 $html[] = $this->listoutput ? $line : "<li{$attr}>{$line}</li>\n";
             }
         }
         if (!$this->listoutput) {
             $html[] = $this->closeList();
         }
         $html = $this->listoutput ? $wgContLang->listToText($html) : implode('', $html);
         $out->addHtml($html);
         if ($wgUser->getID() > 0 && ($wgLanguageCode != 'zh' && $wgLanguageCode != 'ru' && $wgLanguageCode != 'hi')) {
             $out->addHtml($this->getCategoryPopup());
         }
     }
 }
开发者ID:ErdemA,项目名称:wikihow,代码行数:52,代码来源:SpecialUncategorizedpages.php

示例14: showDeletionLog

 /**
  * If there are rows in the deletion log for this file, show them,
  * along with a nice little note for the user
  *
  * @param OutputPage $out
  * @param string filename
  */
 private function showDeletionLog($out, $filename)
 {
     $reader = new LogReader(new FauxRequest(array('page' => $filename, 'type' => 'delete')));
     if ($reader->hasRows()) {
         $out->addHtml('<div id="mw-upload-deleted-warn">');
         $out->addWikiMsg('upload-wasdeleted');
         $viewer = new LogViewer($reader);
         $viewer->showList($out);
         $out->addHtml('</div>');
     }
 }
开发者ID:BackupTheBerlios,项目名称:shoutwiki-svn,代码行数:18,代码来源:SpecialUpload.php

示例15: addTemporarySaveFields

 /**
  * Add fields to perform temporary save
  */
 private static function addTemporarySaveFields(OutputPage $out)
 {
     $out->addHtml("\n" . Xml::element('input', array('type' => 'hidden', 'id' => 'RTETemporarySaveType', 'name' => 'RTETemporarySaveType')) . Xml::element('input', array('type' => 'hidden', 'id' => 'RTETemporarySaveContent', 'name' => 'RTETemporarySaveContent')) . "\n");
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:7,代码来源:RTE.class.php


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