News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Attachments Download Permission

Started by JayBachatero, August 01, 2006, 11:01:33 PM

Previous topic - Next topic

tsmalmbe

Here's the version of the mod that allows you to define the full matrix as explained above.

..:: http://www.kontrollrummet.com - Studio och musik ::.. RSS?

joojoohe

I'm using smf 1.1.2
I have this error.... >:( >:(
Somebody can help me please?   

flickernever

Does this mod work with MP3 files and 1.1.4? I mean, would it do the same as with images: ask the user if he wants to download or to listen only.

TrueSatan

It is probable (haven't tested it) that the mod will work with SMF 1.1.4 however it has nothing at all to do with playing MP3 files and thus cannot do any more than treat such a file as a simple attachment.

flickernever

Quote from: TrueSatan on January 25, 2008, 08:45:36 AM
It is probable (haven't tested it) that the mod will work with SMF 1.1.4 however it has nothing at all to do with playing MP3 files and thus cannot do any more than treat such a file as a simple attachment.

Yes, but if the browser trys to open a MP3 player he will most likely play it, using an external player or something like that. What is the default action for opening a MP3 file by web browsers?

TrueSatan

To play an MP3 file offered as an attachment the user would have to fully download the file...the file would not be treated as a streaming music source...there is a mod that can offer you such a service:

http://custom.simplemachines.org/mods/index.php?mod=121

You can't open a non streaming MP3 (or other media) file without downloading it.

flickernever

Quote from: TrueSatan on January 25, 2008, 09:02:38 PM<br />To play an MP3 file offered as an attachment the user would have to fully download the file...the file would not be treated as a streaming music source...there is a mod that can offer you such a service:<br /><br /><a href="http://custom.simplemachines.org/mods/index.php?mod=121" class="bbc_link new_win" target="_blank">http://custom.simplemachines.org/mods/index.php?mod=121</a><br /><br /> You can't open a non streaming MP3 (or other media) file without downloading it.<br />

Ok, I understand. Now I am trying to do what I want in a different way using Pierre MP3 flash player Mod. Just have to figure out a way to disable the flash player to guests. Thanks for your interest and link.

Eddy Matthews

Quote from: tsmalmbe on March 26, 2007, 05:28:27 PM
Here's the version of the mod that allows you to define the full matrix as explained above.



Brilliant, the mod now works!! :)

Just one problem, rather than images creating the dreaded red X when they are clicked on, would it be possible to display a message saying "You do not have permission to view the fullsize image", and when clicking on another filetype, display "You do not have permission to download this file"?

Regards
Eddy


sodmanccc

any hope for this in 2.0?

i know the permissions mod been added to 2.0 but it does not have it split into 2 like this and well yea thats a great feature needed for some of us.


tsmalmbe

A year old topic.

I'm not sure, but isn't there a totally new permission enhancement for 2.0?
..:: http://www.kontrollrummet.com - Studio och musik ::.. RSS?

nvcnvn


B.SkiLLs

VICKTORY THE UNDERDOG Documentary – Pitbulls the untold true story

This is a must read & watch. Then Buy your DVD today. You will not regret it. Totally AWESOME. Best i ever seen. --
 
____________________
Message approved by
: [B. SkiLLs]
 


B.SkiLLs

Is there a way to have a pop up come up telling them they have tobe a member to download the attachment ??

or change the worded that comes up when redirected to the longin page ???
VICKTORY THE UNDERDOG Documentary – Pitbulls the untold true story

This is a must read & watch. Then Buy your DVD today. You will not regret it. Totally AWESOME. Best i ever seen. --
 
____________________
Message approved by
: [B. SkiLLs]
 


B.SkiLLs

VICKTORY THE UNDERDOG Documentary – Pitbulls the untold true story

This is a must read & watch. Then Buy your DVD today. You will not regret it. Totally AWESOME. Best i ever seen. --
 
____________________
Message approved by
: [B. SkiLLs]
 


V@no

Thank you very much for this great mod!

There only one issue I found with this mod, is when "Display image attachments as pictures under post" and "Resize images when showing under posts" options enabled, it will show broken images.
A quick work around this is to force disable these features if download attachment not allowed.
Find in Sources/Display.php:
if (!empty($modSettings['attachmentEnable']) && (allowedTo('view_attachments') || allowedTo('view_attachments2')))


Insert above:
if (!allowedTo('view_attachments') && allowedTo('view_attachments2'))
{
$modSettings['attachmentShowImages'] = 0;
$modSettings['attachmentThumbnails'] = 0;
}

B.SkiLLs

why ?? this is built in now with new versions guy's ....

[if im thinking correctly] lol
VICKTORY THE UNDERDOG Documentary – Pitbulls the untold true story

This is a must read & watch. Then Buy your DVD today. You will not regret it. Totally AWESOME. Best i ever seen. --
 
____________________
Message approved by
: [B. SkiLLs]
 


nikan

#76
Updated for 2.0 RC2

In Display.php
Find
if (!empty($modSettings['attachmentEnable']) && allowedTo('view_attachments'))
Replace
if (!empty($modSettings['attachmentEnable']) && (allowedTo('view_attachments') || allowedTo('view_attachments2')))


In ManagePermissions.php
Find
'view_attachments' => array(false, 'attachment', 'participate'),
'post_unapproved_attachments' => array(false, 'attachment', 'make_unapproved_posts'),
'post_attachment' => array(false, 'attachment', 'attach'),

Replace
'view_attachments' => array(false, 'attachment', 'participate'),
'view_attachments2' => array(false, 'attachment', 'participate'),
'post_unapproved_attachments' => array(false, 'attachment', 'make_unapproved_posts'),
'post_attachment' => array(false, 'attachment', 'attach'),



In ManagePermissions.english.php
Find
$txt['permissionname_view_attachments'] = 'View attachments';
$txt['permissionhelp_view_attachments'] = 'Attachments are files that are attached to posted messages. This feature can be enabled and configured in \'Edit Features and Options\'. Since attachments are not directly accessed, you can protect them from being downloaded by users that don\'t have this permission.';

Replace
$txt['permissionname_view_attachments'] = 'Download attachments';
$txt['permissionhelp_view_attachments'] = 'Allows to download attachments';
$txt['permissionname_view_attachments2'] = 'View attachments';
$txt['permissionhelp_view_attachments2'] = 'Attachments are files that are attached to posted messages. This feature can be enabled and configured in \'Edit Features and Options\'. Since attachments are not directly accessed, you can protect them from being downloaded by users that don\'t have this permission.';

Apllicmz

yes
i try to install 1.1.11
i see that erro
how can resolv



nikan

You probably have other mods installed and messed up your code.
Edit the files and install the mod manually.

Apllicmz




Advertisement: