TinyPortal

Development => Block Codes => Topic started by: Dragooon on September 28, 2007, 11:46:53 AM

Title: Download Manager's Download item permission [Now updated for TP 1!]
Post by: Dragooon on September 28, 2007, 11:46:53 AM
Version 1.1 is Out! It fixed many errors and bug from 1.0, and is much better. The major bug has been fixed, due to which 1.0 was taken of.



Author : Dragooon
Version : 1.1
Name : TP Downloads Download item permission



This will add a Permission, weather to let users download a file or not. Which can be accessed via
Admin > Permissions > <membergroup> > "Download item". This does NOT determine weather to show the item or not.

Automatically installs on every theme.

This is a package manager mod which simply can be installed via Package manager.

Note:By default this is disabled for everyone else than Admin, Don't forget to enable it
Note:Make sure to uninstall this before you Upgrade/Uninstall TP



Tested with:
TP 0.9.8
SMF 1.1.3, 1.1.4
SMF Default Theme - Core.

Changelog

Version 1.1

Version 1.0


File Attached, Must be logged in to download the file.


If you find any errors, bugs or have any questions feel free to post here.

2nd April 08 - TP_DL_Download_permission-v1.1-TPv1.zip is the file for TinyPortal 1.0 Beta, the other file is for TP 0.9.8.3

Thank you :)
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Dragooon on October 01, 2007, 10:04:40 AM
Updated!
Version 1.1 is out!
Major fixed fixed due to which 1.0 was taken of.
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Neorics on October 01, 2007, 04:16:34 PM
yeah... works great... good mod if you want your guest be able to view the download section but not let them download unless they log in
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Dragooon on October 01, 2007, 04:30:58 PM
Its not only guest, It is a member group permission.
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Daomaster on October 04, 2007, 03:50:53 PM
Is there a possibility to show a text if a guest wants to downlaod something. At my homepage guests only see the frame when they try to downlaod something, but no error message or something like this.
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Dragooon on October 04, 2007, 05:50:06 PM
What you mean by "Text message"?
If a user is not allowed it is redirected to a new page showing a message.
If you want to show something like "You are not allowed to download the file" under the download's description I'll work on it. It wont be that hard.
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Daomaster on October 05, 2007, 03:49:13 PM
Quote from: Dragooon on October 04, 2007, 05:50:06 PM
If a user is not allowed it is redirected to a new page showing a message.

No, at my Homepage http://www.DaOmAsTeR there's no error message if somebody try to download something...
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Dragooon on October 05, 2007, 04:30:32 PM
Perhaps give the domain extension to?
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Daomaster on October 05, 2007, 05:03:19 PM
???
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Dragooon on October 05, 2007, 05:08:32 PM
http://www.DaOmAsTeR I dont think is the domain.,
Where is .com, .net or whatever?
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Daomaster on October 05, 2007, 05:24:49 PM
Sorry, www.DaOmAsTeR.de
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Dragooon on October 05, 2007, 05:27:39 PM
I see,
What forum language are you using? Make sure it is English not English-utf8. See admin > Server Settings.
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Dragooon on October 05, 2007, 05:30:28 PM
Or copy
// TP Dl Failed strings....
$txt['tpdl_failed_error'] = 'An error has occurred with the download you requested. Please try clearing your browser\'s cache and then try downloading the file. If this does not work, contact forum\'s administrator. ';
$txt['tpdl_failed_title'] = 'Download access denied';
$txt['tpdl_failed'] = 'Sorry, but You don\'t have the permission to download files from the download section.';
$txt['permissionname_tp_dldownload'] = 'Download items';
$txt['permissionhelp_tp_dldownload'] = 'Weather allow to download the item or not. This wont determine weather to allow view the item or not.';

