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)

Kingster 03-07-2008 03:38 PM

RS_Jelle, I'd like to provide you some basic code for supporting resumes when downloading...

Keep in mind, I have't converted this as of yet to plug in to the downloads.php but I'm definitely getting ready to, if you choose not to in your next version. I'm dealing with big files (UT3 maps and mods), hitting 20-30M easy, so I need this.

Still looking for RSS support out of your mod, but, I'll not look to solve that if you're working on it. If it's on the "to-do" list with no active work toward it, let me know, and I'll pull something together for that.

Lastly, if you want me to just shut the hell up, let me know. :)

Here goes for supporting resuming downloads...
PHP Code:

    //  Begin writing headers
    
header("Cache-Control:");
    
header("Cache-Control: public");
    
header("Content-Type: $ctype");
 
    
$filespaces str_replace("_"" "$filename);
    
// if your filename contains underscores, replace them with spaces
 
    
$header='Content-Disposition: attachment; filename='.$filespaces;
    
header($header);
    
header("Accept-Ranges: bytes");
   
    
$size filesize($file); 
    
//  check if http_range is sent by browser (or download manager) 
    
if(isset($_SERVER['HTTP_RANGE'])) {
        
// if yes, download missing part    
 
        
$seek_range substr($_SERVER['HTTP_RANGE'] , 6);
        
$range explode'-'$seek_range);
        if(
$range[0] > 0) { $seek_start intval($range[0]); }
        if(
$range[1] > 0) { $seek_end  =  intval($range[1]); }
          
        
header("HTTP/1.1 206 Partial Content");
        
header("Content-Length: " . ($seek_end $seek_start 1));
        
header("Content-Range: bytes $seek_start-$seek_end/$size");
    } else {
        
header("Content-Range: bytes 0-$seek_end/$size");
        
header("Content-Length: $size");
    } 
    
//open the file
    
$fp fopen("$file","rb");
   
    
//seek to start of missing part 
    
fseek($fp,$seek_start);
 
    
//start buffered download
    
while(!feof($fp)) {  
        
//reset time limit for big files
        
set_time_limit(0);    
        print(
fread($fp,1024*$speed));
        
flush();
        
sleep(1);
    } 


REVHEAD 03-08-2008 02:09 AM

Hi guys

I am trying to upload the new Cysis patch to my server its like allmost 400 meg, I have set in the .php.ini max uploud to 500M and max post size to 500M, but its still not finnishing the download before giving me an error, I know PHP has a limmit of file sizes.

Is there anyway around this , can I try something else? my previous limmit was 100M and that worked .

Thanks in advance.

Black Tiger 03-08-2008 02:44 AM

You could try the solution I gave to Glennybee. Look a few posts higher in post #2403 it's quoted in there.

maidos 03-08-2008 08:35 AM

hm yeah but couldnt u make that fix on the upcoming version ? so if u delete the category all subcategories will be gone aswell?

InoffLine 03-08-2008 11:38 AM

When a logged in user enters downloads main page, he is shown as a logged out, but in categories and files everything is ok

REVHEAD 03-08-2008 12:54 PM

Quote:

Originally Posted by Black Tiger (Post 1459779)
You could try the solution I gave to Glennybee. Look a few posts higher in post #2403 it's quoted in there.

That works thanks :up:

REVHEAD 03-08-2008 01:13 PM

I need to edit the upload and download permissions, I have forgotten were that is ,can you please point me in the correct direction ,sorry guys its been a while.

Black Tiger 03-08-2008 03:03 PM

It's done in the Admincp -> Usergroups.

maidos 03-08-2008 03:42 PM

possible if ppl can see the files that has been voted on download main page.
And throttle the A,B,C grading and implement images voting picture instead

Black Tiger 03-09-2008 11:06 PM

I got a little problem in 3.7.0 b5. The amount of downloads is not displayed anymore in the Postbit.
I tried to do the memberinfo template edit, but text named in the readme is not corresponding anymore with the actual memberinfo content.


All times are GMT. The time now is 09:13 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.05430 seconds
  • Memory Usage 1,762KB
  • 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_php_printable
  • (1)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