842939018 發表於 2024-1-12 00:53:59

通用云存储使用教程

<br /><br />插件的参数,重点是region的配置。<br />七牛云无需region<br />腾讯云和阿里云需要。<br /><br />腾讯云参数:<img title="微信截图_20240228224543.png" id="aimg_28413" aid="28413" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202402/28/224947vzn6to6ht22nb3to.png" src="https://www.dismall.com/data/attachment/forum/202402/28/224947vzn6to6ht22nb3to.png" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="600" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" />参数<em>, </em>region<em>, </em>腾讯<em>, </em>本帖<em>, </em>最后

hinoishi 發表於 2024-1-12 09:43:11

先留个脚印

一定 發表於 2024-1-12 11:48:24

插件发布了,还不来写教程

jane520 發表於 2024-1-12 17:36:34

666可以的&nbsp;&nbsp;

842939018 發表於 2024-1-13 01:02:12

<br />同学乔迁新居,去捧场了。<br />周日还有一场...<br /><br />估计周一周二优化一下插件,再写教程吧

com叔叔 發表於 2024-1-13 11:14:18

<br /><br />帮你测试了一下,按装后在未做任何设置的情况下点击附件列表出现这种情况,不知是否正常?<br /><br /><img title="微信截图_20240113111246.png" id="aimg_27511" aid="27511" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202401/13/111619ke9z2j9lxpllea2j.png" src="https://www.dismall.com/data/attachment/forum/202401/13/111619ke9z2j9lxpllea2j.png" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="600" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br />

842939018 發表於 2024-1-13 12:19:32