Before the ?> In your Modifications.english-utf8.php in /Themes/default/languages.
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Daomaster on October 05, 2007, 05:58:03 PM
I'm not using UTF8. My Modificatiosn.english.php is correct...
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Dragooon on October 05, 2007, 06:13:44 PM
Ok after going deeper I found your theme has a Modifications.english.php in its languages folder (See /Themes/Themename/languages). Copy the Modifications.english.php from Default language directory and paste it there.
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Daomaster on October 05, 2007, 06:54:06 PM
Perfect, its working. Thank you..
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Dragooon on October 05, 2007, 07:00:12 PM
Great :).
Hope you like it.
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Daomaster on October 05, 2007, 07:02:18 PM
Yeah it's cool, but now i get the message:
!!Attention of pdx-dk theme:

You should put "Modifications.english.php" on the "languages" directory ( http://daomaster.da.ohost.de/Themes/PDX-DK/languages/ ) in the theme of pdx-dk.

Copy "Modifications.english.php" of the "languages" directory of PDX-DK onto the first. Next, rename it according to the language for which you use the file.


But everythings right!!
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Dragooon on October 06, 2007, 03:42:09 AM
Thats much of a Theme functioning.
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Dragooon on October 15, 2007, 12:32:06 PM
No one liked it? 0.o
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: netridge on January 04, 2008, 04:59:04 AM
So you have to created a membergroup like "Guests" to apply this mod?
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Dragooon on January 04, 2008, 05:00:59 AM
No, Go to Admin > Permissions and there under "Tinyportal Downloads" will be a new permission "Download Item".
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: netridge on January 04, 2008, 05:08:33 AM
Ok, you know there is something weird, I see the box that I need to check but there is not text next to it?
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Dragooon on January 04, 2008, 05:10:15 AM
Whats your forum's language? Probably the language strings are not there.
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: netridge on January 04, 2008, 05:11:54 AM
it;s set to english
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Dragooon on January 04, 2008, 05:13:24 AM
English or English-utf8?
Check in your Admin > Server settings
If it is UTF8, set it to English plain
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: netridge on January 04, 2008, 05:26:54 AM
hmm... its set to plain english.
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Dragooon on January 04, 2008, 05:35:53 AM
Does your theme also have a Modifications.english.php in its languages folder? If so copy/paste its strings before the files "?>".
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Smythe on January 10, 2008, 02:24:52 PM
awesome mod, works great.
Title: Re: [Updated on 1 Oct] Download Manager's Download item permission [Mod!]
Post by: Dragooon on January 11, 2008, 04:08:20 AM
Thanks :)
Title: Re: Download Manager's Download item permission [Now updated for TP 1!]
Post by: Dragooon on April 02, 2008, 01:14:47 PM
A File for TP 1 attached!
Title: Re: Download Manager's Download item permission [Now updated for TP 1!]
Post by: Daomaster on April 06, 2008, 02:20:57 PM
Hello
I habe a problem:
I'm using TP 1.0 and your mod.
With Opera, i can't download anything while your mod is activated. opera downloads a ".htm" instead of the file. when i turn off the mod it works fine.
thx
Title: Re: Download Manager's Download item permission [Now updated for TP 1!]
Post by: Dragooon on April 10, 2008, 11:25:50 AM
.htm file?
Are you sure you used THIS mod only?
Title: Re: Download Manager's Download item permission [Now updated for TP 1!]
Post by: Daomaster on April 10, 2008, 02:06:21 PM
Yes i've used only this mod...
In IE it works perfectly, and in opera only if you're not logged in.
But if you're logged in and use opera it downloads a .htm
Title: Re: Download Manager's Download item permission [Now updated for TP 1!]
Post by: Dragooon on April 12, 2008, 06:01:22 AM
Can I have a link to the site and a demo acount?
Title: Re: Download Manager's Download item permission [Now updated for TP 1!]
Post by: Daomaster on April 14, 2008, 05:07:52 PM
Yes you can...
I will send you per PM
Title: Re: Download Manager's Download item permission [Now updated for TP 1!]
Post by: NIBOGO on September 27, 2008, 06:47:15 PM
Another great mod for this great coder , thanks ^^