Register Members List Search Today's Posts Mark Forums Read

Closed Thread
 
Mod Options
Attachments Not in Database Details »
Attachments Not in Database
Mod Version: 1.00, by Scott MacVicar (Member) Scott MacVicar is offline
Developer Last Online: Mar 2016 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 2.2.x Rating: (0 vote - 0 average) Installs: 12
Released: 21 Jan 2002 Last Update: Never Downloads: 1
Not Supported Is in Beta Stage  

This is a hack which allows you to save the attachments as files and not within the database. The main problem with this was the fact that it posed certain security issues, these have been tackled by doing the following
  • Placing the folder below document root
  • Using random hashes to name the file
  • Changing the file extension to .file
  • Never divulging the path to the file

This is a beta hack, it has been tested on a development board. I have had insufficent time to fully complete the attachment importer, this removes the files from the database and creates them as physical files in the attachment folder. I will post this as soon as possible.

Looking forward to your feedback.

Scott

To install this hack upload this file to the admin directory and then view it in your browser.

All the changes that Jawelin suggested have been applied, thanks man

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
vb3 Attachments - Including Multiple Attachments Option rake vBulletin 2.x Full Releases 273 24 Sep 2006 04:10
Private Attachments! (Attachments in Private Messages) Chen vBulletin 2.x Full Releases 117 22 Jan 2004 18:35

  #31  
Old 27 Jan 2002, 09:26
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Originally posted by PPN
both refrences in editpost.php require to have the function above it
[...]
I think i missed out some files now that i think about it. The moderate feature in the admin panel and the simply /moderator.php file as well as the /mod/moderate.php

I'll look into this now
Thanks. About moderate.php, I was just meaning that file was in the 'mod/' folder, not at the same level of others... And, as you specified the folder for functions.php, it should be cleaner the same notation to that file. Just typo, as said.... :kiss:

The other question ? Well, I hwr think it should be useful; as the "attachment as file" option is in settings and any time could be changed with a radio button, I absolutely think it should be a way (AdminCP menu) to move files out/in from/to DB...
Don't you agree ?

Thanks again.

P.S.: hope my question should be useful and not harmful... :supwink:
  #32  
Old 27 Jan 2002, 10:42
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Just an add:

