當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。