Firefox PHP

Attachments in filesystem with thumbnails

Posted by Pedro Burgos 
All files from this thread

File Name File Size   Posted by Date  
attachs_in_filesystem_with_thumbs.5.0.19.tar.gz 10.5 KB open | download Pedro Burgos 10/19/2005 Read message
Attachments in filesystem with thumbnails
October 19, 2005 12:51PM
Attachments in filesystem with thumbnails for Phorum 5.0.19
-----------------------------------------------------------

The files are saved in a structure of directories like this:

$DIR_FOR_FILES/MESSAGE_ID/FILE_ID

The directory ($DIR_FOR_FILES) is specified in the variable:

$AttachmentDir= $HTTP_SERVER_VARS['DOCUMENT_ROOT']."/../ficheros/";

(This is my directory. I use a directory outside the DocumentRoot, so that they do not have direct access to.)

If the type of file is gif, jpg, jpeg, bmp or png, it will create a miniature (thumbnails) and it will be copied to the same site that the original file but with the completion '_tn':

$DIR_FOR_FILES/MESSAGE_ID/FILE_ID_tn

For this it is necessary to have installed ImageMagick in /usr/bin/, concretely these utilities:

/usr/bin/identify
/usr/bin/convert

In order to read the files use download.php, removed from the same file of version 3. The parameters to call to download.php are:

download.php?MESSAGE_ID,FILE_ID/FILENAME

In order to call to thumbnails to add ',tn' in the end:

download.php?MESSAGE_ID,FILE_ID/FILENAME,tn

In order to see thumbnails in the messages it is necessary to activate the mod inline_attachments including here.

Modified files:

attach.php
moderation.php
read.php
include/moderation_functions.php
mods/inline_attachments/inline_attachments.php

Created files:

download.php

My modifications are noticeable in the files with:

// Modified by LostBit.

It works to me correctly, you can see it in my site:

[www.pacomerte.com]

PD: Sorry by my english, i am spanish.
Attachments:
open | download - attachs_in_filesystem_with_thumbs.5.0.19.tar.gz (10.5 KB)
Re: Attachments in filesystem with thumbnails
September 14, 2006 11:25AM
Nice mod but no work with phorum 5.1.15
Sorry, only registered users may post in this forum.

Click here to login