Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases
FAQ Community Calendar Today's Posts Search

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
  #12  
Old 01-22-2002, 11:36 AM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great PPN, gonna test this hack later.
  #13  
Old 01-22-2002, 01:50 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@SaintDog
I wrote this hack on a windows2000 server and it worked fine on it, also tested it on a linux system and a raq, havent had any problems. Tested them both with and without safe mode enabled in php, again no problems.

@epic
you haven't set the path to move the files to in the options part of the control panel. There is a large paragraph at the bottom of the hack file, read this and do what it says.
  #14  
Old 01-22-2002, 02:21 PM
Martz's Avatar
Martz Martz is offline
 
Join Date: Oct 2001
Location: UK
Posts: 156
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quick question:

Will this maintain the permission for each attachment in a private forum? I.E. if an attachment is posted in the moderators forum - will registered users still be able to see it?

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

yes it will, the only difference between this and normal attachments is where it is stored.

As they are required to download the file via attachment.php the appropriate security checks will still be done before they are given the content.
  #16  
Old 01-22-2002, 03:03 PM
epic's Avatar
epic epic is offline
 
Join Date: Oct 2001
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by PPN
@SaintDog
I wrote this hack on a windows2000 server and it worked fine on it, also tested it on a linux system and a raq, havent had any problems. Tested them both with and without safe mode enabled in php, again no problems.

@epic
you haven't set the path to move the files to in the options part of the control panel. There is a large paragraph at the bottom of the hack file, read this and do what it says.
I use this hack accord your attachment file.
  #17  
Old 01-22-2002, 03:05 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please download the file and re-apply the hack there was many changes in all of the editing as well as alot of new bits to allow for editing and upload of new attachments.
  #18  
Old 01-22-2002, 09:03 PM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've created an installer file using the installer by Bane and Tubedogg to allow for easy changes to the sql database and an easier way to view what changes have to be made to the php files.

This is the exact same as the text file that was up earlier just it is in php form.
  #19  
Old 01-22-2002, 10:24 PM
MarkB's Avatar
MarkB MarkB is offline
 
Join Date: Oct 2001
Location: London, UK
Posts: 324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When do you think the attachment db > file importer will be ready?
  #20  
Old 01-23-2002, 03:09 AM
epic's Avatar
epic epic is offline
 
Join Date: Oct 2001
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I solved this problem
1??change
Code:
INSERT INTO `setting` (`settingid`, `settinggroupid`, `title`, `varname`, `value`, `description`, `optioncode`, `displayorder`) VALUES ('', '27', 'Attachment File Directory', '$attachpath', '/home/username/attachments', 'The directory where attachments will be stored, below the document root is recommended.', '', '1');
to
Code:
INSERT INTO `setting` (`settingid`, `settinggroupid`, `title`, `varname`, `value`, `description`, `optioncode`, `displayorder`) VALUES ('', '27', 'Attachment File Directory', 'attachpath', '/home/username/attachments', 'The directory where attachments will be stored, below the document root is recommended.', '', '1');
2??open admin/functions.php
change
Code:
global $safeupload,$tmppath, $allowduplicates, $allowimgsizefailure;
to
Code:
global $safeupload,$attachpath,$tmppath, $allowduplicates, $allowimgsizefailure;
But there something wrong
When i delete the attachment in post,i find the filefolder's file(.file)could not be deleted.how to solve?
  #21  
Old 01-23-2002, 06:05 AM
Scott MacVicar Scott MacVicar is offline
 
Join Date: Oct 2001
Location: Glasgow, Scotland
Posts: 1,199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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


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 08:51 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07196 seconds
  • Memory Usage 2,302KB
  • 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
  • (4)bbcode_code
  • (1)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
  • (3)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