[DEV] Attach Mod

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Anti-Spam Guide
User avatar
digioz
Registered User
Posts: 297
Joined: Thu Feb 05, 2004 9:20 pm
Location: Chicago, IL
Name: DigiOz Multimedia

[DEV] Attach Mod

Post by digioz »

Modification Name: Attach Mod
Author: digioz

Modification Description: The purpose of this mod is to store attachments at YYYY/Month/DD inside the files folder where attachments are normally stored. This is specially beneficial for sites with a large number of attachments to distribute the number of files into multiple folders for faster retrieval and more efficient storage.

Modification Version: 0.0.3
Requirements: None
Supported PHPBB Versions: 3.0.9, 3.0.10

Download: attach-mod_0.0.3.zip
Source Code: DigiOz Github phpbb-mods

Image
Image

Screenshots:

Image

Credits: Special thanks to John Z for the initial creation of this Mod, and for allowing me to further enhance this mod and make it available to the community.

Notes: This ModX Installer does not move your existing attachments for you. You will have to manually place existing attachments into proper folder by Year, Month and Day. Any new attachments made after this mod is installed will be stored in YYYY/MM/DD format going forward.

History:
  • 11/15/2011 - Version 0.0.2 released supporting phpBB 3.0.4
  • 11/22/2011 - Version 0.0.3 released which now supports phpBB 3.0.9
  • 08/23/2015 - Version 0.0.4 released which now supports phpBB 3.1.5 (note - this version requires a manual edit of the files and is NOT an extension)
Thanks,
Pete
Last edited by digioz on Mon Aug 24, 2015 1:22 am, edited 7 times in total.
DigiOz Multimedia
http://www.digioz.com
User avatar
FranckTH
Registered User
Posts: 364
Joined: Thu Jul 28, 2011 12:14 pm
Location: France
Name: Franck

Re: [DEV] Attach Mod

Post by FranckTH »

huumm bookmark this topic...

just a little question ? In your project, that's possible to implement the "search" to find a topic per day or with a specific date ?

ps: sorry for my poor english

;)
Free Flash & HTML5 Games for Phpbb 3.2.2 + Extension Relax Arcade Pro
Free Flash & HTML5 Games for Relax Arcade Pro
User avatar
digioz
Registered User
Posts: 297
Joined: Thu Feb 05, 2004 9:20 pm
Location: Chicago, IL
Name: DigiOz Multimedia

Re: [DEV] Attach Mod

Post by digioz »

Hey Franck,

I didn't include a search feature in this mod, but you could easily create a Mod for searching topics by date or attachments posted in a specific date by modifying the out of box advanced search page to look at the filetime.

Pete
DigiOz Multimedia
http://www.digioz.com
lkkevin
Registered User
Posts: 38
Joined: Tue Feb 16, 2010 7:40 pm

Re: [DEV] Attach Mod

Post by lkkevin »

It will be a great MOD. Thanks Digioz.
I tested out I-FR70's MOD on my board. It worked but all of my avatars were not displayed.
Somehow links of avatars were corrupted. I am waiting for your MOD. TIA
User avatar
digioz
Registered User
Posts: 297
Joined: Thu Feb 05, 2004 9:20 pm
Location: Chicago, IL
Name: DigiOz Multimedia

Re: [DEV] Attach Mod

Post by digioz »

Hello All,

New Version 0.0.3 of this Mod has been released today which supports phpBB version 3.0.9. Let me know if you have any questions.

Thanks,
Pete
DigiOz Multimedia
http://www.digioz.com
Posterix
Registered User
Posts: 23
Joined: Fri Jan 07, 2011 6:38 am

Re: [DEV] Attach Mod

Post by Posterix »

Hi digioz!

I have question about modification of a standard attachment function. Do you know how to do this with mod: http://www.phpbb.com/community/viewtopic.php?t=2145151?

Thanks!
User avatar
digioz
Registered User
Posts: 297
Joined: Thu Feb 05, 2004 9:20 pm
Location: Chicago, IL
Name: DigiOz Multimedia

Re: [DEV] Attach Mod

Post by digioz »

Attachments are stored inside the "files" folder, not the "images" folder as you are asking in your question. Also PHPBB does not care about the URL when it uploads the file, it only cares about the relative File System Path.