<br /><br />谢谢测试!<br />不正常,错误信息表示多了个')'字符<br /><br />很奇怪,如果有这个错误的话,应该是所有人都有这个错误才对。<br /><br />我再看看,谢谢!<br />————————————分割线————————————<br />安装时,代码不完整。<br />我把报错的整个文件贴上来 <ol><li>文件地址:souce/plugin/common_cloud_storage/include/list.php</ol><ol><li>&lt;?php<br /><li>if (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) {<br /><li>&nbsp; &nbsp; exit('Access Denied');<br /><li>}<br /><li><br /><li>$pluginlang = lang('plugin/common_cloud_storage');<br /><li>showtablerow('', array('class=&quot;xiongzhu3&quot;', 'class=&quot;xiongzhu4&quot;'),<br /><li>&nbsp; &nbsp; array('&lt;button&nbsp;&nbsp;class=&quot;submit btn&quot; style=&quot;border-radius: 3px&quot;&gt;&lt;a style=&quot;color: white&quot; href=&quot;'.ADMINSCRIPT.'?'<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;. \common_cloud_storage\get_url() . '&amp;attr_type=forum&amp;tmod=list' . '&quot;&gt;'. $pluginlang['forum'] . '&lt;/a&gt;&lt;/button&gt;',<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;'&lt;button&nbsp;&nbsp;class=&quot;submit btn&quot; style=&quot;border-radius: 3px&quot;&gt;&lt;a style=&quot;color: white&quot; href=&quot;'.ADMINSCRIPT.'?'<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;. \common_cloud_storage\get_url() . '&amp;attr_type=home_pic&amp;tmod=list' . '&quot;&gt;'. $pluginlang['home_pic'] . '&lt;/a&gt;&lt;/button&gt;',<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;'&lt;button&nbsp;&nbsp;class=&quot;submit btn&quot; style=&quot;border-radius: 3px&quot;&gt;&lt;a style=&quot;color: white&quot; href=&quot;'.ADMINSCRIPT.'?'<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;. \common_cloud_storage\get_url() . '&amp;attr_type=portal&amp;tmod=list' . '&quot;&gt;'. $pluginlang['portal'] . '&lt;/a&gt;&lt;/button&gt;',<br /><li>&nbsp; &nbsp; ),<br /><li>);<br /><li>$count=0;<br /><li>$limit = 10;//单页数量<br /><li>$currenPage = $_GET['page']?$_GET['page']:1;//当前页面<br /><li>$extra='$extra';<br /><li>$mpurl = ADMINSCRIPT.&quot;?action=plugins&amp;operation=config&amp;identifier=common_cloud_storage&amp;pmod=common_cloud_storage_list&amp;attr_type={$_GET['attr_type']}&quot;;<br /><li><br /><li>//没有选择类型时<br /><li>if(!$_GET['attr_type']){<br /><li>&nbsp; &nbsp; exit;<br /><li>}<br /><li><br /><li>//展示论坛附件<br /><li>if($_GET['attr_type']=='forum'){<br /><li>&nbsp; &nbsp; $count =&nbsp;&nbsp;DB::result_first(&quot;SELECT COUNT(*) FROM &quot; . DB::table(&quot;forum_attachment&quot;));//总数<br /><li>&nbsp; &nbsp; $dataList = array();<br /><li>&nbsp; &nbsp; if($count){<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;$dataList = Db::fetch_all('select * from %t limit %d,%d' , array('forum_attachment',($currenPage-1)*$limit,$limit));<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;foreach ($dataList as $k=&gt;$v){<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$dataList[$k]['info'] =&nbsp;&nbsp;Db::fetch_first('select * from %t where aid = %i' , array('forum_attachment_'.$v['tableid'],$v['aid']));<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;$dataList[$k]['info']['datetime'] = date('y-m-d H:i:s',$dataList[$k]['info']['dateline']);<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;}<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;unset($k,$v);<br /><li>&nbsp; &nbsp; }<br /><li>&nbsp; &nbsp; include template('common_cloud_storage:forum_attachment_list');<br /><li>}<br /><li><br /><li>//相册附件<br /><li>if($_GET['attr_type']=='home_pic'){<br /><li>&nbsp; &nbsp; $count =&nbsp;&nbsp;DB::result_first(&quot;SELECT COUNT(*) FROM &quot; . DB::table(&quot;home_pic&quot;));//总数<br /><li>&nbsp; &nbsp; $dataList = array();<br /><li>&nbsp; &nbsp; if($count){<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;$dataList = Db::fetch_all('select * from %t limit %d,%d' , array('home_pic',($currenPage-1)*$limit,$limit));<br /><li>&nbsp; &nbsp; }<br /><li>&nbsp; &nbsp; include template('common_cloud_storage:home_pic_list');<br /><li>}<br /><li><br /><li>//论坛封面附件<br /><li>if($_GET['attr_type']=='portal') {<br /><li>&nbsp; &nbsp; $count =&nbsp;&nbsp;DB::result_first(&quot;SELECT COUNT(*) FROM &quot; . DB::table(&quot;portal_attachment&quot;));//总数<br /><li>&nbsp; &nbsp; $dataList = array();<br /><li>&nbsp; &nbsp; if($count){<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;$dataList = Db::fetch_all('select * from %t limit %d,%d' , array('portal_attachment',($currenPage-1)*$limit,$limit));<br /><li>&nbsp; &nbsp; }<br /><li>&nbsp; &nbsp; include template('common_cloud_storage:portal_attachment_list');<br /><li>}<br /><li>//论坛封面附件<br /><li>if($_GET['attr_type']=='forum_thread') {<br /><li>&nbsp; &nbsp; echo '主题封面';<br /><li>}<br /><li><br /><li>/*分页*/<br /><li>if($count){<br /><li>&nbsp; &nbsp; echo multi($count, $limit, $currenPage, $mpurl);<br /><li>}<br /><li></ol><br /><br />

com叔叔 發表於 2024-1-13 15:26:33

<br /><br />替换为你给的代码错误如下<br /><img title="微信截图_20240113152501.png" id="aimg_27514" aid="27514" src1="static/image/common/none.gif" zoom="https://www.dismall.com/data/attachment/forum/202401/13/152556xxjrirbejbldwlkx.png" src="https://www.dismall.com/data/attachment/forum/202401/13/152556xxjrirbejbldwlkx.png" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="600" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br />

842939018 發表於 2024-1-15 00:09:58

<br />麻烦加我Q或微信,约个时间远程。请提前安装向日葵远程协助软件。<br /><br />报错信息是:‘语法错误,多了一个)’符号,不可能,绝对不可能。 <br />Q:842939018<br />微:liuxiongzhu

Thor 發表於 2024-7-23 12:12:16

bug 修复了吗
頁: [1]
查看完整版本: 通用云存储使用教程