Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases

Closed Thread
 
Thread Tools
Details »»

Version: 1.00, by Scott MacVicar Scott MacVicar is offline
Developer Last Online: Mar 2016 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 01-20-2002 Last Update: Never Installs: 12
Is in Beta Stage  
No support by the author.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 01-23-2002, 09:47 AM
kermit's Avatar
kermit kermit is offline
 
Join Date: Dec 2001
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I get this?..

Warning: Supplied argument is not a valid MySQL result resource in myfullpath/admin/db_mysql.php on line 154

Hmmm
  #23  
Old 01-23-2002, 10:18 AM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is this in the install file or another file?
  #24  
Old 01-23-2002, 10:22 AM
kermit's Avatar
kermit kermit is offline
 
Join Date: Dec 2001
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In the install file..
  #25  
Old 01-23-2002, 11:54 PM
UserName UserName is offline
 
Join Date: Nov 2001
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm excited about using this and getting rid of our huge attachments table, which is currently the cause of many slow MySQL queries.

Are there people currently using this hack without problems or are you still in test mode?
  #26  
Old 01-24-2002, 02:44 AM
epic's Avatar
epic epic is offline
 
Join Date: Oct 2001
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by PPN
epic you are using an old version of this hack which had some problems, if you had read the reply to your post it says please download the new file and install the hack again, I'll remind you that this is a beta hack so the format is constantly changing.

Its at a semi stable version just not, when you edit posts you can change attachment and it alters the files as well as the moderation of attachment is allowed.
Thx.
  #27  
Old 01-24-2002, 06:02 AM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have an importer but no tests of the import worked on large boards.
I'm gonna test on my own board tonight
  #28  
Old 01-26-2002, 08:55 AM
jardragon901 jardragon901 is offline
 
Join Date: Nov 2001
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any news? this sounds like an awesome hack and I would like to install it .
  #29  
Old 01-26-2002, 10:27 AM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by PPN
[...]
Importer has been added, this hack is now ready fir beta testing

Last edited by PPN on 01-26-02 at 12:18 PM

GREAT!!!
Let's go!!!
  #30  
Old 01-26-2002, 12:31 PM
Jawelin Jawelin is offline
 
Join Date: Nov 2001
Posts: 557
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great performance, PPN !!!

Just installed and trying it !!!
I plan to use the installer to extract from db about 11 megs of attachments (a hundred files). First of all, of course, backupped the table and the entire database.

Well, now, just before uploading new modified files, my question are:

- attachment.php: there's a file open $fp = fopen($path, "rb");, but no fclose() ...

- editpost.php: there are two ccurrances of
PHP Code:
 $DB_site->query("DELETE FROM attachment WHERE attachmentid=$postinfo[attachmentid]"); 
What do you refer to ?

- It would be possible to switch on or off the attachment destination with an (im/ex)porter at AdminCP level ? This way an Admin could decide any time to save into db rather than to file, and so on. I mean, a stand-alone db<->file switcher selectable from CP. This reason I renamed the old function acceptupload( into acceptupload2db( instead of overwriting it into functions.php

- My web directories aren't browsable: could I make a slight modification to be able to recognize myself (with ftp) the stored files ? I mean changing the name which still would include the same hash of the table, but also the original filename and extension. As a first saw, I think I should change only the ways filename.ext are builded and retrieved (attachment.php & functions.php), shouldn't I ?

Thanks a lot for your hard work (I know as tried myself...) and for answering me all the time..


P.S.: just a typo correction to the installer: file name moderate.php should be mod/moderate.php ...

Thanks again.
  #31  
Old 01-26-2002, 02:44 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

both refrences in editpost.php require to have the function above it

changing between database and flatfile defeats the purpose of why the hack was created, it was to stop the /var folder being filled up as my attachment table is 50mb and it caused problems dumping the table and if the tables crashed it got corrupted among other things.

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
Closed Thread

Thread Tools

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

Forum Jump


All times are GMT. The time now is 06:30 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04390 seconds
  • Memory Usage 2,295KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete