vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   ecDownloads 3.2 Legacy (https://vborg.vbsupport.ru/showthread.php?t=75198)

rjordan 03-24-2005 10:19 PM

I understood the error and came to the same conclusion. IT could not delete what was not there. Just bringing it up.

Perhaps the off-site linking can be solved by only looking for the extension of what follows the last slash in the URL...

lol ... Oh, yeah ... I only link with permission! Thanks for looking into it!

Ron1n 03-24-2005 10:22 PM

OFFSITE LINK FIX

Find in dl_add.php (45) and dl_edit.php (38):

Code:

if ($_FILES['upload']['name'] != '')
                        strstr($_FILES['upload']['name'], '.');
                else
                        strstr($_POST['link'], '.');

change to:


Code:

if ($_FILES['upload']['name'] != '')
                        $ext = substr($_FILES['upload']['name'], strrpos($_FILES['upload']['name'], '.'));
                else
                        $ext = substr($_POST['link'], strrpos($_POST['link'], '.'));


Find in dl_manage.php (139):
Code:

$url = $DB_site->query_result("SELECT url FROM " . TABLE_PREFIX . "file_files WHERE id='".$_GET['id']."'");
                        $DB_site->query("DELETE FROM " . TABLE_PREFIX . "file_files WHERE id='".$_GET['id']."'");
                        unlink($INFO['uurl'].$url);

change to:


Code:

$file = $DB_site->query_first("SELECT * FROM " . TABLE_PREFIX . "file_files WHERE id='".$_GET['id']."'");
                        $DB_site->query("DELETE FROM " . TABLE_PREFIX . "file_files WHERE id='".$_GET['id']."'");
                        if (!$file['link'])
                                unlink($INFO['uurl'].$file['url']);

Find in dl_manage.php (192):

Code:

foreach($_POST['id'] as $id => $value) {
                                $url = $DB_site->query_result("SELECT url FROM " . TABLE_PREFIX . "file_files WHERE id='$id'");
                                $DB_site->query("DELETE FROM " . TABLE_PREFIX . "file_files WHERE id='$id'");
                                unlink($INFO['uurl'].$url);
                        }

change to:

Code:

foreach($_POST['id'] as $id => $value) {
                                $file = $DB_site->query_first("SELECT * FROM " . TABLE_PREFIX . "file_files WHERE id='$id'");
                                $DB_site->query("DELETE FROM " . TABLE_PREFIX . "file_files WHERE id='$id'");
                                if (!$file['link'])
                                        unlink($INFO['uurl'].$file['url']);
                        }


phreak420 03-24-2005 10:31 PM

i still have problems with it...i still have to go in to ftp...change the filename to whatever it changes it to...then i also have to upload the file because it doesnt upload the file anywhere

Ron1n 03-24-2005 11:04 PM

Quote:

Originally Posted by phreak420
i still have problems with it...i still have to go in to ftp...change the filename to whatever it changes it to...then i also have to upload the file because it doesnt upload the file anywhere

You will have to explain yourself more. What errors does it give you? The hack works fine for me and it uploads everything well. It does rename the file, but thats what it should do.

You might want to check some of your server settings and chmod the directory you upload to correctly.

Good luck :)

BamaStangGuy 03-25-2005 03:20 AM

No matter what I try it will not order my categories via what I put into the admincp Categories section... It is inseting it into the database but it is not sorting by what is in the database. Can anyone else confirm this?

Juanito 03-25-2005 07:07 AM

I tried this but I still can't link urls, only works when I put in local "/directory/filename"...

But! I can upload files when they have no characters like "-" or "." in the filename... At least it starts to be funcionnal to me!

Thanks

Quote:

Originally Posted by Ron1n
OFFSITE LINK FIX

Find in dl_add.php (45) and dl_edit.php (38):

Code:

if ($_FILES['upload']['name'] != '')
                        strstr($_FILES['upload']['name'], '.');
                else
                        strstr($_POST['link'], '.');

change to:


Code:

if ($_FILES['upload']['name'] != '')
                        $ext = substr($_FILES['upload']['name'], strrpos($_FILES['upload']['name'], '.'));
                else
                        $ext = substr($_POST['link'], strrpos($_POST['link'], '.'));


Find in dl_manage.php (139):
Code:

$url = $DB_site->query_result("SELECT url FROM " . TABLE_PREFIX . "file_files WHERE id='".$_GET['id']."'");
                        $DB_site->query("DELETE FROM " . TABLE_PREFIX . "file_files WHERE id='".$_GET['id']."'");
                        unlink($INFO['uurl'].$url);

change to:


Code:

$file = $DB_site->query_first("SELECT * FROM " . TABLE_PREFIX . "file_files WHERE id='".$_GET['id']."'");
                        $DB_site->query("DELETE FROM " . TABLE_PREFIX . "file_files WHERE id='".$_GET['id']."'");
                        if (!$file['link'])
                                unlink($INFO['uurl'].$file['url']);

Find in dl_manage.php (192):

Code:

foreach($_POST['id'] as $id => $value) {
                                $url = $DB_site->query_result("SELECT url FROM " . TABLE_PREFIX . "file_files WHERE id='$id'");
                                $DB_site->query("DELETE FROM " . TABLE_PREFIX . "file_files WHERE id='$id'");
                                unlink($INFO['uurl'].$url);
                        }

change to:

Code:

foreach($_POST['id'] as $id => $value) {
                                $file = $DB_site->query_first("SELECT * FROM " . TABLE_PREFIX . "file_files WHERE id='$id'");
                                $DB_site->query("DELETE FROM " . TABLE_PREFIX . "file_files WHERE id='$id'");
                                if (!$file['link'])
                                        unlink($INFO['uurl'].$file['url']);
                        }



phreak420 03-25-2005 09:52 AM

what happens is that i click upload...everything works fine from what it looks like....it says file was uploaded...but then when u go to click on download file there is no file there...brings u to the error page...so then i go in...manually upload it through ftp...rename it to the name it gave me and then it works...but i would like it so that everybody can upload files not just me because i have ftp

rjordan 03-25-2005 01:25 PM

Minor modification request:

When clicking on the download button, can you make it so it opens the link in a new window? Sounds trivial I know, but I am linking to other posts where the author does not mind downloading, but because it is a beta release he does not want it mirrored yet. As it stands, when I link to a forum post, it is leaving my site. This could also benefit other unknown situations too where you may end up leaving the site by clicking on the download link. I am going to make the change on my site as it is really simple, but thought I would share.

The change I made:

In includes/dl_file.php (around line 123) change:

Code:

$download = '<a href="./downloads.php?do=file&id='.$file['id'].'&act=down">Download Here</a>';
to
Code:

$download = '<a href="./downloads.php?do=file&id='.$file['id'].'&act=down" target="File'.$file['id'].'">Download Here</a>';
Just thought I would contribute a little! Oh, thanks for the link fix. Worked like a charm!

The Realist 03-25-2005 02:21 PM

What are the upload limits and how do you increase it?

Laters

AuroraMike 03-25-2005 06:41 PM

uploads via http/php are limited by 2 settings in your php.ini file (assuming UNIX, I'm sure its the same in Windoze though). By default, max_post_size and max_upload_size are 2M. Increase them to a value you want but also realize that this consumes extra memory and *could* later be used for some random exploit or DoS. None exist that I know of that affect the current versions but potentially someone could attempt to repeatedly post 8MB strings and chew up all your available RAM and swap a lot faster since they use 8MB blocks.

but again, no such evil exists...today.


All times are GMT. The time now is 01:29 AM.

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.01668 seconds
  • Memory Usage 1,765KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (14)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete