[2.0.17] No Double Attachments (for AttachMOD)

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!
1
17%
Very Good
2
33%
Good
0
No votes
Fair
1
17%
Poor
2
33%
 
Total votes: 6

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 28009
Joined: Sat Aug 16, 2003 7:36 am

[2.0.17] No Double Attachments (for AttachMOD)

Post by Extensions Robot » Wed Jun 30, 2004 8:07 pm

MOD Name: No Double Attachments (for AttachMOD)
Author: Steve F
MOD Description: This will adds MD5 calculation/checking when an attachment is posted/upgraded, and if the same file (same hash) is already in the database then the file will be deleted, telling user that the file has already been posted (to avoid same file posted twice)



MOD Version: 1.0.1 (Updated 09/24/05)

Download File: NoDoubleAttachmentsforAttachMOD_mod.mod
mods overview page: View
File Size: 5598 Bytes

Security Score: 0
Last edited by Extensions Robot on Mon Apr 30, 2007 12:28 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)

wGEric
Former Team Member
Posts: 8805
Joined: Sun Oct 13, 2002 3:01 am
Location: Friday
Name: Eric Faerber
Contact:

Post by wGEric » Wed Aug 18, 2004 5:38 pm

MOD Validated/Released

Notes:
This is an addon for the Attachment Mod that makes it so users can't upload the same file twice.

bcdynamic
Registered User
Posts: 55
Joined: Fri Jul 23, 2004 5:42 am
Location: Canada
Contact:

Post by bcdynamic » Mon Aug 23, 2004 5:16 pm

I've installed the No Double Attachments mod. When users try to attach a file that has been attached before, I get the following errors at the top of my page. I do get the Sorry but this file has already been posted!

Warning: md5_file(): Unable to open file in /xxxx/xxxxxxx/public_html/forums/attach_mod/posting_attachments.php on line 1494

Warning: unlink(http://forums.bcdynamic.com/files/xbox2.jpg): No such file or directory in /xxxx/xxxxxxx/public_html/forums/attach_mod/posting_attachments.php on line 1510

Thanks in advance for you help. any questions please PM me.

armindo
Registered User
Posts: 18
Joined: Mon Jan 27, 2003 3:15 pm
Contact:

How about postgres

Post by armindo » Wed Aug 25, 2004 2:36 am

Hi i have psql (postgres) installed, is it the same instructions as for mysql?

boumbastic
Registered User
Posts: 5
Joined: Fri Feb 06, 2004 10:29 am

Post by boumbastic » Wed Aug 25, 2004 6:15 am

hi
very nice mod !
is it possible to make a script able to calculate and insert in the database, the already posted attachments' hash ?

thx !

User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Re: How about postgres

Post by morpheus2matrix » Wed Aug 25, 2004 10:08 am

armindo wrote: Hi i have psql (postgres) installed, is it the same instructions as for mysql?


Yes
Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:

fredol
Registered User
Posts: 188
Joined: Mon May 31, 2004 7:02 pm
Contact:

Post by fredol » Wed Aug 25, 2004 3:16 pm

Hi,
boumbastic wrote: is it possible to make a script able to calculate and insert in the database, the already posted attachments' hash ?

There you go! 8) :arrow: Download
What you should do is upload calculate_hashes.php to your phpBB root directory, and then execute it. It will then calculate MD5hashes for all attachments w/out one and update the database, and if everything is allright you'll have a message "MD5hash has been updated for n attachments." Then remove calculate_hashes.php and it's done! ;)
Note: it will only work if you are logged in as ADMIN

Bye,
fredol

boumbastic
Registered User
Posts: 5
Joined: Fri Feb 06, 2004 10:29 am

Post by boumbastic » Wed Aug 25, 2004 4:44 pm

:D
it works fine.
Your mod is great !!
Thanks a lot !
Bye !

Elysium
Registered User
Posts: 3
Joined: Sat Sep 18, 2004 1:18 pm
Contact:

ftp and double attachments

Post by Elysium » Sat Sep 18, 2004 1:23 pm

Hi there!

I did really like this mod since I had a problem.
I switched to ftp upload because I had to upload
dwg files, but the system insists telling me that every attachments
(even of 50 Kb) has already been uploaded.
Then in the 'shadows attachments', I can see those files but they are not
attached, just uploaded.

How ca I do?

10nx
Marco

Elysium
Registered User
Posts: 3
Joined: Sat Sep 18, 2004 1:18 pm
Contact:

Re: ftp and double attachments

Post by Elysium » Sat Sep 18, 2004 1:25 pm

Elysium wrote: Hi there!

I did really like this mod since I had a problem.
I switched to ftp upload because I had to upload
dwg files, but the system insists telling me that every attachments
(even of 50 Kb) has already been uploaded.
Then in the 'shadows attachments', I can see those files but they are not
attached, just uploaded.

How ca I do?

10nx
Marco



.. when using the php-upload everything went well.

Marco

fredol
Registered User
Posts: 188
Joined: Mon May 31, 2004 7:02 pm
Contact:

Re: ftp and double attachments

Post by fredol » Sat Sep 18, 2004 3:22 pm

Hi,
Elysium wrote: I did really like this mod since I had a problem.
I switched to ftp upload because I had to upload
dwg files, but the system insists telling me that every attachments
(even of 50 Kb) has already been uploaded.
Then in the 'shadows attachments', I can see those files but they are not
attached, just uploaded.
.. when using the php-upload everything went well.

That would be because the MOD actually don't work with FTP uploading. I couldn't test it, but since PHP needs to access the file to calculate its MD5hash the file need to bo on the same server, so when upload with FTP it cannot calculate the MD5hash... :(
Unfortunetely I don't think there's a way to fix this, so if you're using FTP upload we won't be able to use this MOD :(

fredol

Elysium
Registered User
Posts: 3
Joined: Sat Sep 18, 2004 1:18 pm
Contact:

Re: ftp and double attachments

Post by Elysium » Sat Sep 18, 2004 3:48 pm

fredol wrote: Hi,
Elysium wrote:I did really like this mod since I had a problem.
I switched to ftp upload because I had to upload
dwg files, but the system insists telling me that every attachments
(even of 50 Kb) has already been uploaded.
Then in the 'shadows attachments', I can see those files but they are not
attached, just uploaded.
.. when using the php-upload everything went well.

That would be because the MOD actually don't work with FTP uploading. I couldn't test it, but since PHP needs to access the file to calculate its MD5hash the file need to bo on the same server, so when upload with FTP it cannot calculate the MD5hash... :(
Unfortunetely I don't think there's a way to fix this, so if you're using FTP upload we won't be able to use this MOD :(

fredol



Ok. 10nx!
But it's not so easy, then, to remove the mod,
so you'd better put a disclaimer on this.

I won't use ftp because this mod is very useful.
10nx again!!!

doiwl
Registered User
Posts: 25
Joined: Tue Nov 04, 2003 11:28 am

Post by doiwl » Sat Sep 25, 2004 4:46 am

this is a great mod.
it solve a lot of problem in my file database.
:) 10s a lot

spikernum1
Registered User
Posts: 48
Joined: Thu Apr 29, 2004 3:49 am

Please Help

Post by spikernum1 » Fri Jan 28, 2005 6:01 am

I can't find a line in my files.

VALUES ( '" . $this->attachment.....

I looked for it manually instead of using Find, and i still can't find the line.

Any suggestions?

spikernum1
Registered User
Posts: 48
Joined: Thu Apr 29, 2004 3:49 am

Please Help

Post by spikernum1 » Fri Jan 28, 2005 6:02 am

I can't find a line in my files.

VALUES ( '" . $this->attachment.....

I looked for it manually instead of using Find, and i still can't find the line.

Any suggestions?

Post Reply

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