• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getThumbImageById函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getThumbImageById函数的典型用法代码示例。如果您正苦于以下问题:PHP getThumbImageById函数的具体用法?PHP getThumbImageById怎么用?PHP getThumbImageById使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getThumbImageById函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: index

 public function index()
 {
     $map = $this->setMap();
     $map['status'] = 1;
     $map['last_login_time'] = array('neq', 0);
     $peoples = S('People_peoples_' . I('page', 0, 'intval') . '_' . serialize($map));
     if (empty($peoples)) {
         $peoples = M('Member')->where($map)->field('uid', 'reg_time', 'last_login_time')->order('last_login_time desc')->findPage(20);
         $userConfigModel = M('Ucenter/UserConfig');
         $titleModel = M('Ucenter/Title');
         foreach ($peoples['data'] as &$v) {
             $v = query_user(array('title', 'avatar128', 'nickname', 'uid', 'space_url', 'score', 'title', 'fans', 'following', 'rank_link'), $v['uid']);
             $v['level'] = $titleModel->getCurrentTitleInfo($v['uid']);
             //获取用户封面id
             $where = getUserConfigMap('user_cover', '', $v['uid']);
             $where['role_id'] = 0;
             $model = $userConfigModel;
             $cover = $model->findData($where);
             $v['cover_id'] = $cover['value'];
             $v['cover_path'] = getThumbImageById($cover['value'], 273, 80);
         }
         unset($v);
         S('People_peoples_' . serialize($map), $peoples, 300);
     }
     $this->assign('tab', 'index');
     $this->assign('lists', $peoples);
     $this->display();
 }
开发者ID:terrydeng,项目名称:beimeibang1205,代码行数:28,代码来源:IndexController.class.php


示例2: getImageUrlByRoleId

 /**
  * 根据角色获取默认头像
  * @param $role_id
  * @param $size
  * @return mixed|string
  * @author 郑钟良<[email protected]>
  */
 private function getImageUrlByRoleId($role_id, $size)
 {
     $avatar_id = S('Role_Avatar_Id_' . $role_id);
     if (!$avatar_id) {
         $map = getRoleConfigMap('avatar', $role_id);
         $avatar_id = M('RoleConfig')->where($map)->field('value')->find();
         S('Role_Avatar_Id_' . $role_id, $avatar_id, 600);
     }
     if ($avatar_id) {
         if ($size != 0) {
             $path = getThumbImageById($avatar_id['value'], $size, $size);
         } else {
             $path = getThumbImageById($avatar_id['value']);
         }
     } else {
         //角色没有默认
         if ($size != 0) {
             $default_avatar = "Public/images/default_avatar.jpg";
             $path = $this->getImageUrlByPath($default_avatar, $size, false);
         } else {
             $path = get_pic_src("Public/images/default_avatar.jpg");
         }
     }
     return $path;
 }
开发者ID:terrydeng,项目名称:beimeibang1205,代码行数:32,代码来源:UploadAvatarWidget.class.php


示例3: render

 public function render($attributes = array())
 {
     $attributes_id = $attributes['id'];
     $config = $attributes['config'];
     $class = $attributes['class'];
     $value = $attributes['value'];
     $images = explode(',', $value);
     $name = $attributes['name'];
     $attributes['width'] = $width = $attributes['width'] ? $attributes['width'] : 100;
     $attributes['height'] = $height = $attributes['height'] ? $attributes['height'] : 100;
     $isLoadScript = $attributes['isLoadScript'] ? 1 : 0;
     //$filetype = $this->rules['filetype'];
     $config = $config['config'];
     $id = $attributes_id;
     if (empty($attributes['config']['text'])) {
         $attributes['config'] = array('text' => L('_FILE_SELECT_'));
     }
     if (intval($value) != 0) {
         $url = getThumbImageById($value, $width, $height);
         $img = '<img src="' . $url . '"/>';
     } else {
         $img = '';
     }
     $this->assign('isLoadScript', $isLoadScript);
     $this->assign('img', $img);
     $this->assign('images', $images);
     $this->assign($attributes);
     $this->display(T('Application://Common@Widget/uploadmultiimage'));
 }
