Attachment Mod

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
2035
71%
Very Good
444
16%
Good
175
6%
Fair
54
2%
Poor
156
5%
 
Total votes: 2864

User avatar
sciguy
Registered User
Posts: 152
Joined: Thu Oct 20, 2005 4:17 pm
Contact:

Post by sciguy »

nope, i have the filesizes for everything set to 500 megabytes. If anything, the allowed file size is too big.
UltimateComputers.net
^A website and forum for computer building enthusiasts and newbs!^
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 18316
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Post by DavidIQ »

Create a file named phpinfo.php, add this to it:

Code: Select all

<?php
phpinfo();
?>
save it to your root folder and either post a link to that file or post the results of it.
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
User avatar
sciguy
Registered User
Posts: 152
Joined: Thu Oct 20, 2005 4:17 pm
Contact:

Post by sciguy »

thanx by the way for the help
Here's the file link:
http://games.illusionmontages.com/forum/phpinfo.php :D
UltimateComputers.net
^A website and forum for computer building enthusiasts and newbs!^
Sho-N
Registered User
Posts: 14
Joined: Wed Dec 14, 2005 12:21 am
Location: CANADA
Contact:

Post by Sho-N »

I don't really understand what this means. Basically, I only get this problem when I try to modify anything in "Extension Control". Did I forget to modify a file?

Image
User avatar
sciguy
Registered User
Posts: 152
Joined: Thu Oct 20, 2005 4:17 pm
Contact:

Post by sciguy »

Yeah-I got the same problem.

I dont know a solution, but I do know a workaround. You can go into your SQL manager and add extensions manually and edit them manually. You can figure out which group number each means by looking at the other ones in your SQL table.

BTW, DavidIQ please help me fix my problem!
UltimateComputers.net
^A website and forum for computer building enthusiasts and newbs!^
CyanBlue
Registered User
Posts: 409
Joined: Mon Jul 28, 2003 9:55 am

Post by CyanBlue »

Hi... :)

Is there any place where I could specify what would be the maximum size of the specific extension???

The problem that I am currently having is that I can upload the 500KB JPEG file with no problem, but I cannot upload a ZIP file that is over 300KB when I have set the general file size to be 2MB in ACP...

I have this if it is any use to you...
http://forum.flashvacuum.com/attach_rules.php?f=14
INSERT INTO `phpbb_extensions` VALUES (1, 1, 'gif', 'GIF Image File');
INSERT INTO `phpbb_extensions` VALUES (2, 1, 'png', 'PNG Image File');
INSERT INTO `phpbb_extensions` VALUES (4, 1, 'jpg', 'JPEG Image File');
INSERT INTO `phpbb_extensions` VALUES (5, 1, 'tif', 'TIF Image File');
INSERT INTO `phpbb_extensions` VALUES (10, 2, 'zip', 'ZIP Archive');
INSERT INTO `phpbb_extensions` VALUES (13, 4, 'txt', 'Plain Text Document');
INSERT INTO `phpbb_extensions` VALUES (19, 4, 'xls', 'MS Excel Document');
INSERT INTO `phpbb_extensions` VALUES (20, 4, 'doc', 'MS Word Document');
INSERT INTO `phpbb_extensions` VALUES (22, 4, 'pdf', 'Adobe Acrobat Document');
INSERT INTO `phpbb_extensions` VALUES (25, 4, 'ppt', 'MS PowerPoint Document');
INSERT INTO `phpbb_extensions` VALUES (30, 3, 'phps', 'PHP Script');
INSERT INTO `phpbb_extensions` VALUES (28, 7, 'swf', 'Macromedia Flash Movie File');
INSERT INTO `phpbb_extensions` VALUES (29, 4, 'fla', 'Macromedia Flash Source File');
INSERT INTO `phpbb_extensions` VALUES (31, 4, 'xml', 'XML Document');
INSERT INTO `phpbb_extensions` VALUES (32, 2, 'mxp', 'Macromedia Extension File');
INSERT INTO `phpbb_extensions` VALUES (33, 2, 'gz', 'gZip Archive');
INSERT INTO `phpbb_extensions` VALUES (34, 4, 'as', 'Macromedia Flash ActionScript File');
INSERT INTO `phpbb_extension_groups` VALUES (1, 'Images', 1, 1, 1, '', 2097152, '');
INSERT INTO `phpbb_extension_groups` VALUES (2, 'Archives', 0, 1, 1, '', 2097152, '');
INSERT INTO `phpbb_extension_groups` VALUES (3, 'Plain Text', 0, 0, 1, '', 2097152, '');
INSERT INTO `phpbb_extension_groups` VALUES (4, 'Documents', 0, 1, 1, '', 2097152, '');
INSERT INTO `phpbb_extension_groups` VALUES (5, 'Real Media', 0, 0, 2, '', 2097152, '');
INSERT INTO `phpbb_extension_groups` VALUES (6, 'Streams', 2, 0, 1, '', 2097152, '');
INSERT INTO `phpbb_extension_groups` VALUES (7, 'Flash Files', 3, 1, 1, '', 2097152, '');
INSERT INTO `phpbb_attachments_config` VALUES ('upload_dir', 'files');
INSERT INTO `phpbb_attachments_config` VALUES ('upload_img', 'images/icon_clip.gif');
INSERT INTO `phpbb_attachments_config` VALUES ('topic_icon', 'images/icon_clip.gif');
INSERT INTO `phpbb_attachments_config` VALUES ('display_order', '0');
INSERT INTO `phpbb_attachments_config` VALUES ('max_filesize', '2097152');
INSERT INTO `phpbb_attachments_config` VALUES ('attachment_quota', '104857600');
INSERT INTO `phpbb_attachments_config` VALUES ('max_filesize_pm', '153600');
INSERT INTO `phpbb_attachments_config` VALUES ('max_attachments', '2');
INSERT INTO `phpbb_attachments_config` VALUES ('max_attachments_pm', '0');
INSERT INTO `phpbb_attachments_config` VALUES ('disable_mod', '0');
INSERT INTO `phpbb_attachments_config` VALUES ('allow_pm_attach', '0');
INSERT INTO `phpbb_attachments_config` VALUES ('attachment_topic_review', '0');
INSERT INTO `phpbb_attachments_config` VALUES ('allow_ftp_upload', '0');
INSERT INTO `phpbb_attachments_config` VALUES ('show_apcp', '1');
INSERT INTO `phpbb_attachments_config` VALUES ('attach_version', '2.4.0');
INSERT INTO `phpbb_attachments_config` VALUES ('default_upload_quota', '1');
INSERT INTO `phpbb_attachments_config` VALUES ('default_pm_quota', '1');
INSERT INTO `phpbb_attachments_config` VALUES ('ftp_server', '');
INSERT INTO `phpbb_attachments_config` VALUES ('ftp_path', '');
INSERT INTO `phpbb_attachments_config` VALUES ('download_path', '');
INSERT INTO `phpbb_attachments_config` VALUES ('ftp_user', '');
INSERT INTO `phpbb_attachments_config` VALUES ('ftp_pass', '');
INSERT INTO `phpbb_attachments_config` VALUES ('ftp_pasv_mode', '1');
INSERT INTO `phpbb_attachments_config` VALUES ('img_display_inlined', '1');
INSERT INTO `phpbb_attachments_config` VALUES ('img_max_width', '0');
INSERT INTO `phpbb_attachments_config` VALUES ('img_max_height', '0');
INSERT INTO `phpbb_attachments_config` VALUES ('img_link_width', '0');
INSERT INTO `phpbb_attachments_config` VALUES ('img_link_height', '0');
INSERT INTO `phpbb_attachments_config` VALUES ('img_create_thumbnail', '1');
INSERT INTO `phpbb_attachments_config` VALUES ('img_min_thumb_filesize', '12000');
INSERT INTO `phpbb_attachments_config` VALUES ('img_imagick', '/usr/bin');
INSERT INTO `phpbb_attachments_config` VALUES ('wma_autoplay', '0');
INSERT INTO `phpbb_attachments_config` VALUES ('flash_autoplay', '0');
INSERT INTO `phpbb_attachments_config` VALUES ('use_gd2', '0');
INSERT INTO `phpbb_attachments_config` VALUES ('basic_data_updated', '1');
User avatar
sciguy
Registered User
Posts: 152
Joined: Thu Oct 20, 2005 4:17 pm
Contact:

Post by sciguy »

make a separate special group for zip files and change their quota size
UltimateComputers.net
^A website and forum for computer building enthusiasts and newbs!^
CyanBlue
Registered User
Posts: 409
Joined: Mon Jul 28, 2003 9:55 am

Post by CyanBlue »

sciguy wrote: make a separate special group for zip files and change their quota size

Thanks for the reply... ;)
Would you care to tell me how I can change the quota for that specific group???

Thanks... :)
nfh
Registered User
Posts: 27
Joined: Tue Nov 08, 2005 11:34 am

Post by nfh »

I do apologise if I'm asking something already asked, but I do confess that I didn't take the time to browse through the 822 pages of this topic! :oops:

What I would like to know is if this mod "streams" the attached files when they're downloaded, or if it simply provides a link to the actual file.
I'm asking this because I would like to add the ability to download (and upload) files as attachments only to registered users.

Best regards,
Norberto
User avatar
loco63
Registered User
Posts: 274
Joined: Sat Nov 19, 2005 2:33 pm

Post by loco63 »

hello all. i have installed this mod and it works great when uploading new files. however i have converted from another forum and uploaded my attachment files as required. when i run the synchronize attachments command from the control panel i get this error :

Couldn't select Attachment ID's

DEBUG MODE

SQL Error : 1226 User 'loco635' has exceeded the 'max_questions' resource (current value: 72000)

SELECT attach_id FROM phpbb_attachments WHERE post_id = 42808 LIMIT 1

Line : 798
File : functions_attach.php

anyone know what might the trouble be ?

thanks !
User avatar
sciguy
Registered User
Posts: 152
Joined: Thu Oct 20, 2005 4:17 pm
Contact:

Post by sciguy »

nfh-it depends on the file type-some stream and some are downloads. However, you can set it so that only registered users can download and upload in the "permissions" panel. Also, if you dont want any to stream, you can put them all in the archive section and they will just be available for download. :D

CyanBlue-sorry i didnt explain. If you want to make all the files in the archive group a larger max file size, go to "extension groups control." In the archive line, increase the max filesize of the archive files. If you want to make the upload size larger for zip only, make a new extension group at the top, add .zip to that group and set the max filesize.
If that still doesn't fix it, go to "attachments>management" and under "attachment filesize settings" change the max for the filesize, attachment quota, and make sure that "default quota limit is set to "no quota limit"

Does that fix it?
UltimateComputers.net
^A website and forum for computer building enthusiasts and newbs!^
User avatar
sciguy
Registered User
Posts: 152
Joined: Thu Oct 20, 2005 4:17 pm
Contact:

Post by sciguy »

is everything still linked to the right directories?
UltimateComputers.net
^A website and forum for computer building enthusiasts and newbs!^
nfh
Registered User
Posts: 27
Joined: Tue Nov 08, 2005 11:34 am

Post by nfh »

sciguy, I think I didn't make my question very clear, so I'll try to elaborate more on that.

What I need is something that never refers to the original file itself. In other words, when clicking on a link to download the file, the link would point to a php file that "streams" the file by opening and sending it by http (it seems to me that I confused you with this, as you seemed to understand that I was talking about video or audio streaming). For security issues the files container could even reside outside the web server directory (this way it would always be impossible to hotlink to the file).

I think that this guy (Jeremy, 10-Sep-2004 05:34) is doing something like what I want:
I have a download script that uses HTTP headers to download files that are located outside of the web path (on a Linux web server).

I was doing what was posted in the normal examples:

$SRC_FILE = "/path/outside/web/server/test.txt";
$download_size = filesize($SRC_FILE);
$filename = basename($SRC_FILE);
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=$filename");
header("Accept-Ranges: bytes");
header("Content-Length: $download_size");
@readfile($SRC_FILE);

But in Internet Explorer, whenever I would click the link to downlad, I could only save the file. If I tried opening the file directly, it gave an error about not being able to find the temporary file.

After digging around for a while, I found the solution. You have to set the Cache-Control to private. So I added the following headers (on top/before the others):

header("Pragma: public");
header("Expires: 0");
header("Cache-Control: private");

And now it works. I had a different Cache-Control setting before, and it wasn't working. So I'm certain that setting the Cache-Control to private is what fixed it.

The server environment is Apache 1.3.29 with PHP 4.3.8 running over mod_ssl and using PHP sessions.

Hope this helps someone!


I hope you understand my question now. If not, I'll try to elaborate even more :).
CyanBlue
Registered User
Posts: 409
Joined: Mon Jul 28, 2003 9:55 am

Post by CyanBlue »

If that still doesn't fix it, go to "attachments>management" and under "attachment filesize settings" change the max for the filesize, attachment quota, and make sure that "default quota limit is set to "no quota limit"

Does that fix it?
Hm... As I was saying I was able to upload 300KB of ZIP file last time and it went up to 500KB after I changed to the 'no quota limit'... It's not going any near the 2MB that I have set in the 'attachment filesize settings' and 'extension groups control' though... Weird...

Um... Let me ask you a question this way... What happens if the user decide to upload 2MB file to the forum when the limit is set to 150KB for example???
If I try it, I get to see this address 'http://forum.flashvacuum.com/posting.php' with 'The page cannot be displayed' error message... Is this correct???

Thanks for your help... ;)
User avatar
sciguy
Registered User
Posts: 152
Joined: Thu Oct 20, 2005 4:17 pm
Contact:

Post by sciguy »

ok i understand-you want to link it to an external directory. As far as I know, you will only be able to do this if you own another domainname. However, I dont know how to make it so that you cannot view where the file is originating from-sorry :cry:
UltimateComputers.net
^A website and forum for computer building enthusiasts and newbs!^
Post Reply

Return to “[2.0.x] MOD Database Releases”