Does that answer your question?
DigiOz Multimedia
http://www.digioz.com
Posterix
Registered User
Posts: 23
Joined: Fri Jan 07, 2011 6:38 am

Re: [DEV] Attach Mod

Post by Posterix »

digioz wrote:Attachments are stored inside the "files" folder, not the "images" folder as you are asking in your question. Also PHPBB does not care about the URL when it uploads the file, it only cares about the relative File System Path.

Does that answer your question?
Yes, thank you very much.

But I also would like to know how and where to change the relative File System Path for attachments. If it is possible, please answer. Thank you again.
User avatar
digioz
Registered User
Posts: 297
Joined: Thu Feb 05, 2004 9:20 pm
Location: Chicago, IL
Name: DigiOz Multimedia

Re: [DEV] Attach Mod

Post by digioz »

Posterix wrote:... But I also would like to know how and where to change the relative File System Path for attachments. If it is possible, please answer. Thank you again.
You can change the storage folder for Attachments by logging into the Administrative Control Panel. Under "General" tab, there is a link called "Attachment settings". Click on that link, and it will take you to a form where you see the option called "upload directory". By default the upload directory is set to "files" folder, but you can change this directory to whatever directory you want to use instead.

Pete
DigiOz Multimedia
http://www.digioz.com
User avatar
martin123456
I've Been Banned!
Posts: 726
Joined: Sat Mar 05, 2011 7:44 pm

Re: [DEV] Attach Mod

Post by martin123456 »

nice mod idea but after installing all files now show this error

The file ./../files/2011/December/1/405_18d8e01c0635da387cdedaeb63820962 does not exist.

but the files are still in the files folder

did a file test AFTER installing this mod and it worked but only for new files

Code: Select all

<!-- IF S_CODE_UNTIDY and S_MESS_ON_INDEX Good If_Not_TIDY_Then_SUBMIT -->
User avatar
digioz
Registered User
Posts: 297
Joined: Thu Feb 05, 2004 9:20 pm
Location: Chicago, IL
Name: DigiOz Multimedia

Re: [DEV] Attach Mod

Post by digioz »

As the note on the first post says, this Mod doesn't move your existing files for you. You have to move those manually based on filetime in phpbb_attachments table. We will eventually create a converter for this, as time permits.

Pete
DigiOz Multimedia
http://www.digioz.com
User avatar
martin123456
I've Been Banned!
Posts: 726
Joined: Sat Mar 05, 2011 7:44 pm

Re: [DEV] Attach Mod

Post by martin123456 »

digioz wrote:As the note on the first post says, this Mod doesn't move your existing files for you. You have to move those manually based on filetime in phpbb_attachments table. We will eventually create a converter for this, as time permits.

Pete
Duuh on my behalf

other than old files the mod performs real nice ty

Code: Select all

<!-- IF S_CODE_UNTIDY and S_MESS_ON_INDEX Good If_Not_TIDY_Then_SUBMIT -->
User avatar
digioz
Registered User
Posts: 297
Joined: Thu Feb 05, 2004 9:20 pm
Location: Chicago, IL
Name: DigiOz Multimedia

Re: [DEV] Attach Mod

Post by digioz »

Hello All,

I have verified this Mod for phpbb version 3.0.10 in addition to version 3.0.9, so feel free to use it with either of those two versions.

Thanks,
Pete
DigiOz Multimedia
http://www.digioz.com
User avatar
martin123456
I've Been Banned!
Posts: 726
Joined: Sat Mar 05, 2011 7:44 pm

Re: [DEV] Attach Mod

Post by martin123456 »

Should have asked i would have posted it still works :lol:

Code: Select all

<!-- IF S_CODE_UNTIDY and S_MESS_ON_INDEX Good If_Not_TIDY_Then_SUBMIT -->
User avatar
digioz
Registered User
Posts: 297
Joined: Thu Feb 05, 2004 9:20 pm
Location: Chicago, IL
Name: DigiOz Multimedia

Re: [DEV] Attach Mod

Post by digioz »

Well, now it's official. :)
DigiOz Multimedia
http://www.digioz.com

Return to “[3.0.x] MODs in Development”