News:

Wondering if this will always be free?  See why free is better.

Main Menu

SimpleDownload

Started by crazystu, March 05, 2005, 02:41:47 AM

Previous topic - Next topic

jburnett

Hey great mod! I got it working with the latest SMF beta. 1.1B3P.

http://www.aimbots.org/index.php?action=downloads

I added some stuff, like putting the download directory in the "TITLE" of the page. Plus made it so Guest can browse, just not download. Couldnt find where the permissions were but everything seems to run good.

Good job.

-Jim

I use SMF, why? BECAUSE ITS FREEKIN COOL.

http://www.geekmoz.com/

SkylarSmith

Everything installed fine, Only problem im having is getting the Downloads button to show up. Do i need to enable it some where? Any ideas, I might be missing something. Thanks

devilkin

Quote from: SkylarSmith on July 25, 2005, 06:39:20 PM
Everything installed fine, Only problem im having is getting the Downloads button to show up. Do i need to enable it some where? Any ideas, I might be missing something. Thanks

Yes, you need to enable it for the specific permissiongroup (edit permissions, 'Can view downloads'). On my board, that's in the group 'Approved members'

Second, if you're not using the default theme you'll probably need to adjust your theme to include the button.
SMF 1.1.1, located at http://www.aelst.be/smf/

bjp

#83
smf 1.01 error message :
Unable to load the 'main' template.

DemonicInfluence

reupload the templates...

gizmo28

#85
I keep finding this error in my forums error log:

8: Undefined index: d
File: /home/xxxxxxxx/public_html/Themes/default/languages/Downloads.english.php (eval?)
Line: 37

The error message is  partially wrong though,  the line number its referring to, is in the downloads.template.php file which is this line:

for($i=0,$c='';($c=@$F[$i++]); ){print '<tr><td class="windowbg"><center><img src="'.$surl.'i='.$c['t'].'" alt="'.$c['n'].'"/></center></td><td class="windowbg2"><a href="download.php?d='.$_GET['d'].'&amp;name='.$c['n'].'">'.$c['n'].'</a></td><td class="windowbg">'.number_format($c['s']/1024,1).'KB</td><td class="windowbg2">'.$c['t'].'</td><td class="windowbg">'.date('m/d/Y h:i A',$c['m']).'</td></tr>';}


The part in bolded red is whats causing the error, it seems to only happen if you have files in the main downloads directory, no errors if files are in sub directories, seems to be caused by your directory hiding code.

Any chance you can try to fix this, tried that fix  a couple pages back but then nothing works for me.

papabill

#86
Quote from: papabillHas anyone figured out how to have another directory on another drive as the downloads drive?  The drive I'm using now (c:\) is WAY too small to hold a lot of files, but the second drive (d:\) is much bigger and would be great, but I cannot swap drives.

When I change $rurl = "Downloads/"; to read $rurl = "d:\bbsfiles/"; (in both the download.php and themes/default/downloads.template.php), I still see the categories (folders) and within them the files.  But instead of getting the standard "File Download" box, I get an HTML screen that displays the content of the file.

Quote from: nesianstyles on July 18, 2005, 05:58:45 PM
That last problem is due to the file type being viewable, like txt, swf, etc.
One way around it is to zip the file up.

All the files ARE archives (zip, rar)


Thanks....
Computer Help available:
Computer help: $52.00 hr.
Computer help while you watch: $92.00 hr.
Computer help with your advice: $152.00 hr
Computer help with your assistance: $252.00 hr

Red-Omni

ok i installed the mod and uploaded a file via FTP ... well it shows up but when u click to download the file it comes up with a error.. what am i doing wrong?
here is the link...
http://generationblueoval.com/forums/index.php?action=downloads
login in with the following:
Username: test
Password: test

Red-Omni

come on . someone please help me...

here is the error that i get....

8: Undefined index: d
File: /home/wmaster/public_html/forums/Themes/default/languages/Downloads.english.php (eval?)
Line: 37

gizmo28

#89
Quote from: johnsonperformance on August 12, 2005, 03:41:01 PM
come on . someone please help me...

here is the error that i get....

