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


PHP HHtml::timeago方法代码示例

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


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

示例1: array

                href="<?php 
echo $object->content->user->getProfileUrl();
?>
"><?php 
echo CHtml::encode($object->content->user->displayName);
?>
</a>
            <small><?php 
echo HHtml::timeago($object->content->created_at);
?>

                <?php 
if ($object->content->created_at != $object->content->updated_at) {
    ?>
                    (<?php 
    echo Yii::t('WallModule.views_wallLayout', 'Updated :timeago', array(':timeago' => HHtml::timeago($object->content->updated_at)));
    ?>
)
                <?php 
}
?>

                <!-- show space name -->
                <?php 
if (!Yii::app()->controller instanceof ContentContainerController && $object->content->container instanceof Space) {
    ?>
                    <?php 
    echo Yii::t('WallModule.views_wallLayout', 'in');
    ?>
 <strong><a href="<?php 
    echo $object->content->container->getUrl();
开发者ID:byronmejia,项目名称:humhub-themes-tq,代码行数:31,代码来源:wallLayout.php

示例2:

                     src="<?php 
    echo $activity->content->space->getProfileImage()->getUrl();
    ?>
">
                 <?php 
}
?>

            <div class="media-body">

                <!-- Show content -->
                <?php 
echo $content;
?>
<br>

                <!-- show time -->
                <?php 
echo HHtml::timeago($activity->content->created_at);
?>
            </div>
        </div>
        <?php 
if ($this->wallEntryId != 0) {
    ?>
</a><?php 
}
?>
</li>

开发者ID:byronmejia,项目名称:humhub-themes-tq,代码行数:29,代码来源:activityLayout.php

示例3: array

    <div class="media-body">
        <h4 class="media-heading"><a href="<?php 
echo $user->getProfileUrl();
?>
"><?php 
echo CHtml::encode($user->displayName);
?>
</a>
            <small><?php 
echo HHtml::timeago($comment->created_at);
?>
                <?php 
if ($comment->created_at != $comment->updated_at) {
    ?>
                    (<?php 
    echo Yii::t('CommentModule.widgets_views_showComment', 'Updated :timeago', array(':timeago' => HHtml::timeago($comment->updated_at)));
    ?>
)
                <?php 
}
?>
            </small>
        </h4>


        <div class="content" id="comment_editarea_<?php 
echo $comment->id;
?>
">
            <span id="comment-message-<?php 
echo $comment->id;
开发者ID:byronmejia,项目名称:humhub-themes-tq,代码行数:31,代码来源:showComment.php

示例4: run

    <div class="panel-body">

        <p>
            <strong>Status:</strong><br/>
            <?php 
$lastRunHourly = HSetting::get('cronLastHourlyRun');
$lastRunDaily = HSetting::get('cronLastDailyRun');
if ($lastRunHourly == "") {
    $lastRunHourly = "<span style='color:red'>" . Yii::t('AdminModule.views_setting_cronjob', 'Never') . "</span>";
} else {
    $lastRunHourly = HHtml::timeago($lastRunHourly);
}
if ($lastRunDaily == "") {
    $lastRunDaily = "<span style='color:red'>" . Yii::t('AdminModule.views_setting_cronjob', 'Never') . "</span>";
} else {
    $lastRunDaily = HHtml::timeago($lastRunDaily);
}
?>

            <?php 
echo Yii::t('AdminModule.views_setting_cronjob', 'Last run (hourly):');
?>
 <?php 
echo $lastRunHourly;
?>
 <br/>
            <?php 
echo Yii::t('AdminModule.views_setting_cronjob', 'Last run (daily):');
?>
 <?php 
echo $lastRunDaily;
开发者ID:ahdail,项目名称:humhub,代码行数:31,代码来源:cronjob.php

示例5: array

            
    <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">

$(document).ready(shortenContentMessages);

