Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: vbgamer45 on August 13, 2018, 05:43:08 PM

Title: Download Attachment Permission v2
Post by: vbgamer45 on August 13, 2018, 05:43:08 PM
Link to the mod (https://custom.simplemachines.org/index.php?mod=4189)

Adds a separate download and view permission for attachments
This controls the whether the download is listed in the topic display or not.
Title: Re: Download Attachment Permission v2
Post by: jsx on March 03, 2019, 02:10:49 PM
Polish translation UTF-8:

<file name="$languagedir/ManagePermissions.polish-utf8.php" error="skip">
<operation>
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
// Begin Download Attachment
$txt['permissionname_view_attachments'] = 'Pobierz załączniki';
$txt['permissionhelp_view_attachments'] = 'Załączniki to pliki dołączane do publikowanych wiadomości. Funkcja może być włączona i skonfigurowana w \'Załączniki i awatary\'. Ponieważ załączniki nie są bezpośrednio dostępne, możesz zabezpieczyć je przed pobraniem przez użytkowników, którzy nie mają do tego uprawnień.';

$txt['permissionname_view_attachments2'] = 'Zobacz załączniki';
$txt['permissionhelp_view_attachments2'] = 'Ta opcja umożliwia użytkownikowi przeglądanie załączników w tematach, ale nie zezwala na pobieranie załączników.';

// END Download Attachment
]]></add>
</operation>
</file>


Please put this translation in a modification.
Title: Re: Download Attachment Permission v2
Post by: vbgamer45 on March 03, 2019, 04:14:54 PM
Done
Title: Re: Download Attachment Permission v2
Post by: -Rock Lee- on March 03, 2019, 06:31:03 PM
Just what he was looking for something he wants to do. Very good @vbgamer45 and in passing I leave the translation to Latin Spanish :D.

<file name="$languagedir/ManagePermissions.spanish_latin-utf8.php" error="skip">
<operation>
<search position="after"><![CDATA[
?>]]></search>
<add><![CDATA[
// Begin Download Attachment
$txt['permissionname_view_attachments'] = 'Descargar adjuntos';
$txt['permissionhelp_view_attachments'] = 'Los archivos adjuntos son archivos que se adjuntan en los mensajes publicados. Esta función se puede activar y configurar en \'Archivos Adjuntos y Avatares\'. Dado que no se puede acceder directamente a los archivos adjuntos, puede protegerlos de ser descargado por los usuarios que no disponen de este permiso.';

$txt['permissionname_view_attachments2'] = 'Ver archivos adjuntos';
$txt['permissionhelp_view_attachments2'] = 'Permite al usuario ver los archivos adjuntos en la publicación. Sólo pueden descargar, si tienen el permiso de descargar el archivo adjunto.';


// END Download Attachment
]]></add>
</operation>
</file>



Regards!
Title: Re: Download Attachment Permission v2
Post by: vbgamer45 on March 03, 2019, 07:15:29 PM
Done as well. Wish it was easy to post them on the modsite. I missed adding many translations over the years.
Title: Re: Download Attachment Permission v2
Post by: -Rock Lee- on March 03, 2019, 08:32:29 PM
's something I've noticed... surely it was not first thought as such. It would even be nice to update many translations need improvements, it's a dream but I hope it will come true!
Title: Re: Download Attachment Permission v2
Post by: jsx on March 04, 2019, 02:46:33 AM
@vbgamer45,

Thanks for placing the Polish language in the modification. But why do not Polish diacritic marks appear in downloadattach2.xml file? And after installing the modification, the Polish language for this modification is not displayed.

Example:

Pobierz zalaczniki (Currently in the modification lines are without Polish diacritics)

Pobierz załączniki (The lines should contain Polish diacritics - This is correct)
Title: Re: Download Attachment Permission v2
Post by: vbgamer45 on March 04, 2019, 09:05:02 AM
Fixed text editor I used wasn't the best for utf8
Title: Re: Download Attachment Permission v2
Post by: vbgamer45 on March 07, 2019, 04:04:50 PM
Updated to support SMF 2.1.x
Title: Re: Download Attachment Permission v2
Post by: shadav on June 10, 2020, 02:03:19 AM
um...a bit confused.....
installed the mod onto 2.0.17, went to set permissions....but which is which
Clicking on the help icon didn't really help that much, i'm assuming the top one is to download and bottom one is to view
Title: Re: Download Attachment Permission v2
Post by: vbgamer45 on June 10, 2020, 09:24:12 AM
Doesn't look installed right.
It should have two different texts.
Title: Re: Download Attachment Permission v2
Post by: shadav on June 10, 2020, 10:28:01 AM
ah there it is...simple fix  ;D
installer didn't have english-utf8 language file to it, so just added it to my ManagePermissions.english-utf8.php and now it shows properly
Title: Re: Download Attachment Permission v2
Post by: Portugal on April 23, 2021, 01:23:17 PM
Hi, thats a good feature, ive used until today another one (since 2010), but today i see it dont work properlly on 2.0.18, so i decide to unistal it and search for something identical... and that mod was perfect.

Anyone knows if its possibile to have the attatchment download inacessibile and at same time to have the "index" active to search engines index it?


Best regards

Portugal
Title: Re: Download Attachment Permission v2
Post by: Dikxon on March 13, 2022, 05:53:39 PM
@vbgamer45 does not work in version 2.1.1.
When you click to download, it does not warn and opens a 404 File not found error page and it does not warn that you have to be identified or registered to be able to download.

It's a great mod, see if you can fix it
Title: Re: Download Attachment Permission v2
Post by: W2NAP on November 07, 2023, 06:54:10 PM
Quote from: Dikxon on March 13, 2022, 05:53:39 PM@vbgamer45 does not work in version 2.1.1.
When you click to download, it does not warn and opens a 404 File not found error page and it does not warn that you have to be identified or registered to be able to download.

It's a great mod, see if you can fix it

Confirm, same issue here. tossing a 404 to a wrong permission guest, that will give guest the idea site isn't worth the hassle since the file they are after is gone/deleted instead of pointing to them they don't have permissions to view/download.

Anyone have an edit for a better fix? instead of new window 404 maybe just blocks the attachment with message "You must be a registered member to view attachment" or some variation?