Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: crazystu on March 05, 2005, 02:41:47 AM

Title: SimpleDownload
Post by: crazystu on March 05, 2005, 02:41:47 AM
Link to Mod (http://mods.simplemachines.org/index.php?mod=104)
A very simple downloads mod which when you put a file in the Downloads directory, it shows up on the downloads page. You can also create folders and use them as categories. Uses no sql calls, including the "Classic" theme. Tested Package Manager Support for SMF 1.0.3 and Works with SMF Permissions.
View Demo (http://dev.nesian.info/index.php?action=downloads)
French Translation by Alexandre Patenaude (http://dev.nesian.info/index.php?topic=35.0)
Title: Re: SimpleDownload
Post by: russ on March 05, 2005, 07:24:45 AM
not bad :)

anyway to hide the download URL and show the number of downloads? :)
Title: Re: SimpleDownload
Post by: FaSan on March 05, 2005, 08:19:13 AM
Quote from: russ on March 05, 2005, 07:24:45 AM
not bad :)

anyway to hide the download URL and show the number of downloads? :)


Quote it ;)
Title: Re: SimpleDownload
Post by: mennou on March 05, 2005, 09:58:43 AM
i am unable to upload it to my server  i am using smf 1.0.2

here's what it says 
An Error Has Occurred!
The package you tried to upload either is not a valid package or has become corrupted. 
is there someother how i can make it work?
Title: Re: SimpleDownload
Post by: russ on March 05, 2005, 10:04:09 AM
its not compatible with the package manager. must be installed manually. follow instructions in install.txt
Title: Re: SimpleDownload
Post by: mennou on March 05, 2005, 11:08:11 AM
well done...  but  now how can i create the category  for the download????
Title: Re: SimpleDownload
Post by: diplomat. on March 05, 2005, 11:27:14 AM
good job. that could be very useful :)
Title: Re: SimpleDownload
Post by: russ on March 05, 2005, 11:36:12 AM
Quote from: mennou on March 05, 2005, 11:08:11 AM
well done...  but  now how can i create the category  for the download????

Create a directory in your Downloads Directory. That is then your category.
Title: Re: SimpleDownload
Post by: mennou on March 05, 2005, 02:25:01 PM
i did that ..****** still not working...  i used to have the first download     maybe thats why it ain't work for me
Title: Re: SimpleDownload
Post by: crazystu on March 05, 2005, 06:04:41 PM
there is only one download, and it hasn't changed. I've changed the view demo link so now it works :P
Title: Re: SimpleDownload
Post by: mennou on March 05, 2005, 06:44:57 PM
how come mine is not working?? i create the category on my forum  and nothing appear on the download section...
Title: Re: SimpleDownload
Post by: crazystu on March 05, 2005, 07:31:35 PM
are you using "Downloads" as your directory? Note the capital has to be there
Title: Re: SimpleDownload
Post by: mennou on March 05, 2005, 07:57:43 PM
check it  http://www.mixspot.com/community/index.php?action=downloads   i do that....
www.mixspot.com  it still don't show up the category
Title: Re: SimpleDownload
Post by: crazystu on March 05, 2005, 08:02:27 PM
Thats won't help, as the .htaccess in Downloads/ I made, stops anyone from viewing it. Remove it and I'll have a look
Title: Re: SimpleDownload
Post by: mennou on March 05, 2005, 08:08:46 PM
remove the mod??? 
Title: Re: SimpleDownload
Post by: crazystu on March 05, 2005, 08:12:23 PM
no, the file ".htaccess" in the directory "Downloads"
Title: Re: SimpleDownload
Post by: mennou on March 05, 2005, 09:09:25 PM
done i removed it...  what next?
Title: Re: SimpleDownload
Post by: crazystu on March 05, 2005, 10:06:27 PM
There are no files in that directory (Downloads), put your download files in there and the .htaccess back and it should work. It just showed me if you've put the files in the right location.
Title: Re: SimpleDownload
Post by: mennou on March 06, 2005, 10:43:56 AM
i just did... no  download  category show up on there
Title: Re: SimpleDownload
Post by: crazystu on March 06, 2005, 01:29:37 PM
do you have another .htaccess preventing directorys from being displayed?
as this shows up with nothing: http://www.mixspot.com/community/Downloads/
Title: Re: SimpleDownload
Post by: mennou on March 06, 2005, 02:02:56 PM
yeah but for somethingelse....
Title: Re: SimpleDownload
Post by: crazystu on March 06, 2005, 11:51:56 PM
use this instead for that:
Options -Indexes
Title: Re: SimpleDownload
Post by: Xtasy on March 07, 2005, 12:50:28 AM
Is it possible to set a permissions on the download page, I wanna make it so users need 30+ posts to view it.
Title: Re: SimpleDownload
Post by: crazystu on March 07, 2005, 09:08:31 PM
no, but I plan on adding it.
Title: Re: SimpleDownload
Post by: Dj2000 on March 10, 2005, 04:26:51 PM
i have installed this

but i don't see the button  (http://www.muntslag.be/nforum/Themes/default/images/english/downloads.gif) (http://www.muntslag.be/nforum/index.php?action=downloads) on my forum

what going happend???
Title: Re: SimpleDownload
Post by: Nyx on March 11, 2005, 11:08:59 AM
I´ve installed it, but when I try to download something this happens

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

Please contact the server administrator...


What´s wrong? :(

Another thing, Is it possible to put to the files a description?


sorry the english :(
Title: Re: SimpleDownload
Post by: crazystu on March 12, 2005, 12:04:49 AM
Nyx
It is not possible for descriptions as that would require a recording of it. That applies to number of downloads aswell.
Try removing the .htaccess in Downloads and adding a blank index.html (yes it will show up on downloads, but prevent people from accessing the directory.

Dj2000
Have you followed the instructions in install.txt? This doesn't work with package manager yet.
Title: Re: SimpleDownload
Post by: Jay? on March 12, 2005, 07:12:00 AM
This appears to be fantastic and as a first run, I think that it's great!

If I may make a short list of ideas for the next release ;)
- Descriptions
- Usergroup Definable, just like any other Message Board (Premissions...)
- Total Download Count
- Able to make a Download "Sticky"
- ANTI-LEECH (I run a gaming site...  To many people leech maps...)

Just a couple of thoughts :)  I really like it though, easy to use :)

