Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-20-2001, 06:37 PM
auto auto is offline
 
Join Date: Nov 2001
Location: Los Angeles, CA
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know this has been discussed in the past.. but I feel the need to bring this up again [I wasn't involved in the previous discussion of this, so I have the right ]

I remember how great the hack was that converted the storage of avatars from db to folder...

The cons of doing the same to attachments is that if a person can upload an executable file and then executes it on the server, poop could happen. But what if I don't allow anything executable to be attached? these are the file types I allow on my site: gif jpg png txt zip bmp jpeg. This can in no way put the server in jeopardy [as far as I know, feel free to correct me if I am wrong ]
As a safety measure, we could also have a script such as this one included in this hack:

PHP Code:
 <?php

$folder
="samplefolderfile";
$filename=stripslashes(urldecode($QUERY_STRING));

if (
$filename=="") {
  die(
"<h1>Invalid File Request...</h1>");
}

//your domain
$domains="www.automotiveforums.com,automotiveforums.com,
            www.automotivecritics.com,automotivecritics.com"
;

$domainids explode(",",$domains);
$numdomain count($domainids);

//home domain information
$refr=getenv("HTTP_REFERER");
list(
$remove,$stuff)=split('//',$refr,2);
list(
$home,$stuff)=split('/',$stuff,2);

 
// print "home = $home<br>\n";

$good 0;
$counter 0;
$savecounter 0;

while (
$counter<$numdomain) {

 
// print "domains = $domainids[$counter]<br>\n";

  
if ($home!=$domainids[$counter]) {

  }
  if (
$home==$domainids[$counter]) {
     
$savecount $counter;
     
$good 1;
  }
  
$counter++;
}

if (
$good == 0) {
  die(
"<h1>Leecher!</h1>This file is from $domainids[$savecounter]");
}
else {

  
$fp=@fopen("http://".$domainids[$savecounter]."/".$folder."/".$filename,"r");

     if(
$fp) {
        if (
ereg(".mp3",$filename)) {
          
$xtype="audio/mpeg";
        }
        elseif(
ereg(".jpg",$filename)) {
          
$xtype="image/pjpeg";
        }
        elseif(
ereg(".zip",$filename)) {
          
$xtype="application/x-zip-compressed";
        }
        elseif(
ereg(".exe",$filename)) {
          
$xtype="application/x-msdownload";
        }
        else {
          
$xtype="application/octet-stream";
        }

        
Header("Content-Type: $xtype");
        
Header("Accept-Ranges: bytes");
        
Header("Content-Disposition: ; Filename=$filename");
        
readfile("http://".$domainids[$savecounter]."/".$folder."/".$filename);
     }
     else {
        die(
"file not found");
     }
}

?>

so all the attachments will be called not as a direct URL, but something like http://www.siteurl.com/vbulletin/attach.php?image.gif
this way, it will also serve as an anti-leech [that's the main function for the script above] and will keep the location of attachments unknown.


The reason I am asking for this hack is because some of my members are nuts and are attaching HUNDREDS, yes, HUNDREDS of images They are all quality and appropriate, and I have no problem with them.. but I just don't see why it should be in the database... lots of pain in the arse.

Thanks guys.
Reply With Quote
  #2  
Old 10-21-2001, 06:15 PM
auto auto is offline
 
Join Date: Nov 2001
Location: Los Angeles, CA
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anybody?
Reply With Quote
  #3  
Old 10-28-2001, 07:59 PM
webhost's Avatar
webhost webhost is offline
 
Join Date: Oct 2001
Location: St. Louis
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We Have this working on our site read about it Here

Real Web Host Has written this script tested on 5 sites without problems.
Reply With Quote
  #4  
Old 10-28-2001, 08:21 PM
auto auto is offline
 
Join Date: Nov 2001
Location: Los Angeles, CA
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vBulletin is $160 and this hack is $75?
Reply With Quote
  #5  
Old 10-30-2001, 09:21 PM
webhost's Avatar
webhost webhost is offline
 
Join Date: Oct 2001
Location: St. Louis
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Auto

Did you get my PM?
Reply With Quote
  #6  
Old 10-30-2001, 10:28 PM
dirgotronix dirgotronix is offline
 
Join Date: Oct 2001
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Maybe someone could write up a free hack for this, or, maybe make it an option in the next release, database versus file storage.

I dunno about you, but my forum's database is huge, my nightly backup and gzip takes forever because of all the files in there, and for god sakes my server is only a p200. More strain taken off of the database, the better.

I can't justify spending almost as much for a hack as I paid for the software itself. Not to mention money doesn't come easy to me as it is, my lawyer eats all my funding.
Reply With Quote
  #7  
Old 11-13-2001, 11:40 PM
auto auto is offline
 
Join Date: Nov 2001
Location: Los Angeles, CA
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

RealWebHost: Yes I did

So, is anyone willing to create this hack?
I am thinking that simply converting the avatar db to file hack might work...

thanks guys.
Reply With Quote
  #8  
Old 11-14-2001, 07:28 AM
eva2000's Avatar
eva2000 eva2000 is offline
 
Join Date: Oct 2001
Location: Brisbane, Australia
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

actually i'm looking for something similar for part of a hack request i posted here https://vborg.vbsupport.ru/showthrea...threadid=32024
Reply With Quote
  #9  
Old 01-30-2002, 03:24 PM
LancerForums's Avatar
LancerForums LancerForums is offline
 
Join Date: Nov 2001
Location: CA
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm also interested in this hack. Anyone willing to do it? Also, what would happen to the images that are currently stored in the db?

Mark
Reply With Quote
Reply


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:17 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.03679 seconds
  • Memory Usage 2,255KB
  • Queries Executed 11 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete