sbj
Well-known member
Hey,
once a nice dev helped me to build this very small addon. Basically it has 1 phrase, 1 permission and 1 template modification.
This neat trick helped me to increase my registration numbers like 500% or more. It disallows people to see attachments if they are not logged in and forwards them to the login page when they click on an attachment.
Here are my stats for the whole year of 2020 for registrations (weekly).
Sadly, the
I'm quoting the xml file because it has every information one needs.
If needed I can attach the whole addon. Thanks.
once a nice dev helped me to build this very small addon. Basically it has 1 phrase, 1 permission and 1 template modification.
This neat trick helped me to increase my registration numbers like 500% or more. It disallows people to see attachments if they are not logged in and forwards them to the login page when they click on an attachment.
Here are my stats for the whole year of 2020 for registrations (weekly).
Sadly, the
attachment_macros
template did change in the new 2.2, which is why this doesn't work anymore. Does anyone know how to update this for 2.2?I'm quoting the xml file because it has every information one needs.
XML:
<?xml version="1.0" encoding="utf-8"?>
<template_modifications>
<modification type="public" template="attachment_macros" modification_key="bs_all_attachment_macros_replace_link" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[{{ link('attachments', $attachment) }}]]></find>
<replace><![CDATA[{{ $xf.visitor.hasPermission('forum', 'bsAllGuestAttachmentLink') ? link('login') : link('attachments', $attachment) }}]]></replace>
</modification>
</template_modifications>
If needed I can attach the whole addon. Thanks.