-Jay
Title: Re: SimpleDownload
Post by: Nyx on March 12, 2005, 08:38:13 AM
Quote from: nesianstyles on March 12, 2005, 12:04:49 AM
Nyx
It is not possible for descriptions as that would require a recording of it. That applies to number of downloads aswell.
Try removing the .htaccess in Downloads and adding a blank index.html (yes it will show up on downloads, but prevent people from accessing the directory.

Works now :D thanks
Title: Re: SimpleDownload
Post by: crazystu on April 13, 2005, 12:46:22 AM
1.0.1 Release. No biggie, just a IE Table Bug Fix.
Looking back on it, I need to do some work on it like languages, but for now I'm working on SimplePortal (See Site)
Title: Re: SimpleDownload
Post by: StormFire on April 13, 2005, 07:20:27 AM
looks ok, just cant wait for it to be put in the package manager..

On mine it shows the exact download location...  is there anyway of hiding that?

Also is it possible to change the folder Downloads to something else, if so where do I need to edit the php?
Title: Re: SimpleDownload
Post by: crazystu on April 14, 2005, 02:49:01 AM
No current way of hidding it, but it would be easy to do so. To change the download location, open Downloads.template.php in Themes/default and Themes/classic and find this: $root = 'Downloads/';
$rurl = 'Downloads/';
and Change Downloads in both lines to the directory you want.
Title: Re: SimpleDownload
Post by: sifirforum.com on May 14, 2005, 12:36:22 PM
Quote from: Jay? on March 12, 2005, 07:12:00 AM
This appears to be fantastic and as a first run, I think that it's great!

If I may make a short list of ideas for the next release ;)
- Descriptions
- Usergroup Definable, just like any other Message Board (Premissions...)
- Total Download Count
...

i have insatalled. it is good work   ;)
if you add this future it will be perfect for me  ::)
Title: Re: SimpleDownload
Post by: crazystu on May 27, 2005, 04:26:57 AM
New Version RELEASED!
Changes:
Quote- Now hides download url
- Now uses package manager
- Now uses SMF permissions
- Now uses language support
- Now uses Who's Online
- Now uses Link Tree
- Changed Template to look better
- Recoded a few areas
Title: Re: SimpleDownload
Post by: crazystu on May 27, 2005, 06:53:31 PM
New French Translation Added.
Thanks to Alexandre Patenaude
Title: Re: SimpleDownload
Post by: vintagepc on June 02, 2005, 11:48:53 AM
where exactly do I set the simpledl permissions?
Title: Re: SimpleDownload
Post by: crazystu on June 02, 2005, 03:35:29 PM
just as you set any old permissions.
It adds it on there
Title: Re: SimpleDownload
Post by: vintagepc on June 02, 2005, 07:45:39 PM
it doesn't show up under permissions. I'm gonna try a reinstall.
Title: Re: SimpleDownload
Post by: forumite on June 03, 2005, 12:52:28 PM
Thanks for this mod.

A couple of problems for me:

1. After installing and uploading a couple of test files, I tried downloading as Admin (no permissions need to be set for Admin). Clicking on a file to download results in a continuous "downloading" loop that doesn't end.

2. If I try to uninstall the package (through the package manager) so I can do a clean re-install I get this error:

2: unlink(Downloads/.htaccess): No such file or directory
File: /.../.../.../.../Sources/Subs-Package.php
Line: 829

Any idea what's happening and how I can fully uninstall?

TIA
Title: Re: SimpleDownload
Post by: crazystu on June 04, 2005, 05:56:05 PM
well it looks like i'm gonna have to re-code the hide downloads url part.
As for uninstalling, did you remove the .htaccess from the Downloads directory?
Title: Re: SimpleDownload
Post by: forumite on June 04, 2005, 07:31:35 PM
Quote from: nesianstyles on June 04, 2005, 05:56:05 PM
As for uninstalling, did you remove the .htaccess from the Downloads directory?

No, but it gets removed by the first step in the uninstall. I even tried copying .htaccess back to the Downloads directory, but get the same result when I try to uninstall.
Title: Re: SimpleDownload
Post by: floating on June 08, 2005, 04:38:40 AM
i am new to this mod, where can i set the permissions. Can anyone tell me?
Title: Re: SimpleDownload
Post by: forumite on June 08, 2005, 07:02:52 AM
Floating

IIRC the permissions were set in Admin|Edit features and options. Just scroll through the list. I don't have it installed right now, so can't verify it for sure, but that's what I remember.
Title: Re: SimpleDownload
Post by: floating on June 08, 2005, 06:19:21 PM
may be i need glasses but i didnt find any permissions for the Downloads  8)
Title: Re: SimpleDownload
Post by: forumite on June 08, 2005, 07:02:37 PM
Apologies, I probably wasn't very clear and probably confused you; It's a checkbox in Admin|Edit_Features_ &_Options.
Title: Re: SimpleDownload
Post by: !Hachi! on June 09, 2005, 02:13:43 AM
its cool mod.can we change icons .i want to edit and give icons for every file.it shows txt icon for swf file....!!
                 if any one knows please tell me. Thanks
Title: Re: SimpleDownload
Post by: floating on June 10, 2005, 05:06:05 AM
Is there a way to see how many times one file is downloaded, cuz i dont wanna waste my bandwidth. Let me know
Title: Re: SimpleDownload
Post by: crazystu on June 10, 2005, 05:36:35 PM
not at the moment because it would have to record it somehow
Title: Re: SimpleDownload
Post by: Champi on June 12, 2005, 05:18:58 AM
QuoteIt's a checkbox in Admin|Edit_Features_ &_Options

i think package manager didnt install everything correctly... i made all modifications manual by the mod info file.. the one concerning permisiions... i cant find no checkbox... did modifications for every language.. can it be that i overlooked something...?

i gave my members permissions..

<edit file>
Themes/default/languages/Modifications.english.php


<search for>
// Version: 1.0; Modifications

<add after>
$txt['permissiongroup_downloads'] = "Downloads";
$txt['cannot_view_downloads'] = "You arent allowed to view the downloads!";
$txt['permissionhelp_view_downloads'] = "Allow this if you want this group to access the downloads";
$txt['permissionname_view_downloads'] = "Can view Downloads";


and also
<edit file>
Sources/ManagePermissions.php


<search for>
         'member_admin' => array(
            'moderate_forum' => false,
            'manage_membergroups' => false,
            'manage_permissions' => false,
            'manage_bans' => false,
            'send_mail' => false,
         ),

<add after>
         'downloads' => array(
            'view_downloads' => false,
         ),   
Title: Re: SimpleDownload
Post by: crazystu on June 17, 2005, 03:58:19 AM
SimpleDownload 1.1.1 has been released.
Upgrade has been added for 1.1.0
Title: Re: SimpleDownload
Post by: chitownjts on June 17, 2005, 12:17:34 PM
I downloaded SimpleDownload-1.1.1.zip but I do not see the install.txt.

Any way I could get a copy?

Also, is it possible to get this to work with the Helios theme?
Title: Re: SimpleDownload
Post by: dtm.exe on June 17, 2005, 12:22:01 PM
Quote from: chitownjts on June 17, 2005, 12:17:34 PM
I downloaded SimpleDownload-1.1.1.zip but I do not see the install.txt.

Any way I could get a copy?

Also, is it possible to get this to work with the Helios theme?


Try a looking for a .mod or .xml file.  And yes, it is possible to get it to work with the Helios theme.

-Dan The Man
Title: Re: SimpleDownload
Post by: floating on June 18, 2005, 05:48:46 AM
I am using ver 1.1.0 where can i find the update to 1.1.1?
Title: Re: SimpleDownload
Post by: anunlike on June 20, 2005, 09:45:56 PM
I  just installed this yesterday and haven't made any changes to it. I keep getting this:

Quote8: Undefined index: d
File: /home/anunlike/public_html/forums/Themes/defaultXT/languages/Downloads.english.php (eval?)
Line: 37

in my Forum Error Log. I get a new error everytime I access the page.

