Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Download System

Started by Team, October 31, 2007, 06:55:37 PM

Previous topic - Next topic



I´m testing download system at the moment.
I have the problem that the download works but if the download is a pdf-file the file opens in the same window. Secondary the original file link (e.g. [nonactive]) appers in the browser window.
Is this a feature or a bug? I would expect that the file could only be downloaded (via php header function), so I don´t need for pdf files such a download system cause I can publish the original link.
Is the a possibilty to add a preview screenshot?


Quote from: Eleaz on November 18, 2007, 02:55:55 AM
Hi, first of all, awesome mod!

I was wondering if it would be able to input html codes/javascript into the description of the items up for download.
Whenever i add a streaming video link, it turns out all gibberish, how can i make this work ?

PS: I want to add a streaming window in the description for the items. Thanks a lot!


@TS or vbgamer

I now have all checkboxes showing up in permissions and everything is working okay apart from the fact that unless you are an admin then you cannot view the downloads.

I have been through all the affected files and double checked with SMFparser and as far as I can tell then it should be allowing permissions.

I am now at a loss as to what could be causing this.

Any ideas?


@ Crankie Yankee

Have a look in ACP> Downloads Configuration and you will see the paths settings and be able to change them if needed (shouldn't be needed in normal use but it's there just in case)...also then go through all the configuration options and see if they match your needs and double check the Approve Downloads and Category Permission List tabs at the top of the settings page.

@ Sic0

Try something for me please...make a brand new test forum with no other mods etc and apply this mod to it...see if it works in that. If it does that will tell us that your hosting isn't the problem...if not then we get a rather strong hint to the nature of the difficulty.

Like Crankie Yankee please check the mod settings and also on both your main forum and the new test one please do the following (before adding the mod would be best)...

You need to go to ACP>Server Settings and set your forum language to English and not English utf8 and to ACP>Features and Options>Basic Settings and uncheck Enable user-selectable language support.

You need to go to ACP>Packages>Options>Installation Options and set the fields according to your hosting details then on the same page go to Cleanup Permissions and select All files Writeable and run the cleanup...check via ftp that CHMOD of all your files is now 777 or 775 according to the peculiarities of your hosting and if not recheck the settings you made in Installation Options and run the cleanup again...continue as needed until you get the right settings.


@ TS


I tried the cleanup routine and now I have no access to my forum :(


It sounds as though your forum files may be in that peculiar condition known as "a right mess".

Out of interest via ftp are your files now CHMOD 777 or 775?

Worst case you can restore from backup presuming you did as you always should and made regular backups of files and database...if not you might need to get the latest SMF install package and overwrite (via ftp) all files and directories that it duplicates with fresh copies taken from that for your Attachments directory and your Settings.php and Settings_bak.php files in your forum root...this would give you your database intact but with a clean set of files running it...from then you could add back in your mods etc.

N.B. remember to do backup of both files and database...SMF do advise this before adding or removing any mods or themes or edits.

I tend to think that your files were probably the root cause of these problems and had issues in them before you started work on this mod...that would explain the problems you have had including this last one.

The file cleanup being a standard feature in SMF is entirely safe in normal circumstances and with undamaged files and a hosting that is set up can assume that one, or both, of these provisos explains the failure.


Thanks for the quick response. I will go through everything again. The site worked flawlessly and no errors before I tried that last bit though.

Oh well   no doubt I will be posting soon.

Many thanks


Okey Dokey....after that little scare... I have managed to access my forum once again which is a relief.

The files are showing as having 755 permissions which is okay for the other mods Ihave installed.

Is this one any different or should that be ok?

I really do appreciate your comments TrueSatan and you are very concise with your input.



I try...BTW SMF do ask those of us who provide help to be concise so take that as a given. 755 is fine and is quite normal...some hosting sets to 777 which is a tad more open but either will work.

Crankie Yankee

All problems solved except for one minor problem with the 'buy me a beer' modification. I'm confident it will be solved ASAP. Other than that minor problem all systems are a go. Thanks to all for your help!  :D


Thank you for your help TrueSatan & vbgamer.

It is now working fine and is ideal for my board members.

As a little aside:
I particularly like the way that it makes a post when an upload has been added and I was wondering if this would be possible with the SMF Gallery mod.


Just a quick question before I install this mod (especially vb's!)

let's be honest.  If you open up this feature then most likely it'll be illegal downloads, such as mp3's and etc...  Now, let's assume this is the case for your forum and would u really get in legal issues? heck~ I don't mind doing this for my members~~~ but I don't want to goto jail for it.

Also, if you're using this feature for something else, please let us know!


I use this mod for completely legal distribution of extensions and other code so, yes, there are legal uses for it and it is so used.

As for asking about the chances of getting caught breaking laws via use of this advice...don't break those laws and you will have no chance of getting caught.


i have a problem:

QuoteFatal error: Call to undefined function: db_query() in /home/.turd/ziomekdjpl/ on line 20

any suggestion?


What were the circumstances when this error occured...had you installed the mod using the SMF Package Manager?


ok now everything work:)
but can i upload file with download system to another server? i have forum on server with small andwitch and i want to keep files from download server on another server


Quote from: TrueSatan on November 23, 2007, 04:27:44 PM
I use this mod for completely legal distribution of extensions and other code so, yes, there are legal uses for it and it is so used.

As for asking about the chances of getting caught breaking laws via use of this advice...don't break those laws and you will have no chance of getting caught.

That's perfect for this plugin.  But, I really wonder how serious the law is.  Take for example youtube, stage6, imeem, and many other site that contains copyright materials.  I didn't see anyone of them going to jail except making $$$ Yes, I know that they are "deleting" copyright materials as they monitor it but we all know they will ALWAYS have illegal downloads/views and chances are most viewers are searching for illegal materials.  With that said, am I going to the jail because some members uploaded copyright mp3's? or do I have to report them? of course, I will put a warning "Do not upload illegal / copyright materials" but I know that'll be ignored like a beggar on a street. 


Well, let's just say I want to know the response of this question.

"Is it web master's fault?  If an user uploads illegal materials, after acknowledging uploading illegal material is not allowed"

follow up question.

"Is it web master's job to monitor every single uploaded file? or do I just monitor the one's that has been reported by a member?" (I think this is probably how youtube and other site does)


The situation is very murky...for instance the jurisdiction that a company such as Youtube is registered in will affect the laws governing it so that has a bearing on the matter. Your host will also be governed by a legislative system set by its physical location. Most hosts make it clear that if you allow your site to be used to host illegal items action (often unspecified) can/will be taken against you as the site owner. Perhaps they'd just delete your sites but they could do a great deal more.

There isn't a hard and fast answer to your question and I'd be silly to try to provide one...also the big companies have very good in-house lawyers to defend their actions...I don't and doubt that you do either...and BTW those big sites are somewhat proactive in deleting at least some of the illegal uploaded content before complaints are made.

I would suggest that any site, big or small, would do well to show that "best endeavours" were being made to remove illegal content and to prevent it  being there in the first place...the extent and effectiveness of these "best endeavours" would be a movable feast.

The safe way has to be to monitor each uploaded file and take action as needed as soon as you can and to thus put yourself in a position where you can reasonably show and claim to have done all you could be expected to do and to have done.


quick question before i test this.

Can we upload a file from a url? (like how you can import an avatar from a url for instance)

or have a file located on the server (just a link to it on the download page) but require users to be registered to download the file?

thanks :)