Facebook 

SMFHacks.com - Celebrating 20 Years!

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4341
Latest: jmac32here
New This Month: 2
New This Week: 0
New Today: 0
Stats
Total Posts: 44306
Total Topics: 7676
Most Online Today: 365
Most Online Ever: 27044
(May 30, 2026, 09:10:16 pm)
Users Online
Members: 0
Guests: 174
Total: 174

Author Topic: Download Count and Wait Time  (Read 13226 times)

0 Members and 0 Guests are viewing this topic.

Download Count and Wait Time
« on: »
I got a bug where I have a set download wait time to 120 minutes. Stopping the user from downloading too quick.

Now if they click the download before the 120 minutes is up they get a warning to say they have to wait x minutes before downloading.

The bug is this - if they click before 120 minutes is up - the download count is added to the database yet they have now actually got the download.

How can we prevent this.

Re: Download Count and Wait Time
« Reply #1 on: »
Are you talking about the downloads count or the view count?
The view count goes up each time you the page.

The downloads count is only counted when a download occurs and that is incremented after the wait time check code.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: Download Count and Wait Time
« Reply #2 on: »
The download is counted as soon as they click the download button which triggers the warning message.

Re: Download Count and Wait Time
« Reply #3 on: »
I am not sure how that is possible since the code to count downloads is after the warning message is shown. And the warning message is a hard kill no execution happens after that is shown.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: Download Count and Wait Time
« Reply #4 on: »
Which file is it in I will post the code.

Re: Download Count and Wait Time
« Reply #5 on: »
Sources/Downloads2.php
in function Downloads_DownloadFile()


I have looked at it and do not see anyway it can occur.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: Download Count and Wait Time
« Reply #6 on: »
I have attached the file
« Last Edit: October 14, 2013, 12:47:49 pm by elbeer »

Re: Download Count and Wait Time
« Reply #7 on: »
Any suggestions?

Re: Download Count and Wait Time
« Reply #8 on: »
Not at this time not sure what to change.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: Download Count and Wait Time
« Reply #9 on: »
Ok what about if we add something to check the waiting time and display the time remaining before they can download and hide the download button until their waiting time is up.


Re: Download Count and Wait Time
« Reply #10 on: »
I think I have fixed this.

I believe it was a permissions problem create by me using inherit permissions from one group to another.

Re: Download Count and Wait Time
« Reply #11 on: »
Ah interesting haven't run tests with that strange though.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
3554 Views
Last post February 10, 2007, 04:19:58 am
by Sharr76
0 Replies
4664 Views
Last post March 01, 2007, 11:16:11 am
by marcbkk
10 Replies
11378 Views
Last post September 06, 2013, 12:26:50 pm
by SMFHacks
10 Replies
10311 Views
Last post November 01, 2016, 11:25:39 am
by elbeer
3 Replies
4509 Views
Last post November 24, 2018, 09:08:55 pm
by SMFHacks

+- Recent Topics

Registration - anti bot pattern matching by SMFHacks
November 01, 2026, 07:20:17 pm

EZPortal 8 by davejo
October 21, 2026, 01:01:54 pm

Downloads Pro 7.0 Released by SMFHacks
October 07, 2026, 07:35:30 pm

[Mod]ActivityPub Federation for SMF 2.1 by SMFHacks
October 01, 2026, 05:03:45 pm

Newsletter Pro 4.0 Released by SMFHacks
September 23, 2026, 08:08:24 pm

Can't remove or restore any item from the recycle bin by SMFHacks
September 22, 2026, 11:01:51 am

MCP Server for SMF 2.1 - let Claude, ChatGPT or Cursor run your admin chores by SMFHacks
September 12, 2026, 02:50:45 pm

Suggestions for improvements to Ultimate Shoutbox & Chatroom by davejo
September 02, 2026, 01:35:09 am

Automatic Sorting of Categories by Kiwi
August 31, 2026, 12:36:09 am

' appears as ' in Most Viewed (and Recent Items ?) by SMFHacks
August 22, 2026, 11:01:56 pm

Powered by EzPortal