???
Title: Re: SimpleDownload
Post by: anunlike on June 21, 2005, 01:37:07 PM
I think I figured out the problem I was having:

find:
Quote
    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>';}

replace with:
Quote
    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="downloads&amp;d='.$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>';}

A few other things that would make this mod even better is:
1 Having an arrow to show the direction of whatever's being sorted.
2 Being able to show page numbers (using "$context['page_index']" stuff)
Title: Re: SimpleDownload
Post by: forumite on June 22, 2005, 03:14:32 AM
Thanks for updating this mod. It appears to have installed just fine. I have a question about the way it functions ....

If I click on a file name it opens and displays the content of the file. I was expecting to see a Open_with/Save_to_disk dialog. Did I misunderstand the way it's supposed to work?

Also, one suggestion .... when I'm viewing a category, it would be nice to have a link to go back to the Downloads directory. Right now it appears the only way to do that is with the Back button in my browser.

Thanks again for your efforts in producing this mod.
Title: Re: SimpleDownload
Post by: ivo2296 on June 22, 2005, 08:39:32 PM
when i try to get a file it shows:  Hacking Attempt...


any ideas?
Title: Re: SimpleDownload
Post by: revgreed on June 26, 2005, 05:01:27 AM
Hi there,

Excellent modification.  Do you think a future version will include an upload feature for permissioned members?

Thanks,

Mike.
Title: Re: SimpleDownload
Post by: Itch™ on July 01, 2005, 07:12:42 PM
Hm, still getting: 14.     Execute Modification     Themes/default/languages/Modifications.english.php     Test failed

I'm using 1.1 Beta 3 Public, guess it's not compatible yet..:(
Title: Re: SimpleDownload
Post by: anunlike on July 02, 2005, 04:36:13 AM
QuoteI'm using 1.1 Beta 3 Public, guess it's not compatible yet..

Actually, it is, for the most part. The only item that shows up as "Test failed" is a language file. That's not a critical file or something that will screw up the forums. If that fails, the text won't show up, that's all. You can easily add that in manually, it's not a big deal. Most of the important files for this will be installed, they won't be changing current files, so most don't mess with the current files.

I just installed it on my 1.1 Beta 3 Public and it looks and works perfectly.

Except I get the same error in my Error Log that I posted about before.
Title: Re: SimpleDownload
Post by: [Dark.Shadow] on July 03, 2005, 03:14:18 PM
Quote from: ivo2296 on June 22, 2005, 08:39:32 PM
when i try to get a file it shows:  Hacking Attempt...


any ideas?


How weird.... You Know, I Had No Problems Installing This Simple Download Mod, but I get the Same Error As You When I Try To Install The SMF Shop Mod..... Maybe It´s An Error From The Beta Version  ::)
Title: Re: SimpleDownload
Post by: ivo2296 on July 03, 2005, 09:30:10 PM
Quote from: nocasca on July 03, 2005, 03:14:18 PM
Quote from: ivo2296 on June 22, 2005, 08:39:32 PM
when i try to get a file it shows:  Hacking Attempt...


any ideas?


How weird.... You Know, I Had No Problems Installing This Simple Download Mod, but I get the Same Error As You When I Try To Install The SMF Shop Mod..... Maybe It´s An Error From The Beta Version  ::)

I'm with 1.0.5
Title: Re: SimpleDownload
Post by: [Dark.Shadow] on July 04, 2005, 01:34:35 AM
Quote from: ivo2296 on July 03, 2005, 09:30:10 PM
Quote from: nocasca on July 03, 2005, 03:14:18 PM
Quote from: ivo2296 on June 22, 2005, 08:39:32 PM
when i try to get a file it shows:  Hacking Attempt...


any ideas?


How weird.... You Know, I Had No Problems Installing This Simple Download Mod, but I get the Same Error As You When I Try To Install The SMF Shop Mod..... Maybe It´s An Error From The Beta Version  ::)

I'm with 1.0.5

Anyway I Had 1.0.5 And Still Worked This Mod.... Then Maybe it´s from the ftp or maybe I Don´t Know :-X
Title: Re: SimpleDownload
Post by: ivo2296 on July 04, 2005, 08:40:38 PM
Quote from: nocasca on July 04, 2005, 01:34:35 AM
Quote from: ivo2296 on July 03, 2005, 09:30:10 PM
Quote from: nocasca on July 03, 2005, 03:14:18 PM
Quote from: ivo2296 on June 22, 2005, 08:39:32 PM
when i try to get a file it shows:  Hacking Attempt...


any ideas?


How weird.... You Know, I Had No Problems Installing This Simple Download Mod, but I get the Same Error As You When I Try To Install The SMF Shop Mod..... Maybe It´s An Error From The Beta Version  ::)

I'm with 1.0.5

Anyway I Had 1.0.5 And Still Worked This Mod.... Then Maybe it´s from the ftp or maybe I Don´t Know :-X

I dont use ftp - i use local machine.
Title: Re: SimpleDownload
Post by: cferd on July 06, 2005, 03:16:42 PM
Excuse me if this was previously asked, but would it take much to make SimpleDownload compatible with the SMF-Mambo Bridge?

Thanks in advance, Ferd
Title: Re: SimpleDownload
Post by: forumite on July 06, 2005, 04:05:04 PM
Hate to be a pest, but is there a response to my question in this message (http://www.simplemachines.org/community/index.php?topic=29669.msg288687#msg288687)?

TIA
Title: Re: SimpleDownload
Post by: Jounouchi on July 09, 2005, 07:27:31 PM
Is this mod can disable the download section and people need to login to download the things?
Title: Re: SimpleDownload
Post by: jepelton on July 13, 2005, 03:13:00 AM
Hmm... i downloaded latest version. Everything seems fine and i can see folders and files...

when i try to click file


i get error ::

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

Please contact the server administrator, [email protected] 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.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


......

I wonder whats wrong...


someone able to help?

http://wickedjoker.com/forum/index.php?action=downloads
Title: Re: SimpleDownload
Post by: [Unknown] on July 13, 2005, 03:23:19 AM
Having problems with mod_security? (http://www.simplemachines.org/community/index.php?topic=34270.0)

-[Unknown]
Title: Re: SimpleDownload
Post by: kolcu on July 13, 2005, 11:02:00 AM
my eng is bad so no write good . sory for it..

i install this modul  but only admin see file. i want only member see simpledownload files. what i make?
thx for help :)
Title: Re: SimpleDownload
Post by: Itch™ on July 14, 2005, 02:10:57 PM
After removing .htaccess in the Downloads folder, all works great...at least for me it does as Admin. When I log in as a regular member and click the Downloads button I'm transferred to the correct page but in the file list is now: An Error Has Occurred! Now what?

YM
Title: Re: SimpleDownload
Post by: Itch™ on July 14, 2005, 02:25:19 PM
IMO it's got something to do with permissions, but since this mod uses SMF permissions that shouldn't be happening........I'm willing to edit some files manually, but as a PHP n00b I'm afraid to screw things up. Can anyone help me out here?

YM
Title: Re: SimpleDownload
Post by: papabill on July 14, 2005, 10:09:00 PM
Quote from: nesianstyles on April 14, 2005, 02:49:01 AM
No current way of hidding it, but it would be easy to do so. To change the download location, open Downloads.template.php in Themes/default and Themes/classic and find this: $root = 'Downloads/';
$rurl = 'Downloads/';
and Change Downloads in both lines to the directory you want.

I successfully installed SimpleDownload 1.1.1, but there was no downloads.template.php in themes/classic.  Is this a problem?
Title: Re: SimpleDownload
Post by: dtm.exe on July 14, 2005, 10:13:25 PM
Quote from: papabill on July 14, 2005, 10:09:00 PM
I successfully installed SimpleDownload 1.1.1, but there was no downloads.template.php in themes/classic.  Is this a problem?

No, it shouldn't be.

-Dan The Man
Title: Re: SimpleDownload
Post by: papabill on July 14, 2005, 10:25:03 PM
Quote from: rvforumite on June 08, 2005, 07:02:37 PM
Apologies, I probably wasn't very clear and probably confused you; It's a checkbox in Admin|Edit_Features_ &_Options.

I can't seem to locate it either.  I installed everything by hand, including the Themes/default/languages/modifications.english.php.

Was there supposed to be a modifications.english.php for themes/classic as well??

Edit:
I even went back and changed back to default from classic, but the checkboxes were not there.

Edit II:
I found the checkbox in Manage Permissions -> Permissions by Membergroup
Title: Re: SimpleDownload
Post by: papabill on July 14, 2005, 10:51:39 PM
Quote from: rvforumite on June 22, 2005, 03:14:32 AMIf I click on a file name it opens and displays the content of the file. I was expecting to see a Open_with/Save_to_disk dialog. Did I misunderstand the way it's supposed to work?

I hate to sound like a gripe, but I'm having the same problem as well.

Edit:
But ONLY when I set the download directory somewhere OTHER than where it was originally coded.

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.
Title: Re: SimpleDownload
Post by: crazystu 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.
Title: Re: SimpleDownload
Post by: papabill on July 18, 2005, 08:51:05 PM
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 either .rar or .zip (they are already compressed archives)
Title: Re: SimpleDownload
Post by: Metal_GunBlade on July 22, 2005, 01:10:54 PM
Guys, when will this mod support SMF 1.1 Beta 3???
Title: Re: SimpleDownload
Post by: devilkin on July 24, 2005, 07:50:00 AM
Maybe you can add this to the downloadimg.php file to have to PDF icon?


$imgs['pdf']='iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABCklEQVR4nJWTIZaDMBCGP/pWEDe47RFaR66yR8D2CJWVxVXWYnsE5MpaXCrBEZe4rAC63QVK+7+X9zKZyZeZSRIBgTckIgBYawH4+B9gjHkK0FrTWksicoeEV4cxJohICBACBBEJq1cJg6y1REDU26MSlvRYota6A0Sz4ctabKLa7SDLcGk6CVgtHtF6aNtZ9zLA1lBVf9eUeg2gyhJXFLBeo/L81+HcfTp/C94TlyUkCWw2UBQk1yteKZBPyLLnAHW54JsGbreuB4cD3vvOririPqNJgNrvoWlw5/PYmabgPdQ1fH2Pe6DyHKzFHY+z1RHHuO12OoO4rmlPp/nNg/pGRjw89eGrvqMf0IF126PD0XEAAAAASUVORK5CYII=';


And you can find a button themed for the Shadow theme on my board: (http://camarilla.kcore.org/smf/Themes/Shadow/images/english/downloads.gif)

DK
Title: Re: SimpleDownload
Post by: jburnett on July 25, 2005, 11:19:32 AM
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

Title: Re: SimpleDownload
Post by: 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
Title: Re: SimpleDownload
Post by: devilkin on July 26, 2005, 12:47:22 AM
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.
Title: Re: SimpleDownload
Post by: bjp on July 28, 2005, 01:21:01 PM
smf 1.01 error message :
Unable to load the 'main' template.
Title: Re: SimpleDownload
Post by: DemonicInfluence on August 05, 2005, 12:35:51 PM
reupload the templates...
Title: Re: SimpleDownload
Post by: gizmo28 on August 06, 2005, 05:56:53 PM
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.
Title: Re: SimpleDownload
Post by: papabill on August 11, 2005, 09:58:03 PM
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....
Title: Re: SimpleDownload
Post by: Red-Omni on August 12, 2005, 01:46:51 PM
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
Title: Re: SimpleDownload
Post by: Red-Omni 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
Title: Re: SimpleDownload
Post by: gizmo28 on August 13, 2005, 01:30:05 AM
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.
Title: Re: SimpleDownload
Post by: RaveTSN on August 19, 2005, 10:43:26 PM
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
Title: Re: SimpleDownload
Post by: frostwhite on August 25, 2005, 11:37:59 AM
I can't find any install.txt  ???

So, how can I install it?

Thanks.
Title: Re: SimpleDownload
Post by: RaveTSN on August 25, 2005, 11:04:53 PM
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
Title: Re: SimpleDownload
Post by: frostwhite on August 26, 2005, 07:24:22 AM
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 ???
Title: Re: SimpleDownload
Post by: RaveTSN on August 26, 2005, 02:47:06 PM
You need to type in the password for FTP on your server, not you administration password for the board.

Hope that helps!
Shannon
Title: Re: SimpleDownload
Post by: v8-powered.com on September 14, 2005, 05:26:27 AM
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?
Title: Re: SimpleDownload
Post by: Joey on September 16, 2005, 08:43:42 PM
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
Title: Re: SimpleDownload
Post by: Joey on September 30, 2005, 12:28:17 PM
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">Nesianstyles</a>, Based on <a href="http://celerondude.com">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
Title: Re: SimpleDownload
Post by: Saku on October 08, 2005, 10:11:48 AM
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?
Title: Re: SimpleDownload
Post by: cb49747 on October 13, 2005, 11:11:11 AM
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

Title: Re: SimpleDownload
Post by: GTec on October 21, 2005, 11:18:35 AM
Quote from: cb49747 on October 13, 2005, 11:11:11 AM
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


Was wondering if that was just me ...  :P i run 1.0.5 too with the same problem.
Title: Re: SimpleDownload
Post by: m00h on October 30, 2005, 07:29:56 AM
Are you looking forward to make it compatible with SMF 1.1 RC1?

:)
Title: Re: SimpleDownload
Post by: wizard13335 on November 08, 2005, 10:30:22 PM
Is the Downloads folder automatically created? I can't find it.
----
Also, i have 1.1 rc1 and the mod works fine.
Title: Re: SimpleDownload
Post by: Sting on November 09, 2005, 03:24:50 AM
Ok the deal with the images is a permission setting of one of the files themselves.

Make sure:

./download.php is chmoded to 755
./Sources/Downloadimg.php is chmoded to 755
./Sources/Downloads.php is chmoded to 644

And this will actually solve alot of problems people are having with various things.




Quote from: Wizard13335 on November 08, 2005, 10:30:22 PM
Is the Downloads folder automatically created? I can't find it.
----
Also, i have 1.1 rc1 and the mod works fine.

Yes and it should be found directly under your forum directory.




Quote from: Sakuragi on October 08, 2005, 10:11:48 AM
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?


did you want the guests to see the downloads or just not be able to download them if they aren't allowed access?
Title: Re: SimpleDownload
Post by: wizard13335 on November 09, 2005, 06:23:07 PM
That's strange, I can't find the folder.  I have all my forum files under www.url.com/forums. Is that where I would just create a new folder called "Downloads"? Would that solve everything? Thank you.
Title: Re: SimpleDownload
Post by: Sting on November 09, 2005, 07:09:38 PM
ya create the Downloads folder directly under the forums directory.
Title: Re: SimpleDownload
Post by: wizard13335 on November 10, 2005, 04:47:55 PM
Strange. I keep getting this error:

QuoteFatal error: Cannot redeclare isnotminusone() (previously declared in /home/kitten/public_html/forums/Sources/Load.php:1028) in /home/kitten/public_html/forums/Sources/Load.php on line 1076
Title: Re: SimpleDownload
Post by: Sting on November 10, 2005, 05:48:53 PM
Quote from: Wizard13335 on November 10, 2005, 04:47:55 PM
Strange. I keep getting this error:

QuoteFatal error: Cannot redeclare isnotminusone() (previously declared in /home/kitten/public_html/forums/Sources/Load.php:1028) in /home/kitten/public_html/forums/Sources/Load.php on line 1076

I'd have to see the code to determine what's going on. [email protected] if ya want me to take a look at it.
Title: Re: SimpleDownload
Post by: Nightstalker on November 11, 2005, 06:16:35 AM
Ok Ive installed simple downloads,I have set permissions but I stall cant get a download button to show up on the helios theme Im using.Can someone tell me how to get the button to show.

Thanks.
Title: Re: SimpleDownload
Post by: Nightstalker on November 11, 2005, 08:17:08 PM
surely someone else had this problem and knows what has to be done to fix it,please help.
Title: Re: SimpleDownload
Post by: Nightstalker on November 12, 2005, 03:56:31 PM
I got it workin,thanks guys.
Title: Re: SimpleDownload
Post by: Sting on November 17, 2005, 02:15:36 PM
Ok, I don't know if you're working on an update for this or not, but if you are in the next version could you add a description box that allows for a description, or a section that you can click on that opens a pop up for that download that gives you a description?
Title: Re: SimpleDownload
Post by: Bigguy on November 20, 2005, 03:14:15 PM
I want to uninstall this mod but when I try I get 2 errors. they are:

Themes/default/languages/Modifications.english.php Failure

Themes/default/index.template.php Failure

Can I still uninstall ??? Is this going to effect how the forum works ??? Can I take these lines out of these files with no problem.
Title: No button
Post by: tvkas on November 22, 2005, 04:24:15 PM
Not sure why but when I switch to a custom theme, I don't have the button. The theme was based on the default (which still displays the button).
When I switch to the stock themes the button is there.

What am I missing??

Other than that I love the mod.
Title: Re: No button
Post by: rider on November 22, 2005, 05:39:16 PM
Quote from: tvkas on November 22, 2005, 04:24:15 PM
Not sure why but when I switch to a custom theme, I don't have the button. The theme was based on the default (which still displays the button).
When I switch to the stock themes the button is there.

What am I missing??

Other than that I love the mod.

You'll have to add the code manully to custom themes in order to make it work.With most mods you have to do this.
Title: Re: SimpleDownload
Post by: azuregenesis on November 26, 2005, 09:46:21 AM
Quote from: Sting on November 09, 2005, 03:24:50 AM

Quote from: Sakuragi on October 08, 2005, 10:11:48 AM
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?


did you want the guests to see the downloads or just not be able to download them if they aren't allowed access?

pretty sure he doesn't want them to be able to download anything at all if they don't have access. i would too :)
Title: Re: SimpleDownload
Post by: Bigguy on November 26, 2005, 10:33:47 AM
Does anyone know the answer to this ???


Quote from: Bigguy on November 20, 2005, 03:14:15 PM
I want to uninstall this mod but when I try I get 2 errors. they are:

Themes/default/languages/Modifications.english.php Failure

Themes/default/index.template.php Failure

Can I still uninstall ??? Is this going to effect how the forum works ??? Can I take these lines out of these files with no problem.
Title: Re: SimpleDownload
Post by: daveb47 on November 30, 2005, 03:04:44 PM
Trying to install this on 1.1rc1,but getting following error

Execute Modification ./Themes/default/languages/Modifications.english.php Test failed

Cheers
Dave
Title: Re: SimpleDownload
Post by: sadiqbaig on December 15, 2005, 11:17:00 PM
mysite is running on SMF RC 1.1

10. Execute Modification ./index.php Test successful
11. Execute Modification ./Themes/default/index.template.php Test successful
12. Execute Modification ./Themes/classic/index.template.php Test successful
13. Execute Modification ./Themes/default/languages/Who.english.php Test successful

14. Execute Modification ./Themes/default/languages/Modifications.english.php Test failed

15. Execute Modification ./Themes/default/languages/Who.english.php Test successful
16. Execute Modification ./Sources/ManagePermissions.php  Test successful
Title: Re: SimpleDownload
Post by: crazystu on December 27, 2005, 04:05:40 AM
sadiqbaig you need to modify that file manually, as for some reason the Modifications.english.php is different from SMF 1.0.5 and Bigguy, yes you can still uninstall, just you need to edit the lines out of the files ;)
Title: Re: SimpleDownload
Post by: sadiqbaig on December 27, 2005, 08:29:46 AM

oh tanx 4replying

can u plz tell me which lines  i ave 2edit

n wat 2add
Title: Re: SimpleDownload
Post by: !Hachi! on December 27, 2005, 09:42:05 AM
sadiq  go to themes/default/languages/Modifications.english.php and
search for
// Version: 1.0; Modifications

Add:
$txt['permissiongroup_downloads'] = "Downloads";
$txt['cannot_view_downloads'] = "You arent allowed to view the downloads!";
$txt['permissionhelp_view_downloads'] = "Allow this if you want this group to access the downloads";
$txt['permissionname_view_downloads'] = "Can view Downloads";


i think thats all you have to do in language files
Title: Re: SimpleDownload
Post by: bbpiper on January 03, 2006, 05:57:55 PM
Anyone planning to update this for 1.1 RC2??

I tried to make it work but could not with the new default theme , could not get the tabs to work with it.

Title: Re: SimpleDownload
Post by: BHashman on January 10, 2006, 08:50:34 PM
IIS 6.0 on W2003 server.  MySQL5.  PHP5. RC2 and SimpleDownload -
SMF RC2.  I just started using this for a company Intranet - not posted to the web yet.
Working in IE6.

With the old code all I got was "Hacking Attempt..." when clicking on the files in the Downloads window.  But I got it to work after changing the download.php file that is located in the root forum directory.

The download.php file uses the $HTTP_GET_VARS statement to get the directory and filename.  There are some posts out there that warn not to use $HTTP_GET_VARS but instead use $_GET to retrieve variables.  This has something to do with global variables and security that was invoked in PHP 4.

See here for an example:
http://www.gossamer-threads.com/forum/Gossamer_Links_C5/Products_C5/PHP_Front_End_F27/$HTTP_GET_VARS_not_working_P277939/

Thus I modified the download.php file to read as follows:


<?php
// SimpleDownload 1.1.1 Hide Download Location
// By Nesianstyles

// Edited by BHashman 060110 - changed $HTTP_GET_VARS to $_GET which is I guess is a newer safer method to set variables with the register_globals set to off.  This is the default setting for the register_globals in PHP after version 4.2.0.


$rurl = "Downloads/";

$durl = $rurl.$_GET['d'].'/'.$_GET['name'];

if (
$_GET['name'])  {
header('location: '.$durl.'');
echo'
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="refresh" content="0; url=index.php?action=downloads&amp;d='
.$_GET['d'].'" />
<title></title>
</head>
<body>
</body>
</html>'
;
} else {
echo 'Hacking Attempt...<br />';
}

?>


The resulting behavior:
When you click on a link in the downloads folder it displays the file in the browser.
Zip files will download automatically and open up the archive
If you right click - you can "Save Target As" and you are downloading the file.

Other items:
When installing this mod on RC2 the Downloads dir was not automatically created.  So you need to copy the Downloads dir and the contents of it (the .htaccess file) from the \Packages\temp dir after the install completes.

Also I don't see the downloads button displayed on the forum in RC2.  But you can get to the downloads dir by adding this line to the end of the address in your browser when you are at the forum index.  add everything inside the quotes "?action=downloads"

for example mine looks like this:  .../index.php?action=downloads

If you can get to the dir that way then the install did happen inside of RC2. 

Now to look at adding the downloads area to the tabbed section of RC2.  Prolly something to do the with index.template.php?  more on that later...
Title: Re: SimpleDownload
Post by: BHashman on January 11, 2006, 02:09:00 PM
OK - this morning I got the downloads tab to show up on the main forum index.  This takes a few modifications in the php files.  So consider this as an advanced level topic.

Backup your database before starting!  No kidding!  SMF makes this so easy to do there is no reason not to do so!

Files modified:
\Sources\Subs.php
\Themes\default\index.template.php
\Themes\default\languages\index.english.php

Open index.english.php
Scroll all the way to the bottom and paste the following

// Added for simple download
$txt['downloads'] = 'Downloads';
// Added for simple download


Save and close

Open Subs.php
Scroll down to line 3088 or search for this text

$context['allow_memberlist'] = allowedTo('view_mlist');


After that line paste the following


//  added for simple download
$context['allow_downloads'] = AllowedTo('view_downloads');
//  added for simple download



Save and close

Open index.template.php
Scroll down to line 551 or search for this text

// If the user is a guest, show [login] button.


BEFORE this line paste in the following

//  added for simple download
// the [download]!
if ($context['allow_downloads'])
echo ($current_action == 'downloads' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'downloads' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=downloads">' , $txt['downloads'] , '</a>
</td>' , $current_action == 'downloads' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';
//  added for simple download



Save and close all files.  Refresh your browser.

If you are logged in as a Admin you will see the downloads button just to the right of the members button.

Now to test and set permissions.  I created a normal user account for testing.  With MIB in mind good old Zed seemed like a nice name for this guy. 

After creating a user account I can assign him to a group that has permissions to view the Downloads page.  To assign which groups have permissions to see the downloads page goto your admin panel...  and select "permissions" under the Members heading.  Select the "Modify" button on the group you want to grant access to see the downloads page.  You should see a choice titled "Can view Downloads".  Check the checkbox and save (you have to scroll all the way down to the bottom to find the save button).  Now anyone in that usergroup will have permission and see the Downloads tab on the forum index and their other pages.

Hope this helps!




Title: Re: SimpleDownload
Post by: Ne0z on January 17, 2006, 04:14:12 AM
is it possible to limit the downloads of each files ? the download link for each file exists and i could still download the file even though i was logged out as long i had the link. any ideas how to solve this issue ?
Title: Re: SimpleDownload
Post by: crazystu on January 17, 2006, 03:20:29 PM
Quote from: BHashman on January 10, 2006, 08:50:34 PM
IIS 6.0 on W2003 server.  MySQL5.  PHP5. RC2 and SimpleDownload -
SMF RC2.  I just started using this for a company Intranet - not posted to the web yet.
Working in IE6.

With the old code all I got was "Hacking Attempt..." when clicking on the files in the Downloads window.  But I got it to work after changing the download.php file that is located in the root forum directory.

The download.php file uses the $HTTP_GET_VARS statement to get the directory and filename.  There are some posts out there that warn not to use $HTTP_GET_VARS but instead use $_GET to retrieve variables.  This has something to do with global variables and security that was invoked in PHP 4.

See here for an example:
http://www.gossamer-threads.com/forum/Gossamer_Links_C5/Products_C5/PHP_Front_End_F27/$HTTP_GET_VARS_not_working_P277939/

Thus I modified the download.php file to read as follows:


<?php
// SimpleDownload 1.1.1 Hide Download Location
// By Nesianstyles

// Edited by BHashman 060110 - changed $HTTP_GET_VARS to $_GET which is I guess is a newer safer method to set variables with the register_globals set to off.  This is the default setting for the register_globals in PHP after version 4.2.0.


$rurl = "Downloads/";

$durl = $rurl.$_GET['d'].'/'.$_GET['name'];

if (
$_GET['name'])  {
header('location: '.$durl.'');
echo'
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="refresh" content="0; url=index.php?action=downloads&amp;d='
.$_GET['d'].'" />
<title></title>
</head>
<body>
</body>
</html>'
;
} else {
echo 'Hacking Attempt...<br />';
}

?>


The resulting behavior:
When you click on a link in the downloads folder it displays the file in the browser.
Zip files will download automatically and open up the archive
If you right click - you can "Save Target As" and you are downloading the file.

Other items:
When installing this mod on RC2 the Downloads dir was not automatically created.  So you need to copy the Downloads dir and the contents of it (the .htaccess file) from the \Packages\temp dir after the install completes.

Also I don't see the downloads button displayed on the forum in RC2.  But you can get to the downloads dir by adding this line to the end of the address in your browser when you are at the forum index.  add everything inside the quotes "?action=downloads"

for example mine looks like this:  .../index.php?action=downloads

If you can get to the dir that way then the install did happen inside of RC2. 

Now to look at adding the downloads area to the tabbed section of RC2.  Prolly something to do the with index.template.php?  more on that later...
That download.php issue was solved a while ago, I showed someone else on my site. All it does is change the varibles from using the long and old method to the short and new method. If you do that, it works exactly like the old one.

This Mod is for 1.0.5, and it hasn't been updated for 1.1rc2 yet.
I have allot of themes I need to update first.

EDIT: Please post on my forum here (http://dev.nsf.mher.org) instead of posting in this topic as I don't look here very much but I check my forums everyday.
Title: Re: SimpleDownload
Post by: SunBlind on January 29, 2006, 08:10:59 PM
What's up with the cryptic image variables? Is there any way to change the file icons?
Title: Re: SimpleDownload
Post by: Elrond on February 10, 2006, 03:57:11 PM
I'm wondering about the same thing here. I think it is the actual txt-based code for the images themselves. Not too sure on this though. Seems the images are created right within the code.
Title: Re: SimpleDownload
Post by: SunBlind on February 10, 2006, 09:12:36 PM
Craziness.
Title: Re: SimpleDownload
Post by: Tyegurl on March 13, 2006, 12:00:32 AM
okay couldn't get it to work and i did everything you told me to lol....can you help me?
Title: Almost GOLD
Post by: andriyko on March 14, 2006, 05:16:06 PM
Man, if this had an option for regular mortals to upload files from the forum, this mod would be GOLD. As most of my users are computer illiterate no one knows how to use ftp.. even with all the help i've posted.

So... I was wandering if ANYONE could direct me how I would go about adding some functionality like that to this mod (i.e. UPLOAD option/button). The problem is that I only want the members to be able to upload.
Thnx if anyone helps!
you can also email me directly at drozzy (eeht) gmail.com
Title: Re: SimpleDownload
Post by: Jessie~chan on March 14, 2006, 08:23:30 PM
Hi, I'm trying to install SimpleDownload for my forum but I get this error:

QuoteHacking Attempt...

How do I fix that?
Title: Re: SimpleDownload
Post by: andriyko on March 24, 2006, 04:45:41 AM
Bump...  8) Sorry but could anyone help out?
...with getting some kind of upload script going with this mod?
Thank you!
Title: Re: SimpleDownload
Post by: bodycount on April 09, 2006, 01:33:22 PM
Hi

I'm trying to get this mod working on my site but the auto install for the mod failed when trying to access

index.php
index.template.php

I added code to the index.template that calls the action  for downloads and then added the following to the forum/index.php file


                'dlattach' => array('Display.php', 'Download'),

-->           'download' => array('Downloads.php', 'Downloads'),        <--

                'dumpdb' => array('DumpDatabase.php', 'DumpDatabase2'),


                'editagreement' => array('Admin.php', 'EditAgreement'),


This seems to work upto a point, it allows users to download from the downloads directory but if they click on a sub directoy they just default back to the main forum page.

I think the problem is that when they click on the subdirectory the page call is
.... index.php?action=downloads&d .... etc..

If I type in the same command but with .... index.php?action=download&d .... the command works

Can anyone tell me how to rectify this have I missed something from the forum/index.php file that is required ?
Title: Re: SimpleDownload
Post by: Yellowrose on May 07, 2006, 03:48:35 AM
I am currently using SMF ver 1.0.7 and would like to incorporate a  downloads section to my site.

The site is a downloads directory that allows visitors and members to search for available user created game content. Some of the older fansites have closed their sites and i would like to be able to make the files available again. will this version of Simple Download work for me ?
Title: Re: SimpleDownload
Post by: DemonicInfluence on May 07, 2006, 05:48:18 PM
Yes..
Title: Re: SimpleDownload
Post by: Yellowrose on May 09, 2006, 10:01:55 PM
Thank you for your reply.

Got the mod installed with created directories and it is working great. You help is very much appreciated.
Title: Re: SimpleDownload
Post by: Yellowrose on May 25, 2006, 12:00:09 PM
As in my last post I got the mod installed and it works great on the default themes but I wiuld like to go back to using Mystica's Loon Turquoise theme I had been using before installing the mod. I know there are php files to be manually edited but have no idea what gets edited or where in these files. I would greatly appreciate it if someone could point me in the right direction so I can do the needed editing and get my previous theme working on my site again.
Title: Re: SimpleDownload
Post by: Flying Drupalist on May 25, 2006, 10:01:29 PM
Are there any possibilities of re-release for RC2? Thanks!
Title: Re: SimpleDownload
Post by: Soultaker Spirit on May 29, 2006, 06:23:28 PM
yes i installed the simple download and did everythin step by step of adding the codes like in the instructions there. but the buttons do not still show up. how can i fix that or when is the new simple download comin out
Title: Re: SimpleDownload
Post by: WarBirD on June 05, 2006, 06:17:45 PM
Why not simply make a Version compatible with RC2 for people who are not so skilled with changing all that code stuff. I would appreciate a simple update of this Mod for RC2. ;)

