當前位置: 首頁>>代碼示例>>PHP>>正文


PHP zmf::avatar方法代碼示例

本文整理匯總了PHP中zmf::avatar方法的典型用法代碼示例。如果您正苦於以下問題:PHP zmf::avatar方法的具體用法?PHP zmf::avatar怎麽用?PHP zmf::avatar使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在zmf的用法示例。


在下文中一共展示了zmf::avatar方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: foreach

<div class="aside-page">
    <?php 
if (!empty($users)) {
    ?>
    <div class="aside-mod">
        <?php 
    foreach ($users as $user) {
        ?>
        <div class="media">
            <div class="media-left">
                <a href="<?php 
        echo Yii::app()->createUrl('index/media', array('id' => $user['id']));
        ?>
">
                  <img class="media-object img-circle" width="50px" height="50px" src="<?php 
        echo zmf::avatar($user, 170, true);
        ?>
" alt="<?php 
        echo $user['truename'];
        ?>
">
                </a>
            </div>
            <div class="media-body">
              <h5 class="media-heading">
                  <?php 
        echo CHtml::link($user['truename'], array('index/media', 'id' => $user['id']));
        ?>
        
              </h5>
              <p>
開發者ID:ph7pal,項目名稱:naodong,代碼行數:31,代碼來源:index.php

示例2: array

 * @filename _media.php 
 * @Description 媒體循環列表模板
 * @author 阿年飛少 <ph7pal@qq.com> 
 * @link http://www.newsoul.cn 
 * @copyright Copyright©2015 阿年飛少 
 * @datetime 2015-7-6  15:25:37 
 */
?>
<div class="media post-item">
  <div class="media-left">
      <a href="<?php 
echo Yii::app()->createUrl('index/media', array('id' => $data['id']));
?>
">
        <img class="media-object img-circle" width="80px" height="80px" src="<?php 
echo zmf::avatar($data, 170, true);
?>
" alt="<?php 
echo $data['truename'];
?>
">
      </a>
  </div>
  <div class="media-body">
    <h4 class="media-heading">
        <?php 
echo CHtml::link($data['truename'], array('index/media', 'id' => $data['id']));
?>
        
    </h4>
    <p class="color-grey"><?php 
開發者ID:ph7pal,項目名稱:naodong,代碼行數:31,代碼來源:_media.php

示例3: array

<?php

/**
 * @filename _author.php 
 * @Description
 * @author 阿年飛少 <ph7pal@qq.com> 
 * @link http://www.newsoul.cn 
 * @copyright Copyright©2015 阿年飛少 
 * @datetime 2015-7-6  17:32:39 
 */
if (!empty($userInfo)) {
    ?>
<div class="aside-mod">
    <p><?php 
    echo CHtml::link(zmf::avatar($userInfo), array('index/media', 'id' => $userInfo['id']));
    ?>
</p>
    <p><?php 
    echo CHtml::link($userInfo['truename'], array('index/media', 'id' => $userInfo['id']));
    ?>
</p>
    <?php 
    if ($userInfo['desc'] != '') {
        ?>
<p class="help-block"><i class="icon-info-sign"></i> <?php 
        echo $userInfo['desc'];
        ?>
</p><?php 
    }
    ?>
    <?php 
開發者ID:ph7pal,項目名稱:naodong,代碼行數:31,代碼來源:_author.php

示例4: foreach

    if (!empty($this->newMembers)) {
        ?>
    <div class="mod" id="new_members">
        <div class="hd">
            <h2><?php 
        echo zmf::t('newUsers');
        ?>
</h2>
        </div>
        <div class="bd">
            <ul class="lists">
            	<?php 
        foreach ($this->newMembers as $new) {
            ?>
                <li><?php 
            echo zmf::avatar($new['id']);
            ?>
</li>                
              <?php 
        }
        ?>
            </ul>
        </div>
    </div>
  <?php 
    }
    ?>
    <?php 
} else {
    if (!empty($nearby)) {
        ?>
開發者ID:ph7pal,項目名稱:wedding,代碼行數:31,代碼來源:aside.php

示例5: array

 * @Description
 * @author 阿年飛少 <ph7pal@qq.com> 
 * @link http://www.newsoul.cn 
 * @copyright Copyright©2015 阿年飛少 
 * @datetime 2015-7-6  17:32:39 
 */
if (!empty($userInfo)) {
    ?>
<ul class="ui-list ui-list-link">
    <li class="ui-border-t" data-href="<?php 
    echo Yii::app()->createUrl('index/media', array('id' => $userInfo['id']));
    ?>
">
        <div class="ui-list-img">
            <span style="background-image:url(<?php 
    echo zmf::avatar($userInfo, 170, true);
    ?>
)"></span>
        </div>
        <div class="ui-list-info">
            <h4 class="ui-nowrap"><?php 
    echo $userInfo['truename'];
    ?>
</h4>
            <p class="color-grey ui-nowrap"><?php 
    echo $userInfo['desc'];
    ?>
</p>
            <p><?php 
    echo $userInfo['posts'] . '作品' . '&nbsp;&nbsp;' . $userInfo['hits'] . '熱度';
    ?>
開發者ID:ph7pal,項目名稱:naodong,代碼行數:31,代碼來源:_author.php

示例6: array

<h3 class="item-title">上傳頭像</h3>
<?php 
$imgurl = zmf::avatar($this->userInfo, 170, true);
$this->renderPartial('/common/_noModelUpload', array('uploadurl' => Yii::app()->createUrl('attachments/simpleUpload', array('type' => 'avatar', 'fileholder' => 'noModelUpload_holder')), 'imgurl' => $imgurl));
?>
<p class="help-block">建議上傳高寬大於200px的圖片;圖片上傳後會被裁剪為正方形</p>
開發者ID:ph7pal,項目名稱:naodong,代碼行數:6,代碼來源:avatar.php

示例7: array

<div class="aside-page">
    <div class="aside-mod">
        <p><?php 
echo CHtml::link(zmf::avatar($this->userInfo), array('users/index'));
?>
</p>
        <p><?php 
echo CHtml::link($this->userInfo['truename'], array('users/index'));
?>
</p>
        <p class="help-block"><?php 
echo zmf::subStr($this->userInfo['desc'], 140);
?>
</p>
    </div>
    <div class="list-group">
        <?php 
echo CHtml::link('<i class="icon-bell-alt"></i> 提醒', array('users/notice'), array('class' => 'list-group-item'));
?>
        <?php 
echo CHtml::link('<i class="icon-cog"></i> 基本設置', array('users/config'), array('class' => 'list-group-item'));
?>
        <?php 
echo CHtml::link('<i class="icon-info-sign"></i> 更新資料', array('users/update', 'type' => 'info'), array('class' => 'list-group-item'));
?>
        <?php 
echo CHtml::link('<i class="icon-key"></i> 修改密碼', array('users/update', 'type' => 'passwd'), array('class' => 'list-group-item'));
?>
        <?php 
echo CHtml::link('<i class="icon-user"></i> 上傳頭像', array('users/avatar'), array('class' => 'list-group-item'));
?>
開發者ID:ph7pal,項目名稱:naodong,代碼行數:31,代碼來源:aside.php

示例8: actionCard

 /**
  * 卡片,包括用戶及提到的坐標
  */
 public function actionCard()
 {
     $type = zmf::filterInput($_GET['type'], 't', 1);
     $id = zmf::filterInput($_POST['id']);
     if (!$type || !$id) {
         $this->jsonOutPut(0, '缺少參數');
     }
     if ($type == 'user') {
         $info = Users::getUserInfo($id);
         if (!$info) {
             $this->jsonOutPut(0, '用戶不存在');
         }
         if ($id == zmf::uid()) {
             $itself = 1;
         } else {
             $itself = 0;
         }
         $favored = 0;
         if (zmf::uid() && $id != zmf::uid()) {
             $_info = Favorites::checkFavored($id, 'user');
             if ($_info) {
                 $favored = 1;
             }
         }
         $count = Users::getCounts($id, $info);
         $data = array('avatar' => zmf::avatar($id, 'small', true), 'userurl' => Yii::app()->createUrl('users/index', array('id' => $id)), 'username' => $info['truename'], 'posts' => $count['posts'], 'answers' => $count['answers'], 'tips' => $count['tips'], 'reputation' => $info['reputation'], 'badge' => $info['badge'], 'itself' => $itself, 'favored' => $favored, 'uid' => $id, 'desc' => $info['desc'], 'p_url' => Yii::app()->createUrl('users/index', array('id' => $id, 'type' => 'posts')), 'a_url' => Yii::app()->createUrl('users/index', array('id' => $id, 'type' => 'answer')), 't_url' => Yii::app()->createUrl('users/index', array('id' => $id, 'type' => 'tips')));
     }
     $this->jsonOutPut(1, $data);
 }
開發者ID:ph7pal,項目名稱:wedding,代碼行數:32,代碼來源:AjaxController.php


注:本文中的zmf::avatar方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。