8: Undefined index: d
File: /home/wmaster/public_html/forums/Themes/default/languages/Downloads.english.php (eval?)
Line: 37

I've posted about this problem already, you can see it a few posts above this one as to how it happens.

It only happens if you don't put the files(downloads) in a directory inside the download folder, if they are in the main downloads directory you get that error in the log.
It's  caused by the directory hiding code, the variable d is the directory but it's not assined anything if its the root download directory.

RaveTSN

Broken Images for files - I have the mod working perfectly now, EXCEPT I am getting broken image place holders instead of the gif images.  This is the properties URL for the broken images:

http://theslayer.net/board/Sources/Downloadimg.php?i=dir

Any suggestions?
Shannon

frostwhite

I can't find any install.txt  ???

So, how can I install it?

Thanks.

RaveTSN

Hi frostwhite,

If you upload the zip file into the Packages directory on your server and then go to the Administrator section at your board, go to Package Manager, you should see a section called:

Package Manager - Browse Packages
Modification Packages

Find the package that you just uploaded: SimpleDownload 1.1.1

Next to that you will see Apply Mod - List Files - Delete.

Click on Apply Mod and follow the directions.  The Package Manager make installing Mods super easy!

Good luck,
Shannon

frostwhite

Thanks, RaveTSN. I'm a little bit confused of this http://www.simplemachines.org/community/index.php?topic=29669.msg225803#msg225803

When i click on Apply Mod, SMF asks me for the FTP Password. After I typed the correct PW in, nothing happened. SMF asks me again ???

RaveTSN

You need to type in the password for FTP on your server, not you administration password for the board.

Hope that helps!
Shannon

v8-powered.com

I've recently installed the SimpleDownload Mod (1.1.1) on SMF 1.0.5, and I'm getting the same error as some others above have reported :
QuoteInternal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Apache/2.0.50 (Fedora) Server at www.clri.net Port 80

I have the files to be downloaded in subdirectories of the Download folder.  All files & directories have permissions 755, and I've removed the .htaccess file from the Download folder.  I still get the error, though.

Anything else I should try / do?

Joey

Is there a way to change the default sorting order on the display page it currently sorts by the date the file was modified...

thanks joey
All to often the "hard to find" or "most expensive" component will
sacrifice itself in an attempt to save the two cent "fuse"
http://newlifegames.com [nofollow]

Joey

can some one help me with the default sorting order on the first time the page loads?

Quote<?php

// Downloads.template.php : SimpleDownload 1.1.1



function template_main()