I love when you guys talk about all the code stuff here ;) but due to too less experience with that stuff, its sometimes just easier to have a updated Version of Mods when a new Release of SMF is coming. Hope noone is offended because of this oppinion.
Title: Re: SimpleDownload
Post by: Herman's Mixen on June 29, 2006, 07:40:04 AM
There is !!
its the same thing only i converted the mod for 1.1RC2 forum software it can been found here
http://mods.simplemachines.org/index.php?mod=267
Title: Re: SimpleDownload
Post by: gtron on July 22, 2006, 12:50:13 PM
still not sure how to enable this

no button after install  :-[
Title: Re: SimpleDownload
Post by: Bigguy on July 22, 2006, 02:33:15 PM
You`ll have to manually place the button.
Title: Re: SimpleDownload
Post by: gtron on July 22, 2006, 09:06:04 PM
Quote from: Bigguy on July 22, 2006, 02:33:15 PM
You`ll have to manually place the button.

i do that in themes template or something?

i tried to manually enter the link 'index.php?action=downloads' but nothing seems to happen

sux... i really want this.
Title: Re: SimpleDownload
Post by: PrizeLive.com on July 22, 2006, 10:30:13 PM
Quote from: The Burglar! on June 29, 2006, 07:40:04 AM
There is !!
its the same thing only i converted the mod for 1.1RC2 forum software it can been found here
http://mods.simplemachines.org/index.php?mod=267

What does this mod do exactly?
Title: Re: SimpleDownload
Post by: Bigguy on July 22, 2006, 10:42:25 PM
Creates a download page.
Title: Re: SimpleDownload
Post by: gtron on July 24, 2006, 02:13:07 PM
how do i get this to work with other themes? any help would be great!!!
Title: Re: SimpleDownload
Post by: Bigguy on July 24, 2006, 04:40:06 PM
You have to manually install the code to the template files of the theme u wanna use. Check the .xml file of the mod for the code used.
Title: Re: SimpleDownload
Post by: Xarcell on November 06, 2006, 12:32:29 AM
Any chance you can add a permission setting to allow uploads?

or post it here how to and I can try and add it myself.
Title: Re: SimpleDownload
Post by: hellodhaka on December 08, 2006, 04:48:06 PM
Hi guys, i've installed SimpleDownload and its working fine at my end... but the problem is my users couldn't access the files. It says, "you aren't allowed to view the downloads." But by default i want all of my users to be able to download the stuffs i put in the download folder.

Any suggestion what to do??
Title: Re: SimpleDownload
Post by: Bigguy on December 08, 2006, 05:45:07 PM
Are thier permissions to set that you have overlooked. ;)
Title: Re: SimpleDownload
Post by: hellodhaka on December 09, 2006, 12:28:13 AM
Exactly man... found it!
It adds a new radio button in the "Edit Permissions" section.
Thanks!
Title: Re: SimpleDownload
Post by: devilkin on January 22, 2007, 02:53:24 AM
Is this mod compatible with 1.1.x?
Title: Re: SimpleDownload
Post by: Troja on July 21, 2007, 09:48:33 AM
Quote from: Bigguy on July 22, 2006, 02:33:15 PM
You`ll have to manually place the button.

How can I instal checkbox for the download mod? I find since no check box under admin - feature and Options

I Have SMF 1.1.3
Title: Re: SimpleDownload
Post by: Minare on September 13, 2007, 05:55:05 AM
Will anyone develop this mod ?  :)
Title: Re: SimpleDownload
Post by: Herman's Mixen on September 13, 2007, 09:25:38 AM
look at these i develop the 1.1.x version can be found here

http://custom.simplemachines.org/mods/index.php?mod=267
Title: Re: SimpleDownload
Post by: Herman's Mixen on September 13, 2007, 09:26:47 AM
Quote from: Troja on July 21, 2007, 09:48:33 AM
Quote from: Bigguy on July 22, 2006, 02:33:15 PM
You`ll have to manually place the button.

