本文整理汇总了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;
}
示例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>
示例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>';
}