开发者ID:nanhuacrab,项目名称:jhysns,代码行数:29,代码来源:UploadMultiImageWidget.class.php


示例4: index

 public function index($page = 1, $keywords = '')
 {
     $map = $this->setMap();
     $map['status'] = 1;
     $map['last_login_time'] = array('neq', 0);
     $page = I('page', 1, 'intval');
     $page < 1 && ($page = 1);
     $cachedPage = 10;
     $cachedId = 'People_peoples_' . $page . '_' . serialize($map);
     $peoples = $page > $cachedPage || !empty($_REQUEST['keywords']) || !empty($_REQUEST['tag']) ? null : S($cachedId);
     #$peoples = null;
     if (empty($peoples)) {
         $peoples = D('Member')->where($map)->field('uid,reg_time,last_login_time')->order('last_login_time desc')->findPage(20);
         $userConfigModel = D('Ucenter/UserConfig');
         $titleModel = D('Ucenter/Title');
         foreach ($peoples['data'] as &$v) {
             $v['user'] = query_user(array('title', 'avatar128', 'nickname', 'uid', 'space_url', 'icons_html', 'score', 'title', 'fans', 'following', 'rank_link', 'is_following'), $v['uid']);
             $v['level'] = $titleModel->getCurrentTitleInfo($v['uid']);
             //获取用户封面id
             $where = getUserConfigMap('user_cover', '', $v['uid']);
             $where['role_id'] = 0;
             $model = $userConfigModel;
             $cover = $model->where($where)->find();
             $v['cover_id'] = $cover['value'];
             $v['cover_path'] = getThumbImageById($cover['value'], 273, 80);
         }
         $page <= $cachedPage && S($cachedId, $peoples, 300);
     }
     #dump($peoples);exit;
     $this->assign('tab', 'index');
     $this->assign('lists', $peoples);
     $this->display();
 }
开发者ID:admpub,项目名称:OpenCenter,代码行数:33,代码来源:IndexController.class.php


示例5: getForumList

 public function getForumList($map_type = array('status' => 1))
 {
     $tag = 'forum_list_' . serialize($map_type);
     $forum_list = S($tag);
     $cache_time = modC('CACHE_TIME', 300, 'Forum');
     if (empty($forum_list)) {
         //读取板块列表
         $forum_list = D('Forum/Forum')->where($map_type)->order('sort asc')->select();
         $forumPostModel = D('ForumPost');
         $forumPostReplyModel = D('ForumPostReply');
         $forumLzlReplyModel = D('ForumLzlReply');
         foreach ($forum_list as &$f) {
             $map['status'] = 1;
             $map['forum_id'] = $f['id'];
             $f['background'] = $f['background'] ? getThumbImageById($f['background'], 800, 'auto') : C('TMPL_PARSE_STRING.__IMG__') . '/default_bg.jpg';
             $f['logo'] = $f['logo'] ? getThumbImageById($f['logo'], 128, 128) : C('TMPL_PARSE_STRING.__IMG__') . '/default_logo.png';
             $f['topic_count'] = $forumPostModel->where($map)->count();
             $post_id = $forumPostModel->where(array('forum_id' => $f['id']))->field('id')->select();
             $p_id = getSubByKey($post_id, 'id');
             $map['post_id'] = array('in', implode(',', $p_id));
             $f['total_count'] = $f['topic_count'] + $forumPostReplyModel->where($map)->count();
             // + $forumLzlReplyModel->where($map)->count();
         }
         unset($f);
         S($tag, $forum_list, $cache_time);
     }
     return $forum_list;
 }
