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


PHP Gdn_Format::markdown方法代码示例

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


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

示例1: parseReadme

 /**
  * Parse an addon's README file.
  *
  * @param string $Path The base path to search from.
  * @return string
  */
 protected function parseReadme($Path)
 {
     $ReadmePaths = array('/readme', '/README', '/readme.md', '/README.md', '/readme.txt', '/README.txt');
     $Description = '';
     // Get the list of potential files to analyze.
     $Entries = UpdateModel::findFiles($Path, $ReadmePaths);
     if ($Entries === false) {
         return '';
     }
     foreach ($Entries as $Entry) {
         $ReadMeContents = file_get_contents($Entry['Path']);
         $Description = Gdn_Format::markdown($ReadMeContents);
     }
     $FolderPath = substr($Path, 0, -4);
     Gdn_FileSystem::removeFolder($FolderPath);
     return $Description;
 }
开发者ID:vanilla,项目名称:community,代码行数:23,代码来源:class.addoncontroller.php

示例2: t

<?php

if (!defined('APPLICATION')) {
    exit;
}
?>
<div class="SplashInfo">
    <div class="Center">
        <h1><?php 
echo $this->data('Title', t('Whoops!'));
?>
</h1>

        <div id="Message">
            <?php 
echo Gdn_Format::markdown($this->sanitize($this->data('Exception', 'No error message supplied.')));
?>
        </div>
    </div>
    <?php 
if (debug() && $this->data('Trace')) {
    ?>
        <h2>Error</h2>
        <?php 
    echo $this->data('Code') . ' ' . htmlspecialchars(Gdn_Controller::getStatusMessage($this->data('Code')));
    ?>
        <h2>Trace</h2>
        <pre stye="text-align"><?php 
    echo htmlspecialchars($this->data('Trace'));
    ?>
</pre>
开发者ID:caidongyun,项目名称:vanilla,代码行数:31,代码来源:error.php

示例3: t

     $typeHelp = t('AddonHelpFor' . $addonType, '');
     if ($typeHelp) {
         echo '<div class="Help">' . $typeHelp . '</div>';
     }
 }
 if ($this->data('Icon') != '') {
     echo '<img class="Icon" src="' . Gdn_Upload::url($this->data('Icon')) . '" itemprop="image" />';
 }
 $currentVersion = $this->data('CurrentVersion');
 if ($currentVersion && $currentVersion != $this->data('Version')) {
     echo '<p>', sprintf(t("This is not the most recent version of this plugin.", 'This is not the most recent version of this plugin. For the most recent version click <a href="%s">here</a>.'), URL('addon/' . AddonModel::Slug($this->Data, false))), '</p>';
 }
 echo '<div itemprop="description">';
 echo Gdn_Format::html($this->data('Description'));
 if ($this->data('Description2') && $ver != 'v1') {
     echo '<br /><br />', Gdn_Format::markdown($this->data('Description2'));
 }
 echo '</div>';
 ?>
 </div>
 <?php 
 if ($this->PictureData->numRows() > 0) {
     ?>
     <div class="PictureBox">
         <?php 
     foreach ($this->PictureData->result() as $picture) {
         echo '<span class="AddonPicture">';
         echo '<a rel="popable[gallery]" href="#Pic_' . $picture->AddonPictureID . '"><img src="' . Gdn_Upload::url(ChangeBasename($picture->File, 'at%s')) . '" itemprop="screenshot" /></a>';
         if ($session->UserID == $this->data('InsertUserID') || checkPermission('Addons.Addon.Manage')) {
             echo '<a class="Popup DeletePicture" href="' . Url('/addon/deletepicture/' . $picture->AddonPictureID) . '">x</a>';
         }
开发者ID:vanilla,项目名称:community,代码行数:31,代码来源:addon.php


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