Sunday, May 10

Release: PhorumUpload: File-Uploading function of Phorum

This code can help uploading files in the Phorum. The original file-uploading function is retarded because the file is saved in database!

Download

Readme.txt:

// Copyright: This work is licensed under a Creative Commons License: Attribution-Noncommercial 2.0 Generic,

// the same as posts in my blog http://benincampus.blogspot.com

// You can retrieve the copyright detail from http://creativecommons.org/licenses/by-nc/2.0/

// This work was first deployed in http://www.starlakeporch.net/bbs/ by ivyfoxlab.



// Ben@fadshop.net. April 1, 2009

// version 1.1: levitate to root folder. Add PHORUM[user][user_id]. By Ben. April 6, 2009

// version 1.2: Add filetype='other' for extension compatibility. By Ben. April 16, 2009

// version 1.21: Bug fixed for OtherExts. By Mantou. April 18, 2009

// version 1.3: Create an empty index.htm in the newly create folder to prevent folder browsing. By Ben. April 22, 2009

// version 1.32: Show warning message before uploading. By Ben. May 8, 2009



安装文档:

1,把upload.php放到论坛根目录。然后成立upload目录并给777权限。后面这一步也许不需要,我的程序会自动创建这个目录;也许在别的系统会创建失败。所以为了保证质量,还是手工创建最保险。

2,在 templates/所用的模版/posting_buttons.tpl ,其他按钮前面, 加上



< input type="button" name="upload" class="PhorumSubmit" value="Upload" onclick="window.open('upload.php','上传文件','toolbar=no,menubar=no,width=500,height=350') ;" / >





3, 检查php.ini中文件大小限制:upload_max_filesize


INSTALLATION:

1, upload upload.php into phorum's root folder and create /upload/ folder with permission 777.

2, Add upload button in the template/the template you choose/posting_buttons.tpl, along with other buttons:



< input type="button" name="upload" class="PhorumSubmit" value="Upload" onclick="window.open('upload.php','Upload File','toolbar=no,menubar=no,width=500,height=350') ;" / >



3, Check upload_max_filesize in your php.ini


TODO:
Make it as a mod of Phorum. User can delete files of his own.

0 Comments:

Links to this post:

Create a Link

<< Home