开发者ID:happyxiaod,项目名称:luobojianzhi,代码行数:28,代码来源:ForumModel.class.php


示例6: _initSelect

 /**
  * 初始化查询数据
  * @param $list
  * @return mixed
  * @author 郑钟良<[email protected]>
  */
 private function _initSelect($list)
 {
     foreach ($list as &$val) {
         $val['path'] = getThumbImageById($val['image'], 745, 280);
     }
     unset($val);
     return $list;
 }
开发者ID:terrydeng,项目名称:beimeibang1205,代码行数:14,代码来源:AdvModel.class.php


示例7: decodeGallary

 function decodeGallary($gallary)
 {
     $gallary = json_decode($gallary, true);
     foreach ($gallary as $g) {
         $gallary_array[] = array('id' => $g['id'], 'img' => getThumbImageById($g['id'], 80, 80));
     }
     return $gallary_array;
 }
开发者ID:terrydeng,项目名称:beimeibang1205,代码行数:8,代码来源:GoodsModel.class.php


示例8: fetchImage

 /**
  * fetchImage  渲染图片轻博客
  * @param $weibo
  * @return string
  * @author:xjw129xjt(肖骏涛) [email protected]
  */
 public function fetchImage($weibo)
 {
     $weibo_data = unserialize($weibo['data']);
     $weibo_data['attach_ids'] = explode(',', $weibo_data['attach_ids']);
     foreach ($weibo_data['attach_ids'] as $k_i => $v_i) {
         $weibo_data['image'][$k_i]['small'] = getThumbImageById($v_i, 100, 100);
         $bi = D('Picture')->where(array('status' => 1))->getById($v_i);
         $weibo_data['image'][$k_i]['big'] = get_pic_src($bi['path']);
         $param['weibo'] = $weibo;
         $param['weibo']['weibo_data'] = $weibo_data;
     }
     $this->assign($param);
     return $this->fetch(T('Application://Mob@Type/fetchimage'));
 }
开发者ID:terrydeng,项目名称:beimeibang1205,代码行数:20,代码来源:WeiboTypeController.class.php


示例9: userInfo

 private function userInfo($uid = null)
 {
     $user_info = query_user(array('avatar128', 'nickname', 'uid', 'space_url', 'score', 'title', 'fans', 'following', 'weibocount', 'rank_link', 'signature'), $uid);
     //获取用户封面id
     $map = getUserConfigMap('user_cover', '', $uid);
     $map['role_id'] = 0;
     $model = D('Ucenter/UserConfig');
     $cover = $model->findData($map);
     $user_info['cover_id'] = $cover['value'];
     $user_info['cover_path'] = getThumbImageById($cover['value'], 1140, 230);
     $user_info['tags'] = D('Ucenter/UserTagLink')->getUserTag($uid);
     $this->assign('user_info', $user_info);
     return $user_info;
 }
开发者ID:naliduo,项目名称:Lightweight-social-platform,代码行数:14,代码来源:IndexController.class.php


示例10: display_cover

function display_cover($cover, $width = 90, $height = 90, $class = '')
{
    if (intval($cover) == 0) {
        $img = C('TMPL_PARSE_STRING.__IMG__');
        echo <<<Eof
 <img class="appstore_cover{$class}" src="{$img}/no_icon.png"/>
Eof;
    } else {
        $cover = getThumbImageById($cover, $width, $height);
        echo <<<Eof
<img class="appstore_cover{$class}" src = "{$cover}"/>
Eof;
    }
}
开发者ID:chenyongze,项目名称:bighaha,代码行数:14,代码来源:function.php


示例11: render

 public function render($data)
 {
     $content = '<span class="bld">' . $data['field']['alias'] . '</span>:';
     //检测是否过期隐藏
     if ($data['overed'] && $data['field']['over_hidden']) {
         $content .= '<span class="cred" id="' . $data['data']['field']['name'] . '">过期隐藏</span>';
         return $content;
     }
     $content .= '<span  id="' . $data['data']['field']['name'] . '">';
     switch ($data['field']['input_type']) {
         case IT_SINGLE_TEXT:
             //单行文本
         //单行文本
         case IT_MULTI_TEXT:
             //多行文本
             $content .= op_h($data['data']['data'][0]);
             break;
         case IT_EDITOR:
             //编辑器
             $content .= "<br/>" . op_h($data['data']['data'][0]);
             break;
         case IT_DATE:
             //日期
             $content .= date('Y-m-d', $data['data']['data'][0]);
             //dump($data['data']['data'][0]);exit;
             break;
             //选择框
         //选择框
         case IT_SELECT:
             //下拉框
             $content .= op_t($data['data']['data'][0]);
             break;
         case IT_RADIO:
             //单选框
             $content .= op_t($data['data']['data'][0]);
             break;
         case IT_PIC:
             //单图片
             if (intval($data['data']['data'][0]) == 0) {
                 return '';
             }
             $content .= '<a class="pic_field" target="_blank" href="' . get_cover($data['data']['data'][0], 'path') . '"><img title="点击查看大图"  class="pic_size" src="' . getThumbImageById($data['data']['data'][0], 100, 100) . '"></a>';
             break;
         case IT_CHECKBOX:
             $content .= $data['data']['data'][0] . '&nbsp;&nbsp;';
             break;
     }
     $content .= '</span>';
     echo $content;
 }
开发者ID:terrydeng,项目名称:beimeibang1205,代码行数:50,代码来源:DisplayRenderWidget.class.php


示例12: fetchImage

 /**
  * fetchImage  渲染图片微博
  * @param $weibo
  * @return string
  * @author:xjw129xjt(肖骏涛) [email protected]
  */
 public function fetchImage($weibo)
 {
     $weibo_data = unserialize($weibo['data']);
     $weibo_data['attach_ids'] = explode(',', $weibo_data['attach_ids']);
     foreach ($weibo_data['attach_ids'] as $k_i => $v_i) {
         $weibo_data['image'][$k_i]['small'] = getThumbImageById($v_i, 100, 100);
         $bi = M('Picture')->where(array('status' => 1))->getById($v_i);
         if (!is_bool(strpos($bi['path'], 'http://'))) {
             $weibo_data['image'][$k_i]['big'] = $bi['path'];
         } else {
             $weibo_data['image'][$k_i]['big'] = getRootUrl() . substr($bi['path'], 1);
         }
         $param['weibo'] = $weibo;
         $param['weibo']['weibo_data'] = $weibo_data;
     }
     $this->assign($param);
     return $this->fetch(T('Application://Weibo@Type/fetchimage'));
 }
开发者ID:chenyongze,项目名称:bighaha,代码行数:24,代码来源:TypeController.class.php


示例13: getInfo

 public function getInfo($id)
 {
     $info = $this->find($id);
     $field_list = D('CatField')->where(array('entity_id' => $info['entity_id']))->select();
     $field_list_l = array_column($field_list, 'name');
     $field_list = array_combine($field_list_l, $field_list);
     foreach ($field_list as &$v) {
         $v['data'] = D('CatData')->where(array('field_id' => $v['id'], 'info_id' => $info['id']))->find();
         $v['data'] = $v['data']['value'];
         if (strpos($v['name'], 'zhaopian') === 0) {
             if (empty($v['data'])) {
                 $v['data'] = NUll;
             } else {
                 $v['data'] = getThumbImageById($v['data']);
             }
         }
     }
     return $field_list;
 }
开发者ID:ccccy,项目名称:wuanlife,代码行数:19,代码来源:CatModel.class.php


