4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: pcfreak on October 14, 2002, 11:58:37 PM
-
i have a question
when a user is registerd can het automatic set on in a prived album
the "Ablaufdatum" is standard on "0" selected
is it posible to set it automatic on a hour or on 2 hours when a user is logged in ?
-
Who can help me
?? please
when i want a user give a usergroep acces, then Aktivierungsdatum is set automatic on the system date, but the Ablaufdatum is always 0
How can the ablaufdatum automatic set on example 1 hour, our 1 day later.??
-
Niemand :cry:
-
weist keine ein antword, oder is er keine antword moglich.
sorry, I'm from the netherlands, (meine deutche sprage is bad :oops: )
-
Replace in "admin/usergroups.php"
$end_date = 0;
(2 times)
with
$time = time() + 60 * 60 * 24 * 1;
$end_date = date("Y-m-d H:i:s", $time);
Replace 1 with the numberof day or 24 with number of hours.
Jan
-
It works only once, this works fine ->
REPLACE
if ((!check_admin_date($end_date) && $end_date != 0) || $end_date == "") {
$end_date = 0;
}
WITH
if (!check_admin_date($end_date)) {
$time = time() + 60 * 60 * 24 * 1;
$end_date = date("Y-m-d H:i:s", $time);
}
REPLACE
if (isset($usergroup_match_array[$key]['groupmatch_enddate'])) {
$end_date = ($usergroup_match_array[$key]['groupmatch_enddate'] != 0) ? date("Y-m-d H:i:s", $usergroup_match_array[$key]['groupmatch_enddate']) : $usergroup_match_array[$key]['groupmatch_enddate'];
}
else {
$end_date = 0;
}
show_usergroup_row($key, $val, $start_date, $end_date);
}
}
WITH
if (isset($usergroup_match_array[$key]['groupmatch_enddate'])) {
$time = time() + 60 * 60 * 24 * 1;
$end_date = date("Y-m-d H:i:s", $time);
}
Thanks Jan for the hint, aobut the time code