• [Mod] User upload limits 5 0 5 1
Currently:  

Author Topic: [Mod] User upload limits  (Read 238630 times)

0 Members and 1 Guest are viewing this topic.

Offline NTH

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: [Mod] User upload limits
« Reply #105 on: October 12, 2005, 08:13:08 PM »
Re

I insert the code,the register.php but don't happend enything.

Offline spellchecker

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [Mod] User upload limits
« Reply #106 on: October 13, 2005, 12:10:44 AM »
anyone understud what is the problem? I didnt...please explain.

"underSTUD"?

from www.dict.org:

stud
       n 1: a man who is virile and sexually active [syn: he-man, macho-man]

I don't even want to guess with what you mean with your "under a stud" remark. sounds gay.


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] User upload limits
« Reply #107 on: October 13, 2005, 02:00:04 AM »
spellchecker, your comment has nothing to do with the topic, next time either PM directly to the person with your spelling corrections, or post it in chit-chat forum, in fact next time provide the correct spelling as well (unless ofcourse being an @$$ is your nature - based on your comments and actions on my site).

@NTH:
How do u check that it doesnt work? did u try edit a member and see if they have the upload limit value set as in config?
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 NTH

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: [Mod] User upload limits
« Reply #108 on: October 13, 2005, 07:18:23 AM »
I edit the upload limit the users the control panel, but doesen't work.

When I reinstall the  install_user_limits.php  this error messeage viewed.

DB Error: Bad SQL Query: INSERT INTO 4images_settings () VALUES ('default_upload_limit', 5)
Duplicate entry 'default_upload_limit' for key 1

DB Error: Bad SQL Query: ALTER TABLE 4images_users ADD user_limit SMALLINT(3) DEFAULT 5 NOT NULL
Duplicate column name 'user_limit'

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] User upload limits
« Reply #109 on: October 13, 2005, 08:01:00 AM »
I still dont understand what EXACTLY doesnt work?
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 Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: [Mod] User upload limits
« Reply #110 on: October 13, 2005, 12:01:59 PM »
When I reinstall the  install_user_limits.php  this error messeage viewed.

DB Error: Bad SQL Query: INSERT INTO 4images_settings () VALUES ('default_upload_limit', 5)
Duplicate entry 'default_upload_limit' for key 1

DB Error: Bad SQL Query: ALTER TABLE 4images_users ADD user_limit SMALLINT(3) DEFAULT 5 NOT NULL
Duplicate column name 'user_limit'

This puts new Fields in your DB and when you call it two times this error will come...

Specify your questions, what exact is going wrong?

Offline NTH

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: [Mod] User upload limits
« Reply #111 on: October 13, 2005, 07:16:51 PM »
I still dont understand what EXACTLY doesnt work?

The upload limit the new users.

spellchecker2

  • Guest
Re: [Mod] User upload limits
« Reply #112 on: October 13, 2005, 09:47:20 PM »
spellchecker, your comment has nothing to do with the topic, next time either PM directly to the person with your spelling corrections, or post it in chit-chat forum, in fact next time provide the correct spelling as well (unless ofcourse being an @$$ is your nature - based on your comments and actions on my site).


Sure.. and vano, your site and it's non-working ban mod have nothing to do with this site. Touché. (ok, better forget the "touché" part, i bet you're too ignorant to even grasp its meaning)

 - correct spelling is  "underSTOOD". Like any kid could tell you.

 - Just because you're a russian in the middle of a site full of germans, that does not mean that you should try to act as a homo/xeno fobic nazi. So just stay quietly in the corner and remember that you ARE an illiterate bastard who is a great coder, but are not humble enough to admit your english skills are as bad as from a 5 year old kid.


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] User upload limits
« Reply #113 on: October 14, 2005, 12:22:19 AM »
- Just because you're a russian in the middle of a site full of germans, that does not mean that you should try to act as a homo/xeno fobic nazi. So just stay quietly in the corner and remember that you ARE an illiterate bastard who is a great coder, but are not humble enough to admit your english skills are as bad as from a 5 year old kid.
Well, obviosly your english is not great either, since it seems u dont understand when I've told you not to reply to the topics with something not related to the subject.
As of "but are not humble enough to admit your english skills are as bad as from a 5 year old kid." where did this came up? Please show me where I ever said "my english is perfect" or "my english is better then yours"? Man, you have issues...really...
As of "act as a homo/xeno fobic nazi" I've never met such people, I have no idea what that means, but u must have lots experience with them...and since you have brought up nationalities - whos a nazi here then?
Grow up and act as a mature!