示例14: getTags

 public function getTags($order, $field, $row, $limit, $type)
 {
     $map['type'] = array('in', $type);
     $p = I(C('VAR_PAGE'));
     if ($limit) {
         $data = $this->model->where($map)->order($order)->limit($row)->select();
     } else {
         $data = $this->model->where($map)->order($order)->page(!empty($p) ? $p : 1, $row)->select();
     }
     foreach ($data as $key => $vo) {
         $data[$key]['path'] = getThumbImageById($vo['img']);
         $data[$key]['tagcolor'] = colorCallback();
         $data[$key]['tagback'] = colorbackCallback();
     }
     if ($data == null) {
         $this->apiError("获取标签列表失败", null);
     } else {
         $this->apiSuccess("获取标签列表成功", null, array('data' => $data));
     }
 }
开发者ID:Willshon,项目名称:OLCS,代码行数:20,代码来源:TagController.class.php


示例15: fetchImage

 public function fetchImage($weibo)
 {
     $weibo_data = unserialize($weibo['data']);
     $weibo_data['attach_ids'] = explode(',', $weibo_data['attach_ids']);
     foreach ($weibo_data['attach_ids'] as $k_i => $v_i) {
         if (strtolower(C('PICTURE_UPLOAD_DRIVER')) == 'sae') {
             $weibo_data['image'][$k_i]['small'] = getThumbImageById($v_i, 100, 100);
             // dump( $weibo_data['image'][$k_i]['small']);exit;
             $bi = M('Picture')->where(array('status' => 1))->getById($v_i);
             $weibo_data['image'][$k_i]['big'] = $bi['path'];
         } else {
             $weibo_data['image'][$k_i]['small'] = getThumbImageById($v_i, 100, 100);
             $bi = M('Picture')->where(array('status' => 1))->getById($v_i);
             $weibo_data['image'][$k_i]['big'] = getRootUrl() . substr($bi['path'], 1);
         }
         $param['weibo'] = $weibo;
         $param['weibo']['weibo_data'] = $weibo_data;
     }
     $this->assign($param);
     return $this->fetch('display');
 }
开发者ID:yaomoo,项目名称:bbs,代码行数:21,代码来源:InsertImageAddon.class.php


示例16: getForumList

 public function getForumList($map_type = array('status' => 1))
 {
     $tag = 'forum_list_' . serialize($map_type);
     $forum_list = S($tag);
     $cache_time = modC('CACHE_TIME', 300, 'Forum');
     if (empty($forum_list)) {
         //读取板块列表
         $forum_list = D('Forum/Forum')->where($map_type)->order('sort asc')->select();
         $forumPostModel = D('ForumPost');
         $forumPostReplyModel = D('ForumPostReply');
         $forumLzlReplyModel = D('ForumLzlReply');
         foreach ($forum_list as &$f) {
             $map['status'] = 1;
             $map['forum_id'] = $f['id'];
             $f['background'] = intval($f['background']) != 0 ? getThumbImageById($f['background'], 1160, 180) : C('TMPL_PARSE_STRING.__IMG__') . '/default_head.jpg';
             $f['logo'] = intval($f['logo']) != 0 ? getThumbImageById($f['logo'], 128, 128) : C('TMPL_PARSE_STRING.__IMG__') . '/default_logo.jpg';
             $f['topic_count'] = $forumPostModel->where($map)->count();
             $f['admin'] = explode(',', str_replace('[', '', str_replace(']', '', $f['admin'])));
             $post_id = $forumPostModel->where(array('forum_id' => $f['id']))->field('id')->select();
             $p_id = getSubByKey($post_id, 'id');
             $map['post_id'] = array('in', implode(',', $p_id));
             $f['total_count'] = $f['topic_count'] + $forumPostReplyModel->where($map)->count();
         }
         unset($f);
         S($tag, $forum_list, $cache_time);
     }
     foreach ($forum_list as &$f) {
         if (count($f['admin']) > 0) {
             foreach ($f['admin'] as $a) {
                 if ($a != '') {
                     $f['admins'][] = query_user(array('nickname', 'space_link'), $a);
                 }
             }
         }
     }
     unset($f);
     return $forum_list;
 }