How can I instal checkbox for the download mod? I find since no check box under admin - feature and Options

I Have SMF 1.1.3

you find a checkbox under membergroup permissions
Title: Re: SimpleDownload
Post by: Flypside on March 05, 2011, 11:09:28 AM

Someone edit this modifications for 2.0 RC4  please?

I decided but not work completely.
Title: Re: SimpleDownload
Post by: Ashley S on March 05, 2011, 11:13:44 AM
Quote from: Flypside on March 05, 2011, 11:09:28 AM

Someone edit this modifications for 2.0 RC4  please?

I decided but not work completely.

You just bumped a 3-4 year old topic, This modification is outdated meaning the Author doesn't deal with this Modification anymore.
Title: Re: SimpleDownload
Post by: NanoSector on March 05, 2011, 11:14:08 AM
Quote from: Flypside on March 05, 2011, 11:09:28 AM

Someone edit this modifications for 2.0 RC4  please?

I decided but not work completely.
This mod is for the SMF 1.0.x series, so no.

And why bump a topic this old?
Title: Re: SimpleDownload
Post by: Flypside on March 05, 2011, 11:19:40 AM

Some websites use this modification on 2.0 now,I want to install this mod my forum.I think its not difficult to integrate 2.0.
Title: Re: SimpleDownload
Post by: NanoSector on March 05, 2011, 11:24:18 AM
Quote from: Flypside on March 05, 2011, 11:19:40 AM

Some websites use this modification on 2.0 now,I want to install this mod my forum.I think its not difficult to integrate 2.0.
Quote from: Ashley S on March 05, 2011, 11:13:44 AM
This modification is outdated meaning the Author doesn't deal with this Modification anymore.
Title: Re: SimpleDownload
Post by: Flypside on March 05, 2011, 11:32:52 AM

Only Author must integrate ? You or other people share manuel modification this mod.?
Title: Re: SimpleDownload
Post by: NanoSector on March 05, 2011, 12:20:02 PM
Quote from: Flypside on March 05, 2011, 11:32:52 AM

Only Author must integrate ? You or other people share manuel modification this mod.?
We will not update a mod that has not been worked on since 2007.
Title: Re: SimpleDownload
Post by: Herman's Mixen on March 07, 2011, 05:43:29 AM
I did the SMF 1.1 upgrade of this mod it can be found here http://custom.simplemachines.org/mods/index.php?mod=267 and here is en old post how you can do this workaround for SMF 2.0 RC1 maybe needs a little modified http://www.simplemachines.org/community/index.php?topic=75895.msg2034386#msg2034386

coz i dont have time to do an upgrade for this atm !!
Title: Re: SimpleDownload
Post by: Flypside on March 08, 2011, 06:16:42 AM
Quote from: The Burglar! on March 07, 2011, 05:43:29 AM
I did the SMF 1.1 upgrade of this mod it can be found here http://custom.simplemachines.org/mods/index.php?mod=267 and here is en old post how you can do this workaround for SMF 2.0 RC1 maybe needs a little modified http://www.simplemachines.org/community/index.php?topic=75895.msg2034386#msg2034386

coz i dont have time to do an upgrade for this atm !!

thanks now working but how can ı add the download
Title: Re: SimpleDownload
Post by: NanoSector on March 08, 2011, 10:04:34 AM
Quote from: Flypside on March 08, 2011, 06:16:42 AM
Quote from: The Burglar! on March 07, 2011, 05:43:29 AM
I did the SMF 1.1 upgrade of this mod it can be found here http://custom.simplemachines.org/mods/index.php?mod=267 and here is en old post how you can do this workaround for SMF 2.0 RC1 maybe needs a little modified http://www.simplemachines.org/community/index.php?topic=75895.msg2034386#msg2034386

coz i dont have time to do an upgrade for this atm !!

thanks now working but how can ı add the download
Package Manager (http://docs.simplemachines.org/index.php?board=49.0;sort=subject)
Title: Re: SimpleDownload
Post by: Flypside on March 08, 2011, 10:34:49 AM
Quote from: Yoshi2889 on March 08, 2011, 10:04:34 AM
thanks now working but how can ı add the download
Package Manager (http://docs.simplemachines.org/index.php?board=49.0;sort=subject)

You don't understand,

I install successfully this modification but I can't find add download page in this mod.
Title: Re: SimpleDownload
Post by: NanoSector on March 08, 2011, 12:11:56 PM
Quote from: Flypside on March 08, 2011, 10:34:49 AM
Quote from: Yoshi2889 on March 08, 2011, 10:04:34 AM
thanks now working but how can ı add the download
Package Manager (http://docs.simplemachines.org/index.php?board=49.0;sort=subject)

You don't understand,

I install successfully this modification but I can't find add download page in this mod.
I thought you meant like "how do I upload it to the package manager".

But I never used this mod so I cannot help you.
Title: Re: SimpleDownload
Post by: Herman's Mixen on March 08, 2011, 12:56:53 PM
Quote from: Flypside on March 08, 2011, 06:16:42 AM
thanks now working but how can ı add the download

Use FTP to create categories/folders inside the $forum_root/Downloads folder

example

httpdocs/forum/Downloads/cat1 will act as a category named cat1 in your downloads page ?action=downloads
add files to cat1 category just use your FTP prog to add them *.zip *.tar.gz *.doc *.pdf etc.. etc..

This is a simple download system so it dont use any DB backend for adding files/folders  ;)
Title: Re: SimpleDownload
Post by: Flypside on March 08, 2011, 01:15:46 PM
Quote from: The Burglar! on March 08, 2011, 12:56:53 PM
Quote from: Flypside on March 08, 2011, 06:16:42 AM
thanks now working but how can ı add the download

Use FTP to create categories/folders inside the $forum_root/Downloads folder

example

httpdocs/forum/Downloads/cat1 will act as a category named cat1 in your downloads page ?action=downloads
add files to cat1 category just use your FTP prog to add them *.zip *.tar.gz *.doc *.pdf etc.. etc..

This is a simple download system so it dont use any DB backend for adding files/folders  ;)

Ok I know now,so thanks :)
Title: Re: SimpleDownload
Post by: AllMassive on December 29, 2017, 07:31:49 PM
I'm searching for a 'simple way' to serve a local-www-folder inside the forum.
Does this still work ?