How do I show the remaining downloads and unlimited downloads button?

Nulled2

VIP Member
V.I.P Member
Collaborate
Registered
Joined
Dec 10, 2019
Messages
212
Points
38

Reputation:

How do I show the remaining downloads and unlimited downloads button?
In this resource, I see two buttons, number of available downloads and unlimited downloads.
Screenshot_65.jpg

How do I do this button?
Thank you!

https://enxf.net/resources/xenbros-xfrm-limits.1923/
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

Reputation:

did you set the permissions for it for the different user groups?
 

Nulled2

VIP Member
V.I.P Member
Collaborate
Registered
Joined
Dec 10, 2019
Messages
212
Points
38

Reputation:

did you set the permissions for it for the different user groups?
BattleKingYes they are configured but I think it is a button issue.
Some phrase variable must go there that my current theme doesn't have it.
Can you tell me what it is or how to set it?
 

Nulled2

VIP Member
V.I.P Member
Collaborate
Registered
Joined
Dec 10, 2019
Messages
212
Points
38

Reputation:

I continue to look to see if anyone knows the variable I am missing in the sentence or what I am missing to make this work.

Regards

My code:

PHP:
<xf:if is="$resource.isDownloadable()">
                        <div class="p-title-pageAction">
                            <xf:if is="$resource.canDownload()">
                                <xf:if is="$resource.isExternalDownload()">
                                    <xf:button href="{{ link('resources/download', $resource) }}" target="_blank"
                                        rel="noopener"
                                        data-xf-init="tooltip"
                                        class="button--cta"
                                        title="{{ $resource.CurrentVersion.getExternalDownloadDomain() }}"
                                        icon="download">{{ phrase('xfrm_go_to_download') }}</xf:button>
                                <xf:else />
                                    <xf:button href="{{ link('resources/download', $resource) }}" target="_blank"
                                        class="button--cta"
                                        data-xf-click="{{ $resource.CurrentVersion.file_count > 1 ? 'overlay' : '' }}"
                                        icon="download">{{ phrase('download') }}</xf:button>
                                </xf:if>
                            <xf:else />
                                <span class="button button--wrap is-disabled">{{ phrase('xfrm_no_permission_to_download') }}</span>
                            </xf:if>
                        </div>
 

Nulled2

VIP Member
V.I.P Member
Collaborate
Registered
Joined
Dec 10, 2019
Messages
212
Points
38

Reputation:

I think the problem is here:
Code:
                                        icon="download">{{ phrase('xfrm_go_to_download') }}</xf:button>
 

Nulled2

VIP Member
V.I.P Member
Collaborate
Registered
Joined
Dec 10, 2019
Messages
212
Points
38

Reputation:

I continue to search for a solution - Up
 
View previous replies…

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

Reputation:

I continue to search for a solution - Up
Nulled2I'm just checking and already found something. I will post it later today or tomorrow, depending on the current work load
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

Reputation:

I continue to search for a solution - Up
Nulled2Both template modifications need to be changed in find section with that code:

xfrm_resource_wrapper_macros
PHP:
                                <xf:if is="$resource.isExternalDownload()">
                                    <xf:button href="{{ link('resources/download', $resource) }}" target="_blank"
                                        rel="noopener"
                                        data-xf-init="tooltip"
                                        class="button--cta"
                                        title="{{ $resource.CurrentVersion.getExternalDownloadDomain() }}"
                                        icon="redirect">{{ phrase('xfrm_go_to_download') }}</xf:button>
                                <xf:else />
                                    <xf:button href="{{ link('resources/download', $resource) }}" target="_blank"
                                        class="button--cta"
                                        data-xf-click="{{ $resource.CurrentVersion.file_count > 1 ? 'overlay' : '' }}"
                                        icon="download">{{ phrase('download') }}</xf:button>
                                </xf:if>

xfrm_resource_history

PHP:
                                <xf:action href="{{ link('resources/version/download', $version) }}" target="_blank"
                                    overlay="{{ $version.file_count > 1 }}">{{ phrase('download') }}</xf:action>
 
Top