News:

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

Main Menu

Download Attachment Permission v2

Started by vbgamer45, August 13, 2018, 05:43:08 PM

Previous topic - Next topic

vbgamer45

Link to the mod

Adds a separate download and view permission for attachments
This controls the whether the download is listed in the topic display or not.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

jsx

#1
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.

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

-Rock Lee-

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!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

vbgamer45

Done as well. Wish it was easy to post them on the modsite. I missed adding many translations over the years.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

-Rock Lee-

'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!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

jsx

@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)

vbgamer45

Fixed text editor I used wasn't the best for utf8
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

shadav

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

vbgamer45

Doesn't look installed right.
It should have two different texts.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

shadav

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

Portugal

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

Dikxon

@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

W2NAP

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?

Advertisement: