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!



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

// the same as posts in my blog

// You can retrieve the copyright detail from

// This work was first deployed in by ivyfoxlab.

// 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



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

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

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


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="'upload.php','Upload File','toolbar=no,menubar=no,width=500,height=350') ;" / >

3, Check upload_max_filesize in your php.ini

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