Giter Club home page Giter Club logo

phpbb-extension-tencentcos's Introduction

phpBB 3.3 TencentCOS Extension

phpBB 3.3 腾讯 对象存储 COS 扩展

Description

An extension for phpBB 3.3 that utilizes TencentCOS as the filesystem for uploaded files.
这是 phpbb 的 腾讯 对象存储 COS 扩展, 允许你使用COS来存放你的网站的文件,并替换掉文章中的所有附件链接, 所以每一个附件都会直接从COS而不是你的服务器下载。减轻了你的服务器的带宽负载。

Compared with version 1.0.4, the 1.0.6 version can already guarantee that the downloaded file has a normal suffix and file name, and will also delete the thumbnail image when deleting the original image. Increase the error output to the error log function of the acp panel. 相对1.0.4版,1.0.6版已经可以保证下载下来的文件有正常后缀名和文件名了,而且也会在删除原图的时候把删除缩略图删掉。同时增加错误输出到acp面板的错误日志的功能。

Compared with version 1.0.6, the latest version ( that is, the current 1.0.7 version ) compatible with php7 and passed the test in phpbb3.3.5 相对1.0.4版,最新版(也就是当前1.0.7版)已经兼容了php7,并且在phpbb3.3.5通过测试

However, to use the latest version, you need to modify a little bit of phpbb source code yourself. Modify the following two sentences in the /phpbb/attachment/delete.PHP file under the root directory of phpbb:
但是要使用最新版,你需要自己修改一点点phpbb的源代码。修改phpbb的根目录下的 /phpbb/attachement/delete.php 文件中的以下两句:

大约274行

    $sql = 'SELECT post_msg_id, topic_id, in_message, physical_filename, thumbnail, filesize, is_orphan
    FROM ' . ATTACHMENTS_TABLE . '
    WHERE ' . $this->db->sql_in_set($this->sql_id, $this->ids);

改成:

    $sql = 'SELECT post_msg_id, topic_id, in_message, physical_filename, thumbnail, filesize, is_orphan, real_filename
    FROM ' . ATTACHMENTS_TABLE . '
    WHERE ' . $this->db->sql_in_set($this->sql_id, $this->ids);

大约298行

     $this->physical[] = array('filename' => $row['physical_filename'], 'thumbnail' => $row['thumbnail'], 'filesize' => $row['filesize'], 'is_orphan' => $row['is_orphan']);

改成:

     $this->physical[] = array('filename' => $row['physical_filename'], 'thumbnail' => $row['thumbnail'], 'filesize' => $row['filesize'], 'is_orphan' => $row['is_orphan'], 'real_filename' => $row['real_filename']);

About the Tencent (Cloud Object Storage,COS)

Help documentation is here : https://cloud.tencent.com/product/cos/document
帮助文档:https://cloud.tencent.com/product/cos/document

Installation

Clone into phpBB/ext/austinmaddox/tencentcos:

git clone https://github.com/hellohappy0/phpbb-extension-tencentcos phpBB/ext/austinmaddox/tencentcos

Set up the dependencies:

php composer.phar install --dev

Go to "ACP" > "Customise" > "Extensions" and enable the "TencentCOS" extension.

Live Installation

If you want to install the extension in a live board, please only use official releases. Note that GitHub releases are NOT the releases you are looking for.
You can download from the https://www.phpbb.com or https://www.postgraduate.top ,which can be installed as other general extensions.
如果你想要直接安装这个扩展,请不要直接下载github版本,他需要使用composer来安装相关的文件,也就是下面链接里面的Vendor文件夹里面的内容。
官方扩展: https://www.phpbb.com 或者作者自己的网站: https://www.postgraduate.top/viewtopic.php?f=8&t=22

Upgrade

If you enable the plug-in to report a large number of PHP warnings, it may be solved by using composer update 如果启用插件报出大量的php警告,可能使用composer update会解决

License

GPLv2

phpbb-extension-tencentcos's People

Contributors

hellohappy0 avatar austinmaddox avatar markgawler avatar phpbb-es avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.