4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: pcfreak on October 14, 2002, 11:58:37 PM

Title: question about the "Ablaufdatum"
Post 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 ?
Title: question about the "Ablaufdatum"
Post by: pcfreak on October 15, 2002, 04:40:15 PM
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.??
Title: question about the "Ablaufdatum"
Post by: pcfreak on October 16, 2002, 01:56:06 PM
Niemand  :cry:
Title: question about the "Ablaufdatum"
Post by: pcfreak on October 16, 2002, 11:28:17 PM
weist keine ein antword, oder is er keine antword moglich.

sorry, I'm from the netherlands, (meine deutche sprage is bad :oops: )
Title: question about the "Ablaufdatum"
Post by: Jan on October 16, 2002, 11:58:36 PM
Replace in "admin/usergroups.php"

Code: [Select]
$end_date = 0;
(2 times)
with
Code: [Select]
$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
Title: question about the "Ablaufdatum"
Post by: pcfreak on October 17, 2002, 01:02:22 AM
It works only once, this works fine ->

REPLACE
Code: [Select]

  if ((!check_admin_date($end_date) && $end_date != 0) || $end_date == "") {
    $end_date = 0;
  }


WITH

Code: [Select]

 if (!check_admin_date($end_date)) {
    $time = time()  + 60 * 60 * 24 * 1;
$end_date = date("Y-m-d H:i:s", $time);
  }



REPLACE


Code: [Select]

 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

Code: [Select]

      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