Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4255
Latest: andreios
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 43259
Total Topics: 7518
Most Online Today: 177
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 177
Total: 177

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

0 Members and 1 Guest are viewing this topic.

Offline elbeer

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 111
    • View Profile
Download Count and Wait Time
« on: October 14, 2013, 10:22:28 am »
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.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Download Count and Wait Time
« Reply #1 on: October 14, 2013, 10:28:08 am »
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/

Offline elbeer

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 111
    • View Profile
Re: Download Count and Wait Time
« Reply #2 on: October 14, 2013, 11:59:29 am »
The download is counted as soon as they click the download button which triggers the warning message.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Download Count and Wait Time
« Reply #3 on: October 14, 2013, 12:05:04 pm »
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/

Offline elbeer

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 111
    • View Profile
Re: Download Count and Wait Time
« Reply #4 on: October 14, 2013, 12:16:26 pm »
Which file is it in I will post the code.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Download Count and Wait Time
« Reply #5 on: October 14, 2013, 12:21:18 pm »
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/

Offline elbeer

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 111
    • View Profile
Re: Download Count and Wait Time
« Reply #6 on: October 14, 2013, 12:24:54 pm »
I have attached the file
« Last Edit: October 14, 2013, 12:47:49 pm by elbeer »

Offline elbeer

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 111
    • View Profile
Re: Download Count and Wait Time
« Reply #7 on: October 16, 2013, 03:12:51 am »
Any suggestions?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Download Count and Wait Time
« Reply #8 on: October 16, 2013, 07:41:45 am »
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/

Offline elbeer

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 111
    • View Profile
Re: Download Count and Wait Time
« Reply #9 on: October 17, 2013, 05:47:44 am »
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.


Offline elbeer

  • Downloads Pro Customer
  • Full Member
  • *****
  • Posts: 111
    • View Profile
Re: Download Count and Wait Time
« Reply #10 on: October 26, 2013, 05:07:56 am »
I think I have fixed this.

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

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16436
    • View Profile
Re: Download Count and Wait Time
« Reply #11 on: October 26, 2013, 08:06:38 am »
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
2807 Views
Last post February 10, 2007, 04:19:58 am
by Sharr76
0 Replies
3772 Views
Last post March 01, 2007, 11:16:11 am
by marcbkk
10 Replies
8634 Views
Last post September 06, 2013, 12:26:50 pm
by SMFHacks
10 Replies
8759 Views
Last post November 01, 2016, 11:25:39 am
by elbeer
3 Replies
2922 Views
Last post November 24, 2018, 09:08:55 pm
by SMFHacks

+- Recent Topics

No thumbnails on new uploads by SMFHacks
March 27, 2024, 02:10:41 pm

Display the Contact Page for guests by SMFHacks
March 27, 2024, 10:55:43 am

is it possible to add support for odysee.com by fvlog19
March 21, 2024, 08:47:51 am

Request for admin notification by davejo
March 10, 2024, 01:31:59 am

I need help with torrent upload by Ineedsmfhelp
March 09, 2024, 10:01:13 pm

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

Powered by EzPortal