返回列表 发帖
查看: 645|回复: 8

通用云存储使用教程

3

主题

26

回帖

37

积分

应用开发者

贡献
0 点
金币
7 个
QQ
发表于 2024-1-12 00:53:59 | 显示全部楼层 |阅读模式


插件的参数,重点是region的配置。
七牛云无需region
腾讯云和阿里云需要。

腾讯云参数: 微信截图_20240228224543.png
接定制开发,uniapp,原生小程序
回复

使用道具 举报

31

主题

66

回帖

137

积分

渐入佳境

贡献
0 点
金币
32 个
QQ
发表于 2024-1-12 09:43:11 | 显示全部楼层
先留个脚印
回复 支持 反对

使用道具 举报

96

主题

649

回帖

881

积分

自成一派

贡献
13 点
金币
12 个
QQ
发表于 2024-1-12 11:48:24 | 显示全部楼层
插件发布了,还不来写教程
回复 支持 反对

使用道具 举报

1

主题

297

回帖

343

积分

炉火纯青

贡献
1 点
金币
33 个
QQ
发表于 2024-1-12 17:36:34 | 显示全部楼层
666可以的  
回复 支持 反对

使用道具 举报

3

主题

26

回帖

37

积分

应用开发者

贡献
0 点
金币
7 个
QQ
 楼主| 发表于 2024-1-13 01:02:12 | 显示全部楼层
一定 发表于 2024-1-12 11:48
插件发布了,还不来写教程

同学乔迁新居,去捧场了。
周日还有一场...

估计周一周二优化一下插件,再写教程吧
接定制开发,uniapp,原生小程序
回复 支持 反对

使用道具 举报

10

主题

20

回帖

39

积分

初学乍练

贡献
0 点
金币
6 个
发表于 2024-1-13 11:14:18 | 显示全部楼层
本帖最后由 com叔叔 于 2024-1-13 11:16 编辑

帮你测试了一下,按装后在未做任何设置的情况下点击附件列表出现这种情况,不知是否正常?

微信截图_20240113111246.png
回复 支持 反对

使用道具 举报

3

主题

26

回帖

37

积分

应用开发者

贡献
0 点
金币
7 个
QQ
 楼主| 发表于 2024-1-13 12:19:32 | 显示全部楼层
本帖最后由 842939018 于 2024-1-13 12:26 编辑
com叔叔 发表于 2024-1-13 11:14
帮你测试了一下,按装后在未做任何设置的情况下点击附件列表出现这种情况,不知是否正常?

谢谢测试!
不正常,错误信息表示多了个')'字符

很奇怪,如果有这个错误的话,应该是所有人都有这个错误才对。

我再看看,谢谢!
————————————分割线————————————
安装时,代码不完整。
我把报错的整个文件贴上来
  1. 文件地址:souce/plugin/common_cloud_storage/include/list.php
