• [MOD] Download limit v1.0.1 4 0 5 1
Currently:  

Author Topic: [MOD] Download limit v1.0.1  (Read 194386 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Download limit v1
« Reply #60 on: December 31, 2005, 01:31:42 AM »
Nothing needs to be deleted or updated...the database is ready now.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline fult5000

  • Pre-Newbie
  • Posts: 8
    • View Profile
Re: [MOD] Download limit v1
« Reply #61 on: December 31, 2005, 01:55:03 AM »
 :twisted: super!

Offline Agreed2it

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: [MOD] Download limit v1
« Reply #62 on: January 05, 2006, 09:07:54 AM »
I got kind of lost. I want to set the download limit to be by the week. So they only say get 100 downloads per week. How would I do this? Does it have to be by how many hours are in a week, how many minutes? And where do I put the number I have calculated once I have it.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Download limit v1
« Reply #63 on: January 05, 2006, 02:46:17 PM »
In the settings you put number 7 (7 days a week)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Agreed2it

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: [MOD] Download limit v1
« Reply #64 on: January 07, 2006, 01:36:01 PM »
Which settings? Oh boy sorry I installed this awhile ago, and I've completely blanked on it's set up.

Offline renicolay

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: [MOD] Download limit v1
« Reply #65 on: January 07, 2006, 05:06:14 PM »
Which settings? Oh boy sorry I installed this awhile ago, and I've completely blanked on it's set up.

Open your 4Images control panel and click settings.  From there scroll down to User Download Limit and set the Reset Time to 168 (which is 24*7) then set Download limit to 100.  The time should begin after their first download.  That should do the trick.


Offline binuj01

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Sourcestravel
Re: [MOD] Download limit v1
« Reply #66 on: January 17, 2006, 06:19:35 AM »
Hai Vano,
 I installed this MOD and everything seems to work fine.except when I change the no: of files to be downloaded ( example..7) , and after I log in as that user the Download button is ghosted and the download tag message says" You have downloaded 7 out of 50 files allowed.". This happens just after signing and and even without downloading a single file.
What could be wrong?
Thanks
Binu
www.sourcestravel.com
See your travel destnations ahead.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Download limit v1
« Reply #67 on: January 17, 2006, 06:24:13 AM »
hmmm....can you confirm one more time with another user?
I'd like to see it in action...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Fastian

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: [MOD] Download limit v1
« Reply #68 on: January 20, 2006, 03:14:38 AM »
Hi,

I haven’t installed this Mod yet but by reading the while thread, what I got is it set limits of download by per registered user.

Can it be done the following way??

Limit Guest to download only 10 Images per 24 hours and unlimited downloads for registered member. 

If the limit can be set by group not by member it will be the best option.

Would it be too difficult to do that ?? 
I m not a  Programmer.
          But
I m a Good Learner.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Download limit v1
« Reply #69 on: January 20, 2006, 05:13:36 AM »
This mod does not support usergroups.
You can give unlimited downloads for registered members by replacing in includes/funcitons.php:
Code: [Select]
  if ($user_info['user_level'] == ADMIN) return;with this:
Code: [Select]
  if ($user_info['user_level'] >= USER) return;
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Fastian

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: [MOD] Download limit v1
« Reply #70 on: January 20, 2006, 08:18:09 AM »
Group thing was not that important. I just thought it would make things easier.

The important thing to me is
Limit Guest to download only 10 Images per 24 hours  ??

Would it be possible ??  How ?
I m not a  Programmer.
          But
I m a Good Learner.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Download limit v1
« Reply #71 on: January 20, 2006, 02:03:58 PM »
just set the settings you want and do the modification I've posted above.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Fastian

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: [MOD] Download limit v1
« Reply #72 on: January 20, 2006, 11:16:44 PM »
Hi V@no

Just a little issue  i came up with.
In my download.php file

The code from step 2.1
Code: [Select]
while ($image_row = $site_db->fetch_array($result)) {  I have this code three times.

From step 2.2
Code: [Select]
$file_added = 1;  I have this code two times.

From step 2.3
Code: [Select]
  $file['file_size'] = strlen($file['file_data']);
    }
    else {
      header("Location: ".$site_sess->url($url, "&")); 
I have this code two times.

Now should i apply the changes to all of them or is it a particular one ??
 
I am attaching my download.php if u would like to have a look.
I m not a  Programmer.
          But
I m a Good Learner.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Download limit v1
« Reply #73 on: January 21, 2006, 01:25:05 AM »
Now should i apply the changes to all of them or is it a particular one ??
In your particular case, yes, apply to all of them. Its your "page download" mod interferencing ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Fastian

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: [MOD] Download limit v1
« Reply #74 on: January 21, 2006, 03:45:36 AM »
Thanks V@no, Its working fine except for two things.

1) When user is off the limit but he still try to download a file, he get redirect back to home page when using IE.
    I tried it with Fire Fox and I get blank page after that.
   Is it possible that instead of redirect back to home page, a message box appear saying that u must be a register member.
   (Or something else)

2) Now the big issue, I installed your Mod [MOD]-BETA Whole/part category download two days back and it is working just fine.
 Now the problem is, when being off limit, I try to download a page it gives database error.
Quote
DB Error: Bad SQL Query: SELECT cat_id, image_media_file, image_download_url FROM 4images_images WHERE image_active = 1 AND image_id IN () AND cat_id IN (0, 22, 13)
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND cat_id IN (0, 22, 13)' at line 3

I tested it with download limit of three. First it download a zip file with three files which is good. But with second attempt it gives this error.

I have gone throw all the steps of these two mods but still the same situation. That means these two mods have some trouble with each other.

//Edited (Posted In Next Post)
I m not a  Programmer.
          But
I m a Good Learner.