function shortenContentMessages(id, data){
    $('.contentAnchor').each(function(){
        var divh=$(this).parent().height();
        var divw=$(this).parent().width();
        
        while ($(this).outerHeight()>divh || $(this).outerWidth()>divw) {
        	$(this).text(function (index, text) {
开发者ID:ConnectedCommunities,项目名称:humhub-modules-karma,代码行数:30,代码来源:contentGrid.php

示例6: function

                <div class="modal-dialog" style="width: 900px;">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="myModalLabel"><?php 
echo $model->name;
?>
</h4>
                        </div>
                        <div class="modal-body">
                            <div class="loader"></div>
                            <div class="row album-content"></div>
                        </div>
                        <div class="modal-footer" style="display: none;">
                            created <?php 
echo HHtml::timeago($model->created_at);
?>
                        </div>
                    </div>
                </div>
            </div>
        <?php 
$this->endContent();
?>
    </div>
</div>
<script>
    $('#album-modal-<?php 
echo $id;
?>
').on('shown.bs.modal', function (e) {
开发者ID:rafapaul,项目名称:humhub-modules-album,代码行数:31,代码来源:album.php

示例7: array

    <?php 
}
?>

    <div class="media-body">
        <!-- show username with link and creation time-->
        <h4 class="media-heading"><a
                href="<?php 
echo $object->content->user->getProfileUrl();
?>
"><?php 
echo $object->content->user->displayName;
?>
</a>
            <small><?php 
echo HHtml::timeago($object->content->created_at);
?>

                <!-- show labels -->
                <?php 
$this->widget('application.modules_core.wall.widgets.WallEntryLabelWidget', array('object' => $object));
?>

            </small>
        </h4>
        <h5><?php 
echo $object->content->user->profile->title;
?>
</h5>

    </div>
开发者ID:ahdail,项目名称:humhub,代码行数:31,代码来源:wallLayout.php

示例8:

');">
        <div class="media">
        	<span class="profile-size-sm pull-left">
                <img class="media-object profile-size-sm img-rounded" data-src="holder.js/32x32" alt="32x32" style="width: 32px; height: 32px;" src="<?php 
echo $message->getLastEntry()->user->getProfileImage()->getUrl();
?>
">
                <div class="profile-overlay-img profile-overlay-img-sm"></div>
            </span>
            
            <div class="media-body">
                <h4 class="media-heading"><?php 
echo CHtml::encode($message->getLastEntry()->user->displayName);
?>
 <small><?php 
echo HHtml::timeago($message->updated_at);
?>
</small></h4>
                <h5><?php 
print CHtml::encode(Helpers::truncateText($message->title, 75));
?>
</h5>
                <?php 
echo Helpers::truncateText(HMarkdownPreview::Render($message->getLastEntry()->content), 200);
?>
                <?php 
// show the new badge, if this message is still unread
if ($message->updated_at > $userMessage->last_viewed and $message->getLastEntry()->user->id != Yii::app()->user->id) {
    echo '<span class="label label-danger">' . Yii::t('MailModule.views_mail_index', 'New') . '</span>';
}
?>
开发者ID:byronmejia,项目名称:humhub-themes-tq,代码行数:31,代码来源:_messagePreview.php

示例9:

        <img class="media-object img-rounded user-image" src="<?php 
echo $user->getProfileImage()->getUrl();
?>
" width="40"
             height="40" alt="40x40" data-src="holder.js/40x40" style="width: 40px; height: 40px;"/>
    </a>

    <div class="media-body">
        <h4 class="media-heading"><a href="<?php 
echo $user->getProfileUrl();
?>
"><?php 
echo $user->displayName;
?>
</a> <small><?php 
echo HHtml::timeago($comment->created_at);
?>
</small></h4>
        <span class="content">
            <?php 
print HHtml::enrichText($comment->message);
?>
        </span>

        <?php 
//echo CHtml::link(Yii::t('CommentModule.widgets_views_showComment', "Delete"), '#');
?>

        <div class="wall-entry-controls">
            <?php 
if ($comment->canDelete()) {
开发者ID:ahdail,项目名称:humhub,代码行数:31,代码来源:showComment.php

示例10: array

/**
 * This View shows a profile
 *
 * @property User $user is the user object
 *
 * @package application.modules.questionanswer
 * @since 0.5
 */
?>

<div class="media-body qanda-profile">

    <div class="row">
        <div class="col-xs-12 qanda-profile-timestamp">
            <small>posted <?php 
echo HHtml::timeago($timestamp);
?>
</small>
        </div>
    </div>
    <div class="row">
        <div class="col-xs-12">
            <a href="<?php 
echo $this->createUrl('//user/profile', array('uguid' => $user->guid));
?>
">
                <span class="pull-left profile-size-sm">
                    <img class="media-object img-rounded profile-size-sm"
                     src="<?php 
echo $user->getProfileImage()->getUrl();
?>
开发者ID:byronmejia,项目名称:humhub-themes-tq,代码行数:31,代码来源:profile.php


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