当前位置: 首页>>代码示例>>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;未经允许,请勿转载。