{

   global $context, $scripturl, $txt, $user_info;

   theme_linktree();



   $rurl = 'Downloads/';

   $surl = 'Sources/Downloadimg.php?';



function e($s){$p=strrpos($s,'.');return substr($s,$p+1,strlen($s));}

function s ($a,$c,$o='asc',$t=SORT_STRING){if(!isset($a[0][$c]))return $a;for ($i=0;$i<count($a);$i++)$temp[$i]=&$a[$i][$c];$o=($o=='asc')?SORT_ASC:SORT_DESC;array_multisort($temp,$o,$t,$a);return $a;}



    $sb=isset($_GET['s'])?$_GET['s']:0;

    $so=isset($_GET['o'])?$_GET['o']:'asc';

    $st=$sb==='s'||$sb==='m'?SORT_NUMERIC:SORT_STRING;

    $d=isset($_GET['d'])?urldecode($_GET['d']):'';

    $d=$d!==''&&$d!=='/'?trim($d,'/').'/':'';

    $p=$rurl.$d;

    $h=@opendir($p);

    if(strstr($d,'../'))exit('Denied');

    if(!$h)exit('<div class="tborder"><table border="0" width="100%" cellspacing="1" cellpadding="4"><tr><td width="100%" class="titlebg">'.$txt['downloads_6'].'</td></tr></table></div>');

    $F=array();$D=array();

    while(FALSE!==($f=readdir($h)))if($f[0]!=='.')if(is_dir($p.$f))$D[]=array('n'=>$f,'m'=>filemtime($p.$f),'s'=>filesize($p.$f),'t'=>'Directory');else$F[]=array('n'=>$f,'m'=>filemtime($p.$f),'t'=>e($f),'s'=>filesize($p.$f));

    if($sb){$F=s($F,$sb,$so,$st);$D=s($D,$sb,$so,$st);}

    print '<div class="tborder"><table border="0" width="100%" cellspacing="1" cellpadding="4"><tr><td colspan="5" class="titlebg">';

    print $txt['downloads_8'];

    if($d!==''){$t=explode('/',trim($d,'/'));for($i=0,$r=array(),$z='';($r[]=@$t[$i]),$z=@$t[$i];$i++) { print(implode('/',$r)!==trim($d,'/'))? ('<a href="'.$scripturl.'?action=downloads&amp;d='.implode('%2F',$r).'">'.$z.'</a> / ' ):$z;}}

    $f=trim($d,'/');

    print '</td></tr><tr><td class="catbg">&nbsp;</td>'

    .'<td class="catbg"><a href="'.$scripturl.'?action=downloads&amp;s=n&amp;o='.($so=='asc'?'dsc':'asc').'&amp;d='.urlencode($f).'">'.$txt['downloads_2'].'</a></td>'

    .'<td class="catbg"><a href="'.$scripturl.'?action=downloads&amp;s=s&amp;o='.($so=='asc'?'dsc':'asc').'&amp;d='.urlencode($f).'">'.$txt['downloads_3'].'</a></td>'

    .'<td class="catbg"><a href="'.$scripturl.'?action=downloads&amp;s=t&amp;o='.($so=='asc'?'dsc':'asc').'&amp;d='.urlencode($f).'">'.$txt['downloads_4'].'</a></td>'

    .'<td class="catbg" nowrap="nowrap"><a href="'.$scripturl.'?action=downloads&amp;s=m&amp;o='.($so=='asc'?'dsc':'asc').'&amp;d='.urlencode($f).'">'.$txt['downloads_5'].'</a></td></tr>';

    for($i=0,$c='';($c=@$D[$i++]);){print '<tr><td class="windowbg"><center><img src="'.$surl.'i=dir" alt="'.$c['n'].'"/></center></td><td class="windowbg2"><a href="'.$scripturl.'?action=downloads&amp;d='.urlencode($d.$c['n']).'">'.$c['n'].'</a></td><td class="windowbg">&nbsp;</td><td class="windowbg2">&nbsp;</td><td class="windowbg">'.date('m/d/Y h:i A',$c['m']).'</td></tr>';}

    for($i=0,$c='';($c=@$F[$i++]);){print '<tr><td class="windowbg"><center><img src="'.$surl.'i='.$c['t'].'" alt="'.$c['n'].'"/></center></td><td class="windowbg2"><a href="download.php?d='.$_GET['d'].'&amp;name='.$c['n'].'">'.$c['n'].'</a></td><td class="windowbg">'.number_format($c['s']/1024,1).'KB</td><td class="windowbg2">'.$c['t'].'</td><td class="windowbg">'.date('m/d/Y h:i A',$c['m']).'</td></tr>';}

    print '<tr><td colspan="5" class="windowbg"><center>SimpleDownload '.$txt['downloads_7'].' by <a href="http://dev.nesian.info [nofollow]">Nesianstyles</a>, Based on <a href="http://celerondude.com [nofollow]">Celerondude</a>\'s Directory Indexer</center></td></tr></table></div>';

}

?>

I some what think it is to do with the way it uses the "m" or "n" command ??  but i have had no luck changint it

thanks joey
All to often the "hard to find" or "most expensive" component will
sacrifice itself in an attempt to save the two cent "fuse"
http://newlifegames.com [nofollow]

Saku

in my board Guest arent allowed to view the downloads, but they can download files if they know the file's traget :
http://www.domaine.com/smf/download.php?d=test&name=file.zip
Can some one fixe this?

cb49747

Was wondering if anyone had an answer for this.

QuoteBroken Images for files - I have the mod working perfectly now, EXCEPT I am getting broken image place holders instead of the gif images.  This is the properties URL for the broken images:

I'm having the same problem. Running simpledownload 1.1.1 and board smf 1.0.5


Advertisement: