vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Major Additions - DownloadsII (https://vborg.vbsupport.ru/showthread.php?t=120122)

CyberRanger 12-08-2007 01:55 PM

Quote:

Originally Posted by SAUR0N (Post 1397353)
is it normal that the files dupicates itself into a tmp folder? because with a 500kb files it's ok but with a 2gb :S

Yes, that's normal and how the program works. It duplicates itself but is then erased. This prevents people from directly linking to the file.

SAUR0N 12-09-2007 01:42 PM

what would happen if 4 users wants to download the same file at the same time?. will it duplicate 4 times?

what about using fpassthru ?

InoffLine 12-10-2007 04:34 AM

As i understood it makes more then 35 sql queries on one page. So will you work on decreasing their number?

RS_Jelle 12-10-2007 05:10 AM

Quote:

Originally Posted by SAUR0N (Post 1397893)
what would happen if 4 users wants to download the same file at the same time?. will it duplicate 4 times?

what about using fpassthru ?

We're working on this for v6 (also putting files in multiple directories (with an option for storing them outside the forums directory) instead of all files in one).

Quote:

Originally Posted by InoffLine (Post 1398355)
As i understood it makes more then 35 sql queries on one page. So will you work on decreasing their number?

Not on normal pages :)
You only get those numbers if you are having a lot of subcategories as we aren't caching the category structure yet. So the amount *can* be high, but as the category table isn't that heavy, the queries aren't slow and the page also isn't.
But we are working on it: storing the category structure in the datastore would be better.

jimjam 12-10-2007 11:04 AM

Suddenly, members are getting "ERROR: File not found" on just some files they want to download. The files are physically there in the downloads folder.

Any idea what might be causing this?

Thanks in anticipation

Kingster 12-10-2007 01:10 PM

Great mod guys... It's working well so far. Had a few issues converting some old downloads that I had, plugging it into your mod... But so far, so good. I've clicked Installed.

Couple of things that I'm (and my users) are looking for:
  1. Search downloads by user. I know that I can go to the person's profile and see what they've uploaded, but I'd like to add a button image to their postbit if they have files that they've upped. This button would take them to the result of a search for files that they have uploaded. Thoughts on how to do this?
  2. RSS feeds for categories. I have users that would like to watch for new files. Anyway to create RSS feeds that displays most recent uploads by category as well as an overall most recent uploads? I could do a work-around by creating a thread per upload, but, why, when comments for each upload is available.
  3. I mentioned it before - no one responded... What about using one of the free flash-based uploaders out there - doesn't have all the PHP upload limitations, plus it gives visual feedback on the upload process... And, it's not FTP based.
  4. How do I set the default download button to be used when viewing a category? Currently it shows the collapse button, and I've created a much better button that I would like to use. I thought it was the ecdownloads_download_pic variable in the phrase table (doesn't seem to be exposed anywhere on the interfaces), but it didn't change the image used when I changed the name to the new image I wanted to use.
Once again, great mod! Thanks for all your support!

xTerMn8R 12-10-2007 02:21 PM

Hey Folks

I had this installed and working great and then added a new skin to the site (style) Now when I try and download something It tells me I've excided my Daily Limit. I'm ADMIN and have checked all the permissions for DownloadsII and have NO restrictions on group and checked all the settings. I did find that I had to re-import a lot of my other products to get them to work in this style so My question is ....

If I re-install the DownloadsII Product will it Kill all the Files and catagories I already have in there, this really would not be good... Is there another way to tell it to work with a new style without re-installing?

Thanks to ALL ...

Termi

Tom_S 12-10-2007 07:47 PM

I am sure this may have been answered but I haven't found it. When linking to a file such as on downloads.com the url being huge this mod does not accept the entire url. Is there a fix for this? I know the original -> Minatica.be Downloads is working fine with this method so evidently there is an edit I can make somewhere to accommodate this issue.

Thanks in advance.

Kingster 12-10-2007 11:05 PM

Quote:

Originally Posted by Kingster (Post 1398538)
Couple of things that I'm (and my users) are looking for:

Add one more thing to the list - resumable downloads: Some code along these lines:
PHP Code:

<?php
function dl_file_resume($file){

    
//First, see if the file exists
    
if (!is_file($file)) { die("<b>404 File not found!</b>"); }
   
    
//Gather relevent info about file
    
$len filesize($file);
    
$filename basename($file);
    
$file_extension strtolower(substr(strrchr($filename,"."),1));
   
    
//This will set the Content-Type to the appropriate setting for the file
    
switch( $file_extension ) {
        case 
"exe"$ctype="application/octet-stream"; break;
        case 
"zip"$ctype="application/zip"; break;
        case 
"mp3"$ctype="audio/mpeg"; break;
        case 
"mpg":$ctype="video/mpeg"; break;
        case 
"avi"$ctype="video/x-msvideo"; break;
        default: 
$ctype="application/force-download";
    }
   
    
//Begin writing headers
    
header("Cache-Control:");
    
header("Cache-Control: public");
   
    
//Use the switch-generated Content-Type
    
header("Content-Type: $ctype");
    if (
strstr($_SERVER['HTTP_USER_AGENT'], "MSIE")) {
        
# workaround for IE filename bug with multiple periods / multiple dots in filename
        # that adds square brackets to filename - eg. setup.abc.exe becomes setup[1].abc.exe
        
$iefilename preg_replace('/\./''%2e'$filenamesubstr_count($filename'.') - 1);
        
header("Content-Disposition: attachment; filename=\"$iefilename\"");
    } else {
        
header("Content-Disposition: attachment; filename=\"$filename\"");
    }
    
header("Accept-Ranges: bytes");
   
    
$size=filesize($file);
    
//check if http_range is sent by browser (or download manager)
    
if(isset($_SERVER['HTTP_RANGE'])) {
        list(
$a$range)=explode("=",$_SERVER['HTTP_RANGE']);
        
//if yes, download missing part
        
str_replace($range"-"$range);
        
$size2=$size-1;
        
$new_length=$size2-$range;
        
header("HTTP/1.1 206 Partial Content");
        
header("Content-Length: $new_length");
        
header("Content-Range: bytes $range$size2/$size");
    } else {
        
$size2=$size-1;
        
header("Content-Range: bytes 0-$size2/$size");
        
header("Content-Length: ".$size);
    }
    
//open the file
    
$fp=fopen("$file","rb");
    
//seek to start of missing part
    
fseek($fp,$range);
    
//start buffered download
    
while(!feof($fp)){
        
//reset time limit for big files
        
set_time_limit(0);
        print(
fread($fp,1024*8));
        
flush();
        
ob_flush();
    }
    
fclose($fp);
    exit;
}
?>


RS_Jelle 12-11-2007 05:44 AM

Quote:

Originally Posted by jimjam (Post 1398483)
Suddenly, members are getting "ERROR: File not found" on just some files they want to download. The files are physically there in the downloads folder.

Any idea what might be causing this?

Thanks in anticipation

Did you change servers? Check the chmod of the downloads folder, is it still 777? And do the files inside of it (not the images) have got a 666 chmod?

Quote:

Originally Posted by xTerMn8R (Post 1398570)
Hey Folks

I had this installed and working great and then added a new skin to the site (style) Now when I try and download something It tells me I've excided my Daily Limit. I'm ADMIN and have checked all the permissions for DownloadsII and have NO restrictions on group and checked all the settings. I did find that I had to re-import a lot of my other products to get them to work in this style so My question is ....

If I re-install the DownloadsII Product will it Kill all the Files and catagories I already have in there, this really would not be good... Is there another way to tell it to work with a new style without re-installing?

Thanks to ALL ...

Termi

That's pretty strange. I don't know how a new style could cause such an error (caused by the DownloadsII PHP code, it hasn't anything to do with the style normally). Are you really sure about the settings of the limits?

If you reinstall (or better said: uninstall and install), all the database stuff will be removed during the uninstall, so you lose all of your data (except uploaded files in your downloads folder). I suggest you to import the product XML again (without uninstalling first!) with the "Allow overwrite" option on. Then the templates etc. are added again to all styles (but it doesn't overwrite template modifications, but that's not the problem).

Quote:

Originally Posted by Tom_S (Post 1398760)
I am sure this may have been answered but I haven't found it. When linking to a file such as on downloads.com the url being huge this mod does not accept the entire url. Is there a fix for this? I know the demo Minatica.be Downloads is working fine with this method so evidently there is an edit I can make somewhere to accommodate this issue.

Thanks in advance.

That hasn't anything to do with the demo as we are having the same limitation there.

But it's easy to get rid off :)
It's no database limitation (it's a text field, so plenty of space), but an HTML limitation (the input field for links has got a maxlength of 250 characters. Just edit the downloads_file_addit template and change the maxlength in the following part of the code:
HTML Code:

<input name="link" type="text" size="40" maxlength="250" <if condition="$file['link']==1">value="{$_POST['url']}"</if> />
@Kingster: We are working on v6, but at the moment I'm a bit busy (I've got examns at university in januari). There's already a lot of progress in it (more search options, extensions management -like the vB attachments-, default category sort options and a new category admin, ...). RSS, the search, ... are already suggested, so we try to integrate as much as things, but it's also slowing down a lot. I won't get to a release before the end of my exams, but I really want to finish it finally as we are talking already too long about the new version.

Strange about the category image thing. It's a hardcoded thing, but if there's no image, it's using the ecdownloads_download_pic defined image (I know, not that nice, but we wanted a default image everyone has got). Also note that the image should be placed in your styles buttons folder, that's probably your problem.


All times are GMT. The time now is 04:37 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.04308 seconds
  • Memory Usage 1,811KB
  • 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
  • (1)bbcode_html_printable
  • (1)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (6)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