本文整理汇总了PHP中TBGSettings::getSyntaxClass方法的典型用法代码示例。如果您正苦于以下问题:PHP TBGSettings::getSyntaxClass方法的具体用法?PHP TBGSettings::getSyntaxClass怎么用?PHP TBGSettings::getSyntaxClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TBGSettings
的用法示例。
在下文中一共展示了TBGSettings::getSyntaxClass方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
<?php
$markuppable = !isset($markuppable) ? true : $markuppable;
if ($markuppable) {
$syntax = isset($syntax) ? $syntax : TBGSettings::SYNTAX_MW;
if (is_numeric($syntax)) {
$syntax = TBGSettings::getSyntaxClass($syntax);
}
} else {
$syntax = TBGSettings::getSyntaxClass(TBGSettings::SYNTAX_MD);
}
switch ($syntax) {
case 'mw':
$syntaxname = __('Mediawiki');
break;
case 'md':
$syntaxname = __('Markdown');
break;
case 'pt':
$syntaxname = __('Plaintext');
break;
}
$base_id = isset($area_id) ? $area_id : $area_name;
$mentionable = isset($target_type) && isset($target_id);
?>
<div class="textarea_container syntax_<?php
echo $syntax;
?>
">
<div class="syntax_picker_container">
<input type="hidden" id="<?php
示例2: __
</div>
</div>
<div id="comment_edit_<?php
echo $comment->getID();
?>
" class="comment_edit comment_editor" style="display: none;">
<div class="comment_add_title"><?php
echo __('Edit comment %comment_number', array('%comment_number' => "<a href='#comment_{$comment->getID()}'>#" . $comment->getCommentNumber() . '</a>'));
?>
</div><br>
<form id="comment_edit_form_<?php
echo $comment->getID();
?>
" class="syntax_<?php
echo TBGSettings::getSyntaxClass($comment->getSyntax());
?>
" action="<?php
echo make_url('comment_update', array('comment_id' => $comment->getID()));
?>
" method="post" onSubmit="TBG.Main.Comment.update('<?php
echo make_url('comment_update', array('comment_id' => $comment->getID()));
?>
', '<?php
echo $comment->getID();
?>
'); return false;">
<input type="hidden" name="comment_id" value="<?php
echo $comment->getID();
?>
" />
示例3: getPreferredCommentsSyntax
public function getPreferredCommentsSyntax($real_value = false)
{
if ($real_value) {
return $this->_preferred_comments_syntax;
}
return TBGSettings::getSyntaxClass($this->_preferred_comments_syntax);
}
示例4: array
<?php
TBGContext::loadLibrary('publish/publish');
?>
<div class="article syntax_<?php
echo TBGSettings::getSyntaxClass($article->getContentSyntax());
?>
">
<?php
if ($show_title) {
?>
<?php
include_template('publish/header', array('article_name' => $article->getName(), 'article' => $article, 'show_actions' => $show_actions, 'mode' => $mode, 'embedded' => $embedded));
?>
<?php
}
?>
<?php
if ($show_details && $show_article) {
?>
<div class="details">
<?php
if (isset($redirected_from)) {
?>
<div class="redirected_from">→ <?php
echo __('Redirected from %article_name', array('%article_name' => link_tag(make_url('publish_article_edit', array('article_name' => $redirected_from)), $redirected_from)));
?>
</div>
<?php
}
?>