复制代码
  1. <?php
  2. if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {
  3.     exit('Access Denied');
  4. }

  5. $pluginlang = lang('plugin/common_cloud_storage');
  6. showtablerow('', array('class="xiongzhu3"', 'class="xiongzhu4"'),
  7.     array('<button  class="submit btn" style="border-radius: 3px"><a style="color: white" href="'.ADMINSCRIPT.'?'
  8.         . \common_cloud_storage\get_url() . '&attr_type=forum&tmod=list' . '">'. $pluginlang['forum'] . '</a></button>',
  9.         '<button  class="submit btn" style="border-radius: 3px"><a style="color: white" href="'.ADMINSCRIPT.'?'
  10.         . \common_cloud_storage\get_url() . '&attr_type=home_pic&tmod=list' . '">'. $pluginlang['home_pic'] . '</a></button>',
  11.         '<button  class="submit btn" style="border-radius: 3px"><a style="color: white" href="'.ADMINSCRIPT.'?'
  12.         . \common_cloud_storage\get_url() . '&attr_type=portal&tmod=list' . '">'. $pluginlang['portal'] . '</a></button>',
  13.     ),
  14. );
  15. $count=0;
  16. $limit = 10;//单页数量
  17. $currenPage = $_GET['page']?$_GET['page']:1;//当前页面
  18. $extra='$extra';
  19. $mpurl = ADMINSCRIPT."?action=plugins&operation=config&identifier=common_cloud_storage&pmod=common_cloud_storage_list&attr_type={$_GET['attr_type']}";

  20. //没有选择类型时
  21. if(!$_GET['attr_type']){
  22.     exit;
  23. }

  24. //展示论坛附件
  25. if($_GET['attr_type']=='forum'){
  26.     $count =  DB::result_first("SELECT COUNT(*) FROM " . DB::table("forum_attachment"));//总数
  27.     $dataList = array();
  28.     if($count){
  29.         $dataList = Db::fetch_all('select * from %t limit %d,%d' , array('forum_attachment',($currenPage-1)*$limit,$limit));
  30.         foreach ($dataList as $k=>$v){
  31.             $dataList[$k]['info'] =  Db::fetch_first('select * from %t where aid = %i' , array('forum_attachment_'.$v['tableid'],$v['aid']));
  32.             $dataList[$k]['info']['datetime'] = date('y-m-d H:i:s',$dataList[$k]['info']['dateline']);
  33.         }
  34.         unset($k,$v);
  35.     }
  36.     include template('common_cloud_storage:forum_attachment_list');
  37. }

  38. //相册附件
  39. if($_GET['attr_type']=='home_pic'){
  40.     $count =  DB::result_first("SELECT COUNT(*) FROM " . DB::table("home_pic"));//总数
  41.     $dataList = array();
  42.     if($count){
  43.         $dataList = Db::fetch_all('select * from %t limit %d,%d' , array('home_pic',($currenPage-1)*$limit,$limit));
  44.     }
  45.     include template('common_cloud_storage:home_pic_list');
  46. }

  47. //论坛封面附件
  48. if($_GET['attr_type']=='portal') {
  49.     $count =  DB::result_first("SELECT COUNT(*) FROM " . DB::table("portal_attachment"));//总数
  50.     $dataList = array();
  51.     if($count){
  52.         $dataList = Db::fetch_all('select * from %t limit %d,%d' , array('portal_attachment',($currenPage-1)*$limit,$limit));
  53.     }
  54.     include template('common_cloud_storage:portal_attachment_list');
  55. }
  56. //论坛封面附件
  57. if($_GET['attr_type']=='forum_thread') {
  58.     echo '主题封面';
  59. }

  60. /*分页*/
  61. if($count){
  62.     echo multi($count, $limit, $currenPage, $mpurl);
  63. }
复制代码


接定制开发,uniapp,原生小程序
回复 支持 反对

使用道具 举报

10

主题

20

回帖

39

积分

初学乍练

贡献
0 点
金币
6 个
发表于 2024-1-13 15:26:33 | 显示全部楼层
842939018 发表于 2024-1-13 12:19
谢谢测试!
不正常,错误信息表示多了个')'字符


替换为你给的代码错误如下
微信截图_20240113152501.png
回复 支持 反对

使用道具 举报

3

主题

26

回帖

37

积分

应用开发者

贡献
0 点
金币
7 个
QQ
 楼主| 发表于 2024-1-15 00:09:58 | 显示全部楼层
com叔叔 发表于 2024-1-13 15:26
替换为你给的代码错误如下

麻烦加我Q或微信,约个时间远程。请提前安装向日葵远程协助软件。

报错信息是:‘语法错误,多了一个)’符号,不可能,绝对不可能。
Q:842939018
微:liuxiongzhu
接定制开发,uniapp,原生小程序
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 关注公众号
  • 有偿服务微信
  • 有偿服务QQ

手机版|小黑屋|Discuz! 官方交流社区 ( 皖ICP备16010102号 |皖公网安备34010302002376号 )|网站地图|star

GMT+8, 2024-5-3 05:39 , Processed in 0.531352 second(s), 9 queries , Redis On.

Powered by Discuz! W1.0 Licensed

Cpoyright © 2001-2024 Discuz! Team.

关灯 在本版发帖
有偿服务QQ
有偿服务微信
返回顶部
快速回复 返回顶部 返回列表