Advertisement:

Author Topic: Attachments Download Permission  (Read 57898 times)

Offline tsmalmbe

  • Jr. Member
  • **
  • Posts: 188
  • Gender: Male
    • Kontrollrummet
Re: Attachments Download Permission
« Reply #60 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.

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

Offline joojoohe

  • Semi-Newbie
  • *
  • Posts: 14
Re: Attachments Download Permission
« Reply #61 on: June 07, 2007, 03:24:24 PM »
I'm using smf 1.1.2
I have this error.... >:( >:(
Somebody can help me please?   

Offline flickernever

  • Semi-Newbie
  • *
  • Posts: 69
Re: Attachments Download Permission
« Reply #62 on: January 25, 2008, 08:28:20 AM »
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.

Offline TrueSatan

  • SMF Hero
  • ******
  • Posts: 1,783
Re: Attachments Download Permission
« Reply #63 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.

Offline flickernever

  • Semi-Newbie
  • *
  • Posts: 69
Re: Attachments Download Permission
« Reply #64 on: January 25, 2008, 09:17:25 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?

Offline TrueSatan

  • SMF Hero
  • ******
  • Posts: 1,783
Re: Attachments Download Permission
« Reply #65 on: January 25, 2008, 09:02:38 PM »
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.

Offline flickernever

  • Semi-Newbie
  • *
  • Posts: 69
Re: Attachments Download Permission
« Reply #66 on: January 26, 2008, 09:02:29 AM »
<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.

Offline Eddy Matthews

  • Jr. Member
  • **
  • Posts: 121
Re: Attachments Download Permission
« Reply #67 on: February 23, 2008, 06:06:44 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


Offline sodmanccc

  • Jr. Member
  • **
  • Posts: 219
Re: Attachments Download Permission
« Reply #68 on: February 16, 2009, 07:29:51 PM »
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.


Offline tsmalmbe

  • Jr. Member
  • **
  • Posts: 188
  • Gender: Male
    • Kontrollrummet
Re: Attachments Download Permission
« Reply #69 on: February 17, 2009, 05:55:40 PM »
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?

Offline nvcnvn

  • Full Member
  • ***
  • Posts: 546
  • Gender: Male
  • Super Somethings
    • Hocvui.net - Cùng học những điều cơ bản mà vui
Re: Attachments Download Permission
« Reply #70 on: April 15, 2009, 07:11:04 AM »
Can this mod use for 1.1.8!?

Offline B.SkiLLs

  • Full Member
  • ***
  • Posts: 431
  • Gender: Male
    • XtremeStylez
Re: Attachments Download Permission
« Reply #71 on: September 18, 2009, 04:01:38 PM »
Can this mod use for 1.1.8!?
Yes and 1.1.9 and 1.1.10
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]
 


Offline B.SkiLLs

  • Full Member
  • ***
  • Posts: 431
  • Gender: Male
    • XtremeStylez
Re: Attachments Download Permission
« Reply #72 on: September 18, 2009, 04:02:36 PM »
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]
 


Offline B.SkiLLs

  • Full Member
  • ***
  • Posts: 431
  • Gender: Male
    • XtremeStylez
Re: Attachments Download Permission
« Reply #73 on: October 09, 2009, 06:24:21 PM »
bumpers
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]
 


Offline V@no

  • Jr. Member
  • **
  • Posts: 118
  • mmm PHP...
Re: Attachments Download Permission
« Reply #74 on: October 19, 2009, 03:22:23 AM »
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:
Code: [Select]
if (!empty($modSettings['attachmentEnable']) && (allowedTo('view_attachments') || allowedTo('view_attachments2')))

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

Offline B.SkiLLs

  • Full Member
  • ***
  • Posts: 431
  • Gender: Male
    • XtremeStylez
Re: Attachments Download Permission
« Reply #75 on: November 19, 2009, 05:46:50 PM »
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]
 


Offline nikan

  • Jr. Member
  • **
  • Posts: 390
Re: Attachments Download Permission
« Reply #76 on: January 18, 2010, 09:31:05 AM »
Updated for 2.0 RC2

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

In ManagePermissions.php
Find
Code: [Select]
'view_attachments' => array(false, 'attachment', 'participate'),
'post_unapproved_attachments' => array(false, 'attachment', 'make_unapproved_posts'),
'post_attachment' => array(false, 'attachment', 'attach'),
Replace
Code: [Select]
'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
Code: [Select]
$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
Code: [Select]
$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.';
« Last Edit: March 21, 2010, 10:35:54 PM by nikan »

Offline Joomlamz

  • SMF Hero
  • ******
  • Posts: 2,630
  • Gender: Male
  • Suporte SmfPT
    • apllicmz on Facebook
    • apllicmz on GitHub
    • https://www.linkedin.com/in/aplic on LinkedIn
    • @aplichosting on Twitter
    • Webdesign
Re: Attachments Download Permission
« Reply #77 on: March 03, 2010, 01:28:19 AM »
yes
i try to install 1.1.11
i see that erro
how can resolv



Offline nikan

  • Jr. Member
  • **
  • Posts: 390
Re: Attachments Download Permission
« Reply #78 on: March 03, 2010, 02:04:50 AM »
You probably have other mods installed and messed up your code.
Edit the files and install the mod manually.

Offline Joomlamz

  • SMF Hero
  • ******
  • Posts: 2,630
  • Gender: Male
  • Suporte SmfPT
    • apllicmz on Facebook
    • apllicmz on GitHub
    • https://www.linkedin.com/in/aplic on LinkedIn
    • @aplichosting on Twitter
    • Webdesign
Re: Attachments Download Permission
« Reply #79 on: March 03, 2010, 02:05:40 AM »
thank you
i will do text
Good work