Number of downloads

micke

Collaborate
Collaborate
Registered
Joined
Sep 27, 2020
Messages
93
Points
43

Reputation:

Does anyone know if there is a plugin for how many files the member has left to download.
See the picture
download.png


Or if anyone knows what that code is?

Thanks in advance!
 

BattleKing

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

Reputation:

micke

Collaborate
Collaborate
Registered
Joined
Sep 27, 2020
Messages
93
Points
43

Reputation:

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,531
Points
523

Reputation:

BattleKing

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

Reputation:

I suspected that. I haven't seen any addon that has that capability.
mickeWhich addon you are using to limit the downloads?
If you want I can add the information into the addon and do the modification?
On which site you have taken the screenshot?
 

micke

Collaborate
Collaborate
Registered
Joined
Sep 27, 2020
Messages
93
Points
43

Reputation:

Which addon you are using to limit the downloads?
If you want I can add the information into the addon and do the modification?
On which site you have taken the screenshot?
BattleKingThanks, but I'll try to do it myself.
I asked the admin of that website (https://nullforums.net/home/) and he wrote like this: It's pretty easy to make. Start by dumping the vars from your template to admin-only groups and you can develop many things.
 

BattleKing

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

Reputation:

Thanks, but I'll try to do it myself.
I asked the admin of that website (https://nullforums.net/home/) and he wrote like this: It's pretty easy to make. Start by dumping the vars from your template to admin-only groups and you can develop many things.
mickeIf you need help, let me know.
 

thomsa

Moderator
Staff member
Moderator
S.V.I.P Member
Collaborate
Registered
Joined
Jun 22, 2019
Messages
1,167
Points
173

Reputation:

Does anyone know if there is a plugin for how many files the member has left to download.
See the picture
View attachment 35354

Or if anyone knows what that code is?

Thanks in advance!
mickemy modify

2023-06-21_14-55-34.png


use /admin.php?template-modifications/add&type=public

2023-06-21_17-40-00.jpg


find:
HTML:
                                    <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>

replace:
HTML:
                                  <xf:set var="$attachment" value="{{ $resource.CurrentVersion.Attachments|first }}" />
                                <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') }} ({{ $attachment.getFileSize()|file_size }} /.{{ $attachment.getExtension() }})</xf:button>
 
Last edited:

Zer01ne

Collaborate
Collaborate
Registered
Joined
Nov 25, 2022
Messages
725
Points
253

Reputation:

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,531
Points
523

Reputation:

thomsaJust add a new template modification and enter the FIND content and the REPLACE content to it.

But this is not what he want, he want to see the number of downloads left.
 

BattleKing

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

Reputation:

thomsa

Moderator
Staff member
Moderator
S.V.I.P Member
Collaborate
Registered
Joined
Jun 22, 2019
Messages
1,167
Points
173

Reputation:

@micke and this your want.

2023-06-22_13-58-16.png


use /admin.php?template-modifications/add&type=public

2023-06-22_19-13-58.jpg


search:

HTML:
                                    <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>

replace:

HTML:
                                  <xf:set var="$attachment" value="{{ $resource.CurrentVersion.Attachments|first }}" />
                                    <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') }} ({{ $attachment.getFileSize()|file_size }} /.{{ $attachment.getExtension() }})</xf:button><br />
                        <xf:if is="$resource.isDownloadable()">
                            <center>
                                downloads left:   <font color=red>{$resource.download_count|number}</font>
                            </center>
                        </xf:if>
 
Last edited:

BattleKing

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

Reputation:

micke

Collaborate
Collaborate
Registered
Joined
Sep 27, 2020
Messages
93
Points
43

Reputation:

@micke and this your want.

View attachment 35418

use /admin.php?template-modifications/add&type=public

View attachment 35419

search:

HTML:
                                    <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>

replace:

HTML:
                                  <xf:set var="$attachment" value="{{ $resource.CurrentVersion.Attachments|first }}" />
                                    <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') }} ({{ $attachment.getFileSize()|file_size }} /.{{ $attachment.getExtension() }})</xf:button><br />
                        <xf:if is="$resource.isDownloadable()">
                            <center>
                                downloads left:   <font color=red>{$resource.download_count|number}</font>
                            </center>
                        </xf:if>
thomsaYep, that's exactly what I want. :D:love:
 
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,531
Points
523

Reputation:

this code not use called [XenGenTr] RM Ekstra.
pic first post that move download counter to here.
thomsa@micke which limitation addon are you using?
Same question for all the others who has replied in that thread?
 
Top