PageRenderTime 49ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/profile/components/views/profile_comments.php

https://github.com/yii-simon/yii-user-management
PHP | 19 lines | 17 code | 2 blank | 0 comment | 1 complexity | 6718fdd7edf934427682e1f18ec215c2 MD5 | raw file
  1. <?
  2. if($comments) {
  3. echo '<p>'.Yum::t('These users have commented your profile recently') . ': </p>';
  4. foreach($comments as $comment) {
  5. printf('<div style="text-align:center;width: 50px;float:left;margin: 0px 10px 10px 0;">%s %s</div>',
  6. CHtml::link($comment->user->getAvatar(true), array(
  7. '//profile/profile/view', 'id' => $comment->user_id)),
  8. CHtml::link($comment->user->username, array(
  9. '//profile/profile/view', 'id' => $comment->user_id)));
  10. printf('<div style="float:left;width:250px; margin-bottom:10px;">%s </div>',
  11. substr($comment->comment, 0, 100));
  12. echo '<div style="clear: both;"></div>';
  13. }
  14. } else
  15. echo Yum::t('Nobody has commented your profile yet');
  16. ?>
  17. <div style="clear: both;"> </div>