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


PHP x2base::timestampAge方法代码示例

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


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

示例1: array

		if($data->user==Yii::app()->user->getName() || $data->associationId==Yii::app()->user->getId())
			echo CHtml::link('[x]',array('deletePost','id'=>$data->id,'redirect'=>Yii::app()->controller->action->id)); //,array('class'=>'x2-button') ?>
	</div>
	<?php echo CHtml::link(Yii::t('profile','Reply'),'#',array('onclick'=>"$('#addReply-".$data->id."').toggle();",'class'=>'x2-button float')); ?>

	<?php
	if($authorRecord->id != $data->associationId && $data->associationId != 0) {
		$temp=Profile::model()->findByPk($data->associationId);
		$recipient=$temp->fullName;
		$modifier=' &raquo; ';
	} else {
		$recipient='';
		$modifier='';
	}
	?>
	<?php echo CHtml::link($author,array('profile/view','id'=>$authorRecord->id)).$modifier.CHtml::link($recipient,$data->associationId); ?> <span class="comment-age"><?php echo x2base::timestampAge(date("Y-m-d H:i:s",$data->timestamp)); ?></span><br />
	<?php echo x2base::convertLineBreaks($this->convertUrls($data->data)); ?><br />
	<?php 
	if(count($commentDataProvider->getData())>0){
		$this->widget('zii.widgets.CListView', array(
		'dataProvider'=>$commentDataProvider,
		'itemView'=>'../social/_view',
		'template'=>'{items}'
	));
	}
	
	echo CHtml::beginForm(
		'addComment',
		'get',
		array(
			'style'=>'display:none;',
开发者ID:ruchida,项目名称:X2Engine,代码行数:31,代码来源:_viewFull.php

示例2:

 * 
 * In accordance with Section 7(b) of the GNU General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * X2Engine" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by X2Engine".
 ********************************************************************************/

$authorRecord = Users::model()->findByPk($data->createdBy);
$author = $authorRecord->firstName.' '.$authorRecord->lastName;
?>
<div class="view">
	<div class="deleteButton">
		<?php echo CHtml::link('[x]',array('deleteNote','id'=>$data->id)); //,array('class'=>'x2-button') ?>
	</div>
	<?php echo CHtml::link($author,array('users/view','id'=>$authorRecord->id)); ?> <span class="comment-age"><?php echo x2base::timestampAge($data->createDate); ?></span><br />
	<?php echo CHtml::encode($data->note); ?>
</div>


<?php /*
<div class="view">
	<div class="deleteButton">
		<?php echo CHtml::link('[x]',array('deleteNote','id'=>$data->id)); //,array('class'=>'x2-button') ?>
		<?php //echo CHtml::link("<img src='".Yii::app()->request->baseUrl."/images/deleteButton.png' />",array("deleteNote","id"=>$data->id)); ?>
	</div>

	<b><?php echo CHtml::encode($data->getAttributeLabel('createdBy')); ?>:</b>
	<?php echo CHtml::encode($data->createdBy); ?>
	<br />
开发者ID:ruchida,项目名称:X2Engine,代码行数:30,代码来源:_view.php

示例3: array

?>
<div class="view">
	<div class="deleteButton">
		<?php 
$parent = Social::model()->findByPk($data->associationId);
if ($data->user == Yii::app()->user->getName() || $parent->associationId == Yii::app()->user->getId()) {
    echo CHtml::link('[x]', array('deletePost', 'id' => $data->id, 'redirect' => Yii::app()->controller->action->id));
}
//,array('class'=>'x2-button')
?>
	</div>
	<?php 
echo CHtml::link($author, array('profile/view', 'id' => $authorRecord->id));
?>
 <span class="comment-age"><?php 
echo x2base::timestampAge(date("Y-m-d H:i:s", $data->timestamp));
?>
</span><br />
	<?php 
echo $this->convertUrls(CHtml::encode($data->data));
?>
</div>


<?php 
/*
<div class="view">
	<div class="deleteButton">
		<?php echo CHtml::link('[x]',array('deleteNote','id'=>$data->id)); //,array('class'=>'x2-button') ?>
		<?php //echo CHtml::link("<img src='".Yii::app()->request->baseUrl."/images/deleteButton.png' />",array("deleteNote","id"=>$data->id)); ?>
	</div>
开发者ID:netconstructor,项目名称:X2Engine,代码行数:31,代码来源:_view.php


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