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

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

0 Members and 1 Guest are viewing this topic.

Offline Fastian

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: [MOD] Download limit v1
« Reply #90 on: January 26, 2006, 03:22:12 PM »
First of all, Sorry for replying that late.
@Fastian:
For testing purpose, in download.php below <?php insert this:
Code: [Select]
echo "<pre>";
print_r($_SERVER);
exit;

Yes I do see [HTTP_REFERER] => some address With some other info. And that address is the one from where i click the download button.

@Fastian:
If you do, then in global.php above
Code: [Select]
if (defined("SCRIPT_URL") && SCRIPT_URL != "") { insert:
Code: [Select]
echo $url;
Then on every page you go, it should show you on top the previous page URL and not url to index.php

When i do this, i get
Code: [Select]
index.php
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/domain/public_html/wallpapers/global.php:232) in /home/domain/public_html/wallpapers/includes/sessions.php on line 100
And then on every page i Visit that index.php is there along with the warning message.

Quote
If all that is correct, then there is somewhere in other files you've modified, variable $url is being altered...that what you should start digging ;)
Now should i start digging  ?? If so, give me some idea, what kind of modification it could be ?
I m not a  Programmer.
          But
I m a Good Learner.

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD] Download limit v1
« Reply #91 on: January 26, 2006, 03:24:21 PM »
Quote

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/domain/public_html/wallpapers/global.php:232) in /home/domain/public_html/wallpapers/includes/sessions.php on line 100


It looks like you uploaded your files in binary mode (or perhaps on auto-mode but was automatically considered as binary mode during the transfer of your files). If it's the case, you might want to manually switch to ASCII mode in order to get rid of these errors in the future. ;)

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 #92 on: January 26, 2006, 03:33:41 PM »
Try add the echo $url; above:
Code: [Select]
if ($url == $self_url || $url == "" || !preg_match("/\.php/", $url)) {
Still, I'd like to test it myself ;)


It looks like you uploaded your files in binary mode (or perhaps on auto-mode but was automatically considered as binary mode during the transfer of your files). If it's the case, you might want to manually switch to ASCII mode in order to get rid of these errors in the future. ;)
Please, stop guessing! you are not following this disscussion and your input is not neccery, especialy when you dont realy know what's goin on.
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 TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD] Download limit v1
« Reply #93 on: January 26, 2006, 03:37:16 PM »
Quote

you are not following this disscussion and your input is not neccery


http://www.4homepages.de/forum/index.php?topic=11326.msg58688#msg58688

 :roll:

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 #94 on: January 26, 2006, 03:46:23 PM »
http://www.4homepages.de/forum/index.php?topic=11326.msg58688#msg58688
Thank you for confirming my point - you dont know what is going on here. And one more time emmberassed yourself.
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 #95 on: January 26, 2006, 04:11:59 PM »
V@no
I just send u a PM  :)
I m not a  Programmer.
          But
I m a Good Learner.

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD] Download limit v1
« Reply #96 on: January 26, 2006, 04:22:29 PM »
Quote

And one more time emmberassed yourself.


If I were really embarassed, I wouldn't quite resolved the same issue on that other topic.  :mrgreen:

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 #97 on: January 27, 2006, 12:37:28 AM »
V@no
I just send u a PM :)
Ok, I found the problem. The mod_rewrite mod you are using has a side effect...I didnt even know about it till now.
So, since you are using .htm instead of .php extensions, you'll need replace in global.php:
Code: [Select]
if ($url == $self_url || $url == "" || !preg_match("/\.php/", $url)) {with this:
Code: [Select]
$ext = strtolower(substr(strrchr($url,"."), 1));
$ext = substr($ext,0,(strlen($ext)-strlen(strrchr($ext,"?"))));
if ($url == $self_url || $url == "" || ($ext != "php" && $ext != "htm")) {

P.S.
you can remove the echo thingie ;)

If I were really embarassed, I wouldn't quite resolved the same issue on that other topic. :mrgreen:
So, the only reason you showed that URL was to show that once you were actualy correct? man, you have issues...
STOP THE SPAM!
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 #98 on: January 27, 2006, 06:13:01 AM »
Thanks V@no
Now its working just fine. No more redirects to home page. The above code works well.

Ok, I found the problem. The mod_rewrite mod you are using has a side effect...I didnt even know about it till now.
So, since you are using .htm instead of .php extensions, you'll need replace in global.php:

Well I guess changing the default way of displaying pages has it's price. I hope nothing more is coming from that mod  :)
I m not a  Programmer.
          But
I m a Good Learner.

Offline kj_4fire

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: [MOD] Download limit v1
« Reply #99 on: January 30, 2006, 08:36:03 AM »
I have problem here. Sometime, the download limit doesn't work due to the cookie. It means users can download as many as they want although i set the limit. I have tested it myself. After I clear the cookie, the download limit works again. Is there anyway to prevent it? :D thanks

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 #100 on: January 30, 2006, 02:21:50 PM »
Is there anyway to prevent it?
No, untill you write detailed step-by-step instructions how to reproduce it...
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 ladyoz

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: [MOD] Download limit v1
« Reply #101 on: March 15, 2006, 06:55:57 PM »
Will this mod work in the new 1.7.2? Thanks  :D
Despite the cost of living, it's still popular ...

Offline renicolay

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: [MOD] Download limit v1
« Reply #102 on: March 18, 2006, 06:01:24 PM »
I'm also wondering if this mod will work with 1.7.2.  I would like to upgrade.  Does anyone know?

Offline ladytaz

  • Pre-Newbie
  • Posts: 3
    • View Profile
    • Majestic Imagery
Re: [MOD] Download limit v1- is there an update for v1.7.2?
« Reply #103 on: March 22, 2006, 08:37:46 PM »
Nevermind ..... I got it to work, I figured it out myself.   :D :wink:



Enquiring minds would really like to know ...  :wink:

I attempted to add it to v1.7.2, but at least one of the files is a bit different.  I tried to improvise, but it did not fully work.
The mod shows up, but does not count down, downloads stays at 0, nor will it stop downloads at the cut off limit.  :?
« Last Edit: March 26, 2006, 06:00:56 AM by ladytaz »

Offline antonio2005

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: [MOD] Download limit v1
« Reply #104 on: March 25, 2006, 08:31:16 PM »
Hi,

Cant find code at step Step 2.3.
I'm running version 1.7.2.

Is there a problem with my php file, or the mod was designed to another version?

Regards