本文整理匯總了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
}
?>