maybe the problem is that i already have installed once the install_user_limit.php and now if i try to do it for the second time it shows: 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'
i know that the mod instructions say that we shouldn't do it twice. so what should i do?
here are the rest of the changed codes
register php: $current_time = time();
$user_level = ($config['account_activation'] == 0) ? USER : USER_AWAITING;
$user_limit= $config['default_upload_limit'];
$sql = "INSERT INTO ".USERS_TABLE."
(".get_user_table_field("", "user_id").get_user_table_field(", ", "user_level").get_user_table_field(", ", "user_name").get_user_table_field(", ", "user_password").get_user_table_field(", ", "user_email").get_user_table_field(", ", "user_showemail").get_user_table_field(", ", "user_allowemails").get_user_table_field(", ", "user_invisible").get_user_table_field(", ", "user_joindate").get_user_table_field(", ", "user_activationkey").get_user_table_field(", ", "user_lastaction").get_user_table_field(", ", "user_lastvisit").get_user_table_field(", ", "user_comments").get_user_table_field(", ", "user_homepage").get_user_table_field(", ", "user_icq").(", ").('user_limit').$additional_field_sql.")
VALUES
($user_id, $user_level, '$user_name', '".md5($user_password)."', '$user_email', $user_showemail, $user_allowemails, $user_invisible, $current_time, '$activationkey', $current_time, $current_time, 0, '$user_homepage', '$user_icq', $user_limit".$additional_value_sql.")";
$result = $site_db->query($sql);
admin/users:
show_input_row($lang['field_icq'], "user_icq", $user_row['user_icq'], $textinput_size);
show_input_row($lang['field_limit'], "user_limit", $user_row['user_limit']);
admin/settings:
show_setting_row("max_media_size");
show_setting_row("default_upload_limit");
and the rest were the lang files.
thanks