本文整理汇总了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>
示例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
示例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
示例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)) {
?>
示例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'] . '作品' . ' ' . $userInfo['hits'] . '热度';
?>
示例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>
示例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'));
?>
示例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);
}