本文整理汇总了PHP中HHtml::enrichText方法的典型用法代码示例。如果您正苦于以下问题:PHP HHtml::enrichText方法的具体用法?PHP HHtml::enrichText怎么用?PHP HHtml::enrichText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HHtml
的用法示例。
在下文中一共展示了HHtml::enrichText方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
}
?>
</small>
</h4>
<div class="content" id="comment_editarea_<?php
echo $comment->id;
?>
">
<span id="comment-message-<?php
echo $comment->id;
?>
"><?php
print HHtml::enrichText($comment->message);
?>
</span>
<?php
$this->widget('application.modules_core.file.widgets.ShowFilesWidget', array('object' => $comment));
?>
</div>
<div class="wall-entry-controls">
<?php
Yii::app()->getController()->widget('application.modules_core.like.widgets.LikeLinkWidget', array('object' => $comment));
?>
</div>
</div>
示例2:
?>
<div class="form-group">
<label
class="col-sm-3 control-label"><?php
echo CHtml::encode(Yii::t($field->getTranslationCategory(), $field->title));
?>
</label>
<?php
if (strtolower($field->title) == 'about') {
?>
<div class="col-sm-9">
<p class="form-control-static"><?php
echo HHtml::enrichText($field->getUserValue($user, false));
?>
</p>
</div>
<?php
} else {
?>
<div class="col-sm-9">
<p class="form-control-static"><?php
if ($field['field_type_class'] == 'ProfileFieldTypeTextArea') {
echo nl2br($field->getUserValue($user, false));
} else {
echo $field->getUserValue($user, false);
}
?>
</p>
示例3: strlen
echo $post->id;
?>
').addClass('highlight');
$('#post-content-<?php
echo $post->id;
?>
').delay(200).animate({backgroundColor: 'transparent'}, 1000);
<?php
}
?>
$(document).ready(function () {
// save the count of characters
var _words = '<?php
echo strlen(HHtml::enrichText($post->message));
?>
';
var _postHeight = $('#post-content-<?php
echo $post->id;
?>
').outerHeight();
/* if (_words > 1100) {
// show more-button
$('#more-link-post-
<?php
echo $post->id;
示例4: array
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
?>
<div class="content" style="max-height: 40px; max-width:250px;">
<p id="content-message-<?php
echo $reportedContent->id;
?>
" style="display: inline;" class="contentAnchor"><?php
print HHtml::enrichText($reportedContent->getSource()->message);
?>
</p>
<br/>
<small class="media">
<span class="time"><?php
echo Yii::t('ReporterContent.base', 'created by :displayName', array(':displayName' => CHtml::encode($reportedContent->getSource()->content->user->displayName)));
?>
</span>
<?php
echo HHtml::timeago($reportedContent->getSource()->created_at);
?>
</small>
</div>
<script type="text/javascript">
示例5: array
?>
<br />
<br />
<?php
$this->widget('application.modules.questionanswer.widgets.BestAnswerWidget', array('post_id' => $question_answer['id'], 'author' => $author, 'model' => new QuestionVotes(), 'accepted_answer' => $question_answer['answer_status'] ? true : false));
?>
<?php
$answerModel = Answer::model()->findByPk($question_answer['id']);
$comments = $answerModel->comments;
$this->widget('application.modules_core.file.widgets.ShowFilesWidget', array('object' => $answerModel));
if ($comments) {
echo "<div style=\"border: 1px solid #ccc; background-color: #f2f2f2; padding:10px; margin-top:10px;\">";
foreach ($comments as $comment) {
echo '<div style="border-bottom:1px solid #d8d8d8; padding: 4px;">';
print HHtml::enrichText($comment->post_text);
echo " • <a href=\"" . $this->createUrl('//user/profile', array('uguid' => $comment->user->guid)) . "\">" . $comment->user->displayName . "</a>";
echo "<small>";
if (Yii::app()->user->isAdmin() || $comment->created_by == Yii::app()->user->id) {
echo " — ";
echo CHtml::link("Edit", array('//questionanswer/comment/update', 'id' => $comment->id));
}
if (Yii::app()->user->isAdmin()) {
echo " • ";
echo CHtml::linkButton('Delete', array('submit' => $this->createUrl('//questionanswer/comment/delete', array('id' => $comment->id)), 'confirm' => "Are you sure want to delete?", 'csrf' => true, 'params' => array('YII_CSRF_TOKEN' => Yii::app()->request->csrfToken)));
}
echo "</small>";
echo '</div>';
}
echo "</div>";
}
示例6: array
<?php
echo CHtml::hiddenField('contentModel', $contentModel);
?>
<?php
echo CHtml::hiddenField('contentId', $contentId);
?>
<?php
echo $form->textArea($comment, 'message', array('class' => 'form-control', 'id' => 'comment_input_' . $comment->id, 'placeholder' => Yii::t('CommentModule.views_edit', 'Edit your comment...')));
?>
<!-- create contenteditable div for HEditorWidget to place the data -->
<div id="comment_input_<?php
echo $comment->id;
?>
_contenteditable" class="form-control atwho-input" contenteditable="true"><?php
echo HHtml::enrichText($comment->message);
?>
</div>
<?php
/* Modify textarea for mention input */
$this->widget('application.widgets.HEditorWidget', array('id' => 'comment_input_' . $comment->id, 'inputContent' => $comment->message));
?>
<?php
// Creates Uploading Button
$this->widget('application.modules_core.file.widgets.FileUploadButtonWidget', array('uploaderId' => 'comment_upload_' . $comment->id, 'fileListFieldName' => 'fileList', 'object' => $comment));
?>
示例7: array
echo $post->id;
?>
">
<?php
$form = $this->beginWidget('CActiveForm', array('id' => 'post-edit-form', 'enableAjaxValidation' => false));
?>
<?php
echo $form->textArea($post, 'message', array('class' => 'form-control', 'id' => 'post_input_' . $post->id, 'placeholder' => Yii::t('PostModule.views_edit', 'Edit your post...')));
?>
<!-- create contenteditable div for HEditorWidget to place the data -->
<div id="post_input_<?php
echo $post->id;
?>
_contenteditable" class="form-control atwho-input" contenteditable="true"><?php
echo HHtml::enrichText($post->message);
?>
</div>
<?php
/* Modify textarea for mention input */
$this->widget('application.widgets.HEditorWidget', array('id' => 'post_input_' . $post->id, 'inputContent' => $post->message));
?>
<?php
// Creates Uploading Button
$this->widget('application.modules_core.file.widgets.FileUploadButtonWidget', array('uploaderId' => 'post_upload_' . $post->id, 'object' => $post));
?>
示例8: strlen
echo $post->id;
?>
').addClass('highlight');
$('#post-content-<?php
echo $post->id;
?>
').delay(200).animate({backgroundColor: 'transparent'}, 1000);
<?php
}
?>
$(document).ready(function () {
// save the count of characters
var _words = '<?php
echo strlen(strip_tags(HHtml::enrichText($post->message)));
?>
';
var _postHeight = $('#post-content-<?php
echo $post->id;
?>
').outerHeight();
/* if (_words > 1100) {
// show more-button
$('#more-link-post-
<?php
echo $post->id;