P.S. U still didnt give me an answer why do u visit my site every day if you dont like it? :roll:

@NTH:
"Doesnt work" is not helping us, we need descriptions of the steps u do to test it, more details!
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 Acidgod

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: [Mod] User upload limits
« Reply #114 on: October 14, 2005, 02:44:39 PM »
and since you have brought up nationalities - whos a nazi here then?

Sorry, but why are People with german nationalities nazis?  8O
In each nationalities gives nazis....
And please don´t blame us with our History and think about Stalin when you saying that...
I think and hope you where angry when you writing the Posting!

Sorry for the Offtopic!


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] User upload limits
« Reply #115 on: October 14, 2005, 02:49:32 PM »
and since you have brought up nationalities - whos a nazi here then?

Sorry, but why are People with german nationalities nazis? 8O
In each nationalities gives nazis....
And please donґt blame us with our History and think about Stalin when you saying that...
I think and hope you where angry when you writing the Posting!

Sorry for the Offtopic!


I dont think you understOOd what I said, I didnt not mention any nation in specific, in fact, my reply was specificaly for spellchecker personaly, individualy, he/she's the one who brough up the nationalities in the issue and call up nazi.
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 SLL

  • Hero Member
  • *****
  • Posts: 585
    • View Profile
Re: [Mod] User upload limits
« Reply #116 on: October 15, 2005, 10:03:06 AM »
but are not humble enough to admit your english skills are as bad as from a 5 year old kid.

spellcheck this, asshole...


Offline NTH

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: [Mod] User upload limits
« Reply #117 on: October 16, 2005, 11:41:21 AM »
:)
The script very good...but I discovered 1 bug.
When I upload images this link   /member.php?action=uploadform    the upload limit script doesn't work.  :roll:
The script only work, if I upload the images to the categories.
What's the result.

Offline Lucifix

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
    • http://www.slo-foto.net
Re: [Mod] User upload limits
« Reply #118 on: November 03, 2005, 03:11:50 PM »
Who can help me solve that problem?

In my gallery when you upload photo you'll get these errors:

Code: [Select]

DB Error: Bad SQL Query: SELECT user_limit FROM 4images_users WHERE user_id =
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 '' at line 1

DB Error: Bad SQL Query: SELECT COUNT(*) AS num_rows_all FROM 4images_images WHERE image_active = 1 AND user_id = AND image_date > 1130853879
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 image_date > 1130853879' at line 3

I check my code but everything seemse OK:
Code: [Select]
function check_daily_picture_limit($user_id) {
global $site_db, $site_template;

$sql = "SELECT user_limit FROM ".USERS_TABLE." WHERE user_id = $user_id";
$result = $site_db->query($sql);
$row = $site_db->fetch_array($result);
$upload_limit = ($row['user_limit']);
$site_template->register_vars("upload_limit", $upload_limit);


$limit_cutoff = time() - 60 * 60 * 48;

$sql = "SELECT COUNT(*) AS num_rows_all
FROM ".IMAGES_TABLE."
WHERE image_active = 1 AND user_id = $user_id AND image_date > $limit_cutoff";
$row = $site_db->query_firstrow($sql);
$images_per_user = $row['num_rows_all'];

$site_template->register_vars("images_per_user", $images_per_user);

if($images_per_user >= $upload_limit) {
return false;
} else {
return true;
}
}

If you check that error carfuly you'll see that user_id is the problem. But I triend to insert

Code: [Select]
echo $user_id;
 just before $sql and it shows my ID correct.

Please help me with these one, couse I just can't solve it!

Offline Darkness2001

  • Full Member
  • ***
  • Posts: 151
    • View Profile
    • photo-galerie-online
Re: [Mod] User upload limits
« Reply #119 on: November 21, 2005, 06:25:52 PM »
Hello,

HELP..... I destroy my 4images_settings data and I dont have a Update for this file, pleas give me the code for the table...  :oops:

CREATE TABLE '4images_settings' .... ????

Greez Darkness