Very good plug-in. I would like to change the order of date time: At the moment its says '2013-08-06 15:10:49' I would like to change it to something like '08-September-2013 @ 15:10'
Thanks in advance
Very good plug-in. I would like to change the order of date time: At the moment its says '2013-08-06 15:10:49' I would like to change it to something like '08-September-2013 @ 15:10'
Thanks in advance
Look at the block of code added to /YOUR_ADMIN/includes/header.php, starting at line 211:
and change that toCode://-bof-lat9 Display last password change and login if (function_exists('zen_get_admin_name') && function_exists('zen_read_user')) { $adminInfo = zen_read_user(zen_get_admin_name($_SESSION['admin_id'])); ?> </tr> <tr> <td align="right" class="main" valign="top"><?php echo TEXT_PASSWORD_LAST_CHANGE . $adminInfo['pwd_last_change_date']; ?></td> </tr> <tr> <td align="right" class="main" valign="top"><?php echo TEXT_LAST_LOGIN_INFO . $_SESSION['last_login_date'] . ' [' . $_SESSION['last_login_ip'] . ']'; ?></td> <?php } //-eof-lat9
Code://-bof-lat9 Display last password change and login if (function_exists('zen_get_admin_name') && function_exists('zen_read_user')) { $adminInfo = zen_read_user(zen_get_admin_name($_SESSION['admin_id'])); ?> </tr> <tr> <td align="right" class="main" valign="top"><?php echo TEXT_PASSWORD_LAST_CHANGE . substr($adminInfo['pwd_last_change_date'], 0, 10) . ' @ ' . substr($adminInfo['pwd_last_change_date'], 11, 5); ?></td> </tr> <tr> <td align="right" class="main" valign="top"><?php echo TEXT_LAST_LOGIN_INFO . $_SESSION['last_login_date'] . ' [' . $_SESSION['last_login_ip'] . ']'; ?></td> <?php } //-eof-lat9
OK, let's try like this:The format I chose for strftime will output something similar to '14-September-2013 @ 12:25'. There are many, many more formatting options available for the strftime function (http://us2.php.net/manual/en/function.strftime.php)!Code://-bof-lat9 Display last password change and login if (function_exists('zen_get_admin_name') && function_exists('zen_read_user')) { $adminInfo = zen_read_user(zen_get_admin_name($_SESSION['admin_id'])); $year = substr($adminInfo['pwd_last_change_date'], 0, 4); $month = substr($adminInfo['pwd_last_change_date', 5, 2); $day = substr($adminInfo['pwd_last_change_date', 8, 2); $hour = substr($adminInfo['pwd_last_change_date', 11, 2); $minute = substr($adminInfo['pwd_last_change_date', 14, 2); $second = substr($adminInfo['pwd_last_change_date, 17, 2); $timestamp = mktime($hour, $minute, $second, $month, $day, $year); ?> </tr> <tr> <td align="right" class="main" valign="top"><?php echo TEXT_PASSWORD_LAST_CHANGE . strftime('%d-%B-%Y @ %H:%M', $timestamp); ?></td> </tr> <tr> <td align="right" class="main" valign="top"><?php echo TEXT_LAST_LOGIN_INFO . $_SESSION['last_login_date'] . ' [' . $_SESSION['last_login_ip'] . ']'; ?></td> <?php } //-eof-lat9
Thanks for the link. A bit of light reading for bedtime. I will get back when I get the changes done and paste the code in here.
Thanks to mprough for submitting an updated version (v1.1.0) that includes the Zen Cart v1.5.3 changes.
Please Note: Due to the password-related changes (and new functions introduced) in Zen Cart v1.5.3, this version will work only on Zen Cart v1.5.3 installations. Please continue to use v1.0.0 on Zen Cart v1.5.0 through v1.5.2 installations.
v1.1.2 is now available from the Plugins area. The update provides downwardly-compatible changes required for Zen Cart v1.5.4.