In admin/functions.php, function deletethread(, there is
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I think just before should be a removeattachment(); call even there, should not ?



Besides, I think there's a little bug in building filename:
in the same admin/functions.php, there's
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

which builds the hash appending '.file' extension.
Just later the same hash is INSERTed INTO db.

But all the times the same hash is red in other files, it's again appended another '.file' string.
This way I definetively think a file named 'hash.file.file' should be searched, when the file in dir is 'hash.file'...


Again, hope this helps.

Thanks again.
Bye

Last edited by Jawelin; 27 Jan 2002 at 11:01.
  #33  
Old 27 Jan 2002, 14:02
Martz's Avatar
Martz Martz is offline
 
Join Date: Oct 2001
PPN how hard would a hack be which saved attachments into a remote database, specified in the attachment.php or a seperate config file? At the moment I am paying a lot of my main mySQL database which is quite powerfull. However I am filling it with attachments quickly and I have some cheaper, slower mySQL space which I would like to use for attachments. This could then get to be many GB's instead of having to not use them at all.

Any help appreciated, I would even have a go at it myself!
__________________
utassault.net forums
Free hosting for
28 co-branded Unreal Tournament clans/projects
  #34  
Old 27 Jan 2002, 14:45
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Jawelin: I have to work out a simple way to do that as its a list of attachment id's, i'm sure i'd have to explode the variable and then do a foreach loop. Will look into this in a bit and then i'll look into the mistake with the hash
__________________
Scott MacVicar
vBulletin Developer
  #35  
Old 27 Jan 2002, 18:54
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Thanks for the answer, even don't understood... :kiss:

Anyway I'll wait for your newer release.
LMK if you'd like to know some other evaluations made by me.
:stupid:
Bye
  #36  
Old 27 Jan 2002, 19:12
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Martz, this would double your bandwidth usage though, from mysql database to server with forums, then from forums to user. So if they download a 5mb file then its really 10 on your bandwidth.

Why not simply make the attachments as files or are you short on space?
__________________
Scott MacVicar
vBulletin Developer
  #37  
Old 27 Jan 2002, 19:27
Martz's Avatar
Martz Martz is offline
 
Join Date: Oct 2001
Well, im short on disk space as well since I'm on a shared server. 200mb disk space and 300mb mySQL space. Like I said, I'm at about 220mb now, and I've disabled attachments. The remote mySQL space is pretty much unlimited as it will be hosted by orange.net.

I dunno what to do, and I can't move everything to the orange.net mySQL server
__________________
utassault.net forums
Free hosting for
28 co-branded Unreal Tournament clans/projects
  #38  
Old 27 Jan 2002, 22:04
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Orange are my cell phone provider :P

how the hell did you get mysql space with that lol
__________________
Scott MacVicar
vBulletin Developer
  #39  
Old 27 Jan 2002, 23:46
Martz's Avatar
Martz Martz is offline
 
Join Date: Oct 2001
Because the Futures bright

They provide gaming services for UT, like UT servers and some web bits and pieces. They have an IRC server (ripper.unreal.orange.net) linked to a small network of ours.

The mySQL space is arranged, however I need to be able to hack it to work.

I said I would modify the attachment to advertise the site http://unreal.orange.net for each attached file after "Nickname has attached this file" in posts.
__________________
utassault.net forums
Free hosting for
28 co-branded Unreal Tournament clans/projects
  #40  
Old 30 Jan 2002, 11:41
Martz's Avatar
Martz Martz is offline
 
Join Date: Oct 2001
I now have my mySQL space with orange, the table setup, phpmyaddmin working etc etc.

Any suggestions for making the hack above?
__________________
utassault.net forums
Free hosting for
28 co-branded Unreal Tournament clans/projects
  #41  
Old 30 Jan 2002, 16:48
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Originally posted by PPN
Jawelin: I have to work out a simple way to do that as its a list of attachment id's, i'm sure i'd have to explode the variable and then do a foreach loop. Will look into this in a bit and then i'll look into the mistake with the hash
PPN, sorry for this reminder, but I'm in trouble with half this hack installed (just the modifications to the DB) and absolutely need to make the tabledump lighter before upgrading to v2.2.2 ...
So, I'm here again to ask to discuss about the unsolved problems.

Sorry again. Hope you could understand.
Thanks.
  #42  
Old 30 Jan 2002, 17:22
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
I've been busy with school work and i'll look into it in about 2 hours I have some stuff I need to finish before I can check it over. I've also just changed to a new system so moving the files has taken a while too.

Will post a finish to this hack tonight and then get it moved into the full releases section.
__________________
Scott MacVicar
vBulletin Developer
  #43  
Old 30 Jan 2002, 22:25
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
sorted the problem with an extra .file being appended, this was caused by a problem when the file was created, I recommend apply the getupload function again and the other modification to functions.php which was added to remove the attachments when a thread was deleted.
__________________
Scott MacVicar
vBulletin Developer
  #44  
Old 31 Jan 2002, 13:57
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Thanks a lot.
Such a fast and positive ack should make me mind my advice wasn't boring.
I'll full reapply the entire hack and still minded trying to create an offline importer/exporter to follow the VB settings.
If pleased, will let you know.

Hope see u soon in FullReleases Area.
Thanks.
  #45  
Old 31 Jan 2002, 15:12
Jawelin Jawelin is offline
 
Join Date: Nov 2001
First question: you suggest an attachment directory below the document root, like '/home/username/attachments'.
This way, it's outside of the public_html folder, so files can't be accessed and executed via web.
- Does the attachment.php access them without problem ?
- This way isn't necessary yet to change the extension and the nature of the file, is it ?

Thanks again
Bye
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 04:58.

Layout Options | Width: Wide Color: