Browse Source

Fix date time

Fix the date and time on the edit content page so it will displayed as
year, month, day, hour, minute, and second.
pull/189/head
Danang Probo Sayekti 10 years ago
parent
commit
6ff9b03bf3
6 changed files with 24 additions and 18 deletions
  1. +4
    -3
      system/admin/views/edit-audio.html.php
  2. +4
    -3
      system/admin/views/edit-image.html.php
  3. +4
    -3
      system/admin/views/edit-link.html.php
  4. +4
    -3
      system/admin/views/edit-post.html.php
  5. +4
    -3
      system/admin/views/edit-quote.html.php
  6. +4
    -3
      system/admin/views/edit-video.html.php

+ 4
- 3
system/admin/views/edit-audio.html.php View File

@ -28,7 +28,7 @@ $replaced = substr($oldurl[0], 0, strrpos($oldurl[0], '/')) . '/';
$dt = str_replace($replaced, '', $oldurl[0]);
$t = str_replace('-', '', $dt);
$time = new DateTime($t);
$timestamp = $time->format("Y-m-d");
$timestamp = $time->format("Y-m-d H:i:s");
// The post date
$postdate = strtotime($timestamp);
// The post URL
@ -64,8 +64,9 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
} ?>" value="<?php echo $oldtag ?>"/><br><br>
Url (optional)<br><input type="text" name="url" class="text" value="<?php echo $oldmd ?>"/><br>
<span class="help">If the url leave empty we will use the post title.</span><br><br>
Date Time<br><input type="date" name="date" class="text" value="<?php echo $timestamp; ?>"><br><input
type="time" name="time" class="text" value="<?php echo $time->format('H:i'); ?>"><br><br>
Year, Month, Day<br><input type="date" name="date" class="text" value="<?php echo date('Y-m-d', $postdate); ?>"><br>
Hour, Minute, Second<br><input
type="time" name="time" class="text" value="<?php echo $time->format('H:i:s'); ?>"><br><br>
Meta Description (optional)<br><textarea name="description" maxlength="200"><?php if (isset($p->description)) {
echo $p->description;
} else {echo $olddescription;}?></textarea>


+ 4
- 3
system/admin/views/edit-image.html.php View File

@ -28,7 +28,7 @@ $replaced = substr($oldurl[0], 0, strrpos($oldurl[0], '/')) . '/';
$dt = str_replace($replaced, '', $oldurl[0]);
$t = str_replace('-', '', $dt);
$time = new DateTime($t);
$timestamp = $time->format("Y-m-d");
$timestamp = $time->format("Y-m-d H:i:s");
// The post date
$postdate = strtotime($timestamp);
// The post URL
@ -64,8 +64,9 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
} ?>" value="<?php echo $oldtag ?>"/><br><br>
Url (optional)<br><input type="text" name="url" class="text" value="<?php echo $oldmd ?>"/><br>
<span class="help">If the url leave empty we will use the post title.</span><br><br>
Date Time<br><input type="date" name="date" class="text" value="<?php echo $timestamp; ?>"><br><input
type="time" name="time" class="text" value="<?php echo $time->format('H:i'); ?>"><br><br>
Year, Month, Day<br><input type="date" name="date" class="text" value="<?php echo date('Y-m-d', $postdate); ?>"><br>
Hour, Minute, Second<br><input
type="time" name="time" class="text" value="<?php echo $time->format('H:i:s'); ?>"><br><br>
Meta Description (optional)<br><textarea name="description" maxlength="200"><?php if (isset($p->description)) {
echo $p->description;
} else {echo $olddescription;}?></textarea>


+ 4
- 3
system/admin/views/edit-link.html.php View File

@ -28,7 +28,7 @@ $replaced = substr($oldurl[0], 0, strrpos($oldurl[0], '/')) . '/';
$dt = str_replace($replaced, '', $oldurl[0]);
$t = str_replace('-', '', $dt);
$time = new DateTime($t);
$timestamp = $time->format("Y-m-d");
$timestamp = $time->format("Y-m-d H:i:s");
// The post date
$postdate = strtotime($timestamp);
// The post URL
@ -64,8 +64,9 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
} ?>" value="<?php echo $oldtag ?>"/><br><br>
Url (optional)<br><input type="text" name="url" class="text" value="<?php echo $oldmd ?>"/><br>
<span class="help">If the url leave empty we will use the post title.</span><br><br>
Date Time<br><input type="date" name="date" class="text" value="<?php echo $timestamp; ?>"><br><input
type="time" name="time" class="text" value="<?php echo $time->format('H:i'); ?>"><br><br>
Year, Month, Day<br><input type="date" name="date" class="text" value="<?php echo date('Y-m-d', $postdate); ?>"><br>
Hour, Minute, Second<br><input
type="time" name="time" class="text" value="<?php echo $time->format('H:i:s'); ?>"><br><br>
Meta Description (optional)<br><textarea name="description" maxlength="200"><?php if (isset($p->description)) {
echo $p->description;
} else {echo $olddescription;}?></textarea>


+ 4
- 3
system/admin/views/edit-post.html.php View File

@ -27,7 +27,7 @@ $replaced = substr($oldurl[0], 0, strrpos($oldurl[0], '/')) . '/';
$dt = str_replace($replaced, '', $oldurl[0]);
$t = str_replace('-', '', $dt);
$time = new DateTime($t);
$timestamp = $time->format("Y-m-d");
$timestamp = $time->format("Y-m-d H:i:s");
// The post date
$postdate = strtotime($timestamp);
// The post URL
@ -63,8 +63,9 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
} ?>" value="<?php echo $oldtag ?>"/><br><br>
Url (optional)<br><input type="text" name="url" class="text" value="<?php echo $oldmd ?>"/><br>
<span class="help">If the url leave empty we will use the post title.</span><br><br>
Date Time<br><input type="date" name="date" class="text" value="<?php echo $timestamp; ?>"><br><input
type="time" name="time" class="text" value="<?php echo $time->format('H:i'); ?>"><br><br>
Year, Month, Day<br><input type="date" name="date" class="text" value="<?php echo date('Y-m-d', $postdate); ?>"><br>
Hour, Minute, Second<br><input
type="time" name="time" class="text" value="<?php echo $time->format('H:i:s'); ?>"><br><br>
Meta Description (optional)<br><textarea name="description" maxlength="200"><?php if (isset($p->description)) {
echo $p->description;
} else { echo $olddescription;} ?></textarea>


+ 4
- 3
system/admin/views/edit-quote.html.php View File

@ -28,7 +28,7 @@ $replaced = substr($oldurl[0], 0, strrpos($oldurl[0], '/')) . '/';
$dt = str_replace($replaced, '', $oldurl[0]);
$t = str_replace('-', '', $dt);
$time = new DateTime($t);
$timestamp = $time->format("Y-m-d");
$timestamp = $time->format("Y-m-d H:i:s");
// The post date
$postdate = strtotime($timestamp);
// The post URL
@ -64,8 +64,9 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
} ?>" value="<?php echo $oldtag ?>"/><br><br>
Url (optional)<br><input type="text" name="url" class="text" value="<?php echo $oldmd ?>"/><br>
<span class="help">If the url leave empty we will use the post title.</span><br><br>
Date Time<br><input type="date" name="date" class="text" value="<?php echo $timestamp; ?>"><br><input
type="time" name="time" class="text" value="<?php echo $time->format('H:i'); ?>"><br><br>
Year, Month, Day<br><input type="date" name="date" class="text" value="<?php echo date('Y-m-d', $postdate); ?>"><br>
Hour, Minute, Second<br><input
type="time" name="time" class="text" value="<?php echo $time->format('H:i:s'); ?>"><br><br>
Meta Description (optional)<br><textarea name="description" maxlength="200"><?php if (isset($p->description)) {
echo $p->description;
} else {echo $olddescription;}?></textarea>


+ 4
- 3
system/admin/views/edit-video.html.php View File

@ -28,7 +28,7 @@ $replaced = substr($oldurl[0], 0, strrpos($oldurl[0], '/')) . '/';
$dt = str_replace($replaced, '', $oldurl[0]);
$t = str_replace('-', '', $dt);
$time = new DateTime($t);
$timestamp = $time->format("Y-m-d");
$timestamp = $time->format("Y-m-d H:i:s");
// The post date
$postdate = strtotime($timestamp);
// The post URL
@ -64,8 +64,9 @@ $delete = site_url() . date('Y/m', $postdate) . '/' . $oldmd . '/delete?destinat
} ?>" value="<?php echo $oldtag ?>"/><br><br>
Url (optional)<br><input type="text" name="url" class="text" value="<?php echo $oldmd ?>"/><br>
<span class="help">If the url leave empty we will use the post title.</span><br><br>
Date Time<br><input type="date" name="date" class="text" value="<?php echo $timestamp; ?>"><br><input
type="time" name="time" class="text" value="<?php echo $time->format('H:i'); ?>"><br><br>
Year, Month, Day<br><input type="date" name="date" class="text" value="<?php echo date('Y-m-d', $postdate); ?>"><br>
Hour, Minute, Second<br><input
type="time" name="time" class="text" value="<?php echo $time->format('H:i:s'); ?>"><br><br>
Meta Description (optional)<br><textarea name="description" maxlength="200"><?php if (isset($p->description)) {
echo $p->description;
} else {echo $olddescription;}?></textarea>


Loading…
Cancel
Save