开发者ID:tmac1997,项目名称:DormitoryWebsite,代码行数:38,代码来源:ForumModel.class.php


示例17: render

 public function render($attributes = array())
 {
     $attributes_id = $attributes['id'];
     $config = $attributes['config'];
     $class = $attributes['class'];
     $value = $attributes['value'];
     $name = $attributes['name'];
     $width = $attributes['width'] ? $attributes['width'] : 100;
     $height = $attributes['height'] ? $attributes['height'] : 100;
     //$filetype = $this->rules['filetype'];
     $config = $config['config'];
     $id = $attributes_id;
     $attributes['config'] = array('text' => '选择文件');
     if (intval($value) != 0) {
         $url = getThumbImageById($value, $width, $height);
         $img = '<img src="' . $url . '"/>';
     } else {
         $img = '';
     }
     $this->assign('img', $img);
     $this->assign($attributes);
     $this->display(T('Application://Common@Widget/uploadimage'));
 }
开发者ID:xiaolw,项目名称:wacms,代码行数:23,代码来源:UploadImageWidget.class.php


示例18: render

 public function render($data)
 {
     $rs = $data['str'];
     $field = $data['field'];
     $value = '';
     switch ($field['field']['input_type']) {
         case IT_SINGLE_TEXT:
             //单行文本
         //单行文本
         case IT_MULTI_TEXT:
             $value = op_t($field['data'][0]);
             break;
         case IT_EDITOR:
             $value = op_h($field['data'][0]);
             break;
             //选择框
         //选择框
         case IT_SELECT:
             $value = op_t($field['data'][0]);
             break;
         case IT_PIC:
             $value = getThumbImageById($field['data'][0]);
             break;
         case IT_RADIO:
             $value = op_t($field['data'][0]);
             break;
         case IT_CHECKBOX:
             $value = $field['data'][0];
             //$value =  t($field['values']['data'][$field['data'][0]]);
             break;
     }
     if ($data['only_value']) {
         return $value;
     }
     $rs = str_replace('{$' . $field['field']['name'] . '}', $value, $rs);
     return $rs;
 }
开发者ID:terrydeng,项目名称:beimeibang1205,代码行数:37,代码来源:FieldRenderWidget.class.php


示例19: getTag

 public function getTag($uid, $row, $limit)
 {
     $mapfocus['id'] = $uid;
     $mapfocus['type'] = 2;
     $count = $this->model->where($mapfocus)->count();
     if ($count > 0) {
         $p = I(C('VAR_PAGE'));
         if ($limit) {
             $data = $this->model->where($mapfocus)->order('rowid desc')->limit($row)->select();
         } else {
             $data = $this->model->where($mapfocus)->order('rowid desc')->page(!empty($p) ? $p : 1, $row)->select();
         }
     }
     if ($data == null) {
         $this->apiError("获取标签关注列表失败", null);
     } else {
         foreach ($data as $key => $vo) {
             $data[$key]['tag'] = gettaginfo($vo['rowid']);
             $data[$key]['tag']['path'] = getThumbImageById($data[$key]['tag']['img']);
             $data[$key]['hasfocustag'] = hasguanzhu($vo['rowid'], $uid, 2);
         }
         $this->apiSuccess("获取标签关注列表成功", null, array('data' => $data));
     }
 }
开发者ID:Willshon,项目名称:OLCS,代码行数:24,代码来源:FocusController.class.php


示例20: thumb

function thumb($cover_id, $width = 100, $height = 'auto', $type = 0, $replace = false)
{
    return getThumbImageById($cover_id, $width, $height, $type, $replace);
}
开发者ID:ccccy,项目名称:wuanlife,代码行数:4,代码来源:thumb.php



注:本文中的getThumbImageById函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getTime函数代码示例发布时间:2022-05-15
下一篇:
PHP getThumbImage函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap