mirror of
https://github.com/danpros/htmly.git
synced 2026-04-17 11:16:00 +05:30
Revert back the date_format
We will change the date format in one go later.
This commit is contained in:
parent
73e103b8ab
commit
0fc0d127da
8 changed files with 21 additions and 9 deletions
|
|
@ -673,7 +673,6 @@ function get_feed($feed_url, $credit)
|
|||
// Get recent posts by user
|
||||
function get_user_posts()
|
||||
{
|
||||
global $date_format;
|
||||
|
||||
if (isset($_SESSION[config("site.url")]['user'])) {
|
||||
$posts = get_profile_posts($_SESSION[config("site.url")]['user'], 1, 5);
|
||||
|
|
@ -696,7 +695,7 @@ function get_user_posts()
|
|||
$i++;
|
||||
echo '<tr class="' . $class . '">';
|
||||
echo '<td><a target="_blank" href="' . $p->url . '">' . $p->title . '</a></td>';
|
||||
echo '<td>' . strftime($date_format, $p->date) . '</td>';
|
||||
echo '<td>' . date('d F Y', $p->date) . '</td>';
|
||||
if (config("views.counter") == "true")
|
||||
echo '<td>' . $p->views . '</td>';
|
||||
echo '<td>' . $p->tag . '</td>';
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
?>
|
||||
<tr class="<?php echo $class ?>">
|
||||
<td><a target="_blank" href="<?php echo $p->url ?>"><?php echo $p->title ?></a></td>
|
||||
<td><?php echo strftime($date_format, $p->date) ?></td>
|
||||
<td><?php echo date('d F Y', $p->date) ?></td>
|
||||
<?php if (config("views.counter") == "true"): ?>
|
||||
<td><?php echo $p->views ?></td><?php endif; ?>
|
||||
<td><a target="_blank" href="<?php echo $p->authorUrl ?>"><?php echo $p->author ?></a></td>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
?>
|
||||
<tr class="<?php echo $class ?>">
|
||||
<td><a target="_blank" href="<?php echo $p->url ?>"><?php echo $p->title ?></a></td>
|
||||
<td><?php echo strftime($date_format, $p->date) ?></td>
|
||||
<td><?php echo date('d F Y', $p->date) ?></td>
|
||||
<?php if (config("views.counter") == "true"): ?>
|
||||
<td><?php echo $p->views ?></td><?php endif; ?>
|
||||
<td><a target="_blank" href="<?php echo $p->authorUrl ?>"><?php echo $p->author ?></a></td>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
?>
|
||||
<tr class="<?php echo $class ?>">
|
||||
<td><?php echo $p->title ?></td>
|
||||
<td><?php echo strftime($date_format, $p->date) ?></td>
|
||||
<td><?php echo date('d F Y', $p->date) ?></td>
|
||||
<td><?php echo strip_tags($p->tag) ?></td>
|
||||
<td><a href="<?php echo $p->url ?>/edit?destination=admin/draft"><?php echo i18n('Edit');?></a> <a href="<?php echo $p->url ?>/delete?destination=admin/draft"><?php echo i18n('Delete');?></a></td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -3215,7 +3215,7 @@ function get_language()
|
|||
setlocale(LC_ALL, 'en_US'); // Change time format to English
|
||||
} else {
|
||||
if (file_exists($langFile)) {
|
||||
i18n('source', 'lang/' . $langID . '.ini');
|
||||
i18n('source', $langFile);
|
||||
setlocale(LC_ALL, $local);
|
||||
} else {
|
||||
i18n('source', 'lang/en.ini'); // Load the English language file
|
||||
|
|
@ -3224,3 +3224,16 @@ function get_language()
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
function format_date($date)
|
||||
{
|
||||
|
||||
$date_format = config('date.format');
|
||||
|
||||
if (!isset($date_format) || empty($date_format)) {
|
||||
return date('d F Y', $date);
|
||||
} else {
|
||||
return date($date_format, $date);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
$i++; ?>
|
||||
<li class="<?php echo $class; ?>">
|
||||
<span><a href="<?php echo $p->url ?>"><?php echo $p->title ?></a></span> on
|
||||
<span><?php echo strftime($date_format, $p->date) ?></span> - <?php echo i18n('Posted_in');?> <span><?php echo $p->tag ?></span>
|
||||
<span><?php echo date('d F Y', $p->date) ?></span> - <?php echo i18n('Posted_in');?> <span><?php echo $p->tag ?></span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
<footer class="entry-footer">
|
||||
<span class="byline"><span class="author vcard"><a href="<?php echo $p->authorUrl;?>"><img alt="<?php echo $p->author;?>" src="<?php echo site_url();?>themes/twentysixteen/img/avatar.png" class="avatar avatar-49 grav-hashed grav-hijack" height="49" width="49"></a><span class="screen-reader-text">Author </span> <a class="url fn n" href="<?php echo $p->authorUrl;?>"><?php echo $p->author;?></a></span></span>
|
||||
<span class="posted-on"><span class="screen-reader-text"><?php echo i18n('Posted_on');?> </span><a href="<?php echo $p->url;?>" rel="bookmark"><time class="entry-date published"><?php global $date_format; echo strftime($date_format, $p->date) ?></time></a></span>
|
||||
<span class="posted-on"><span class="screen-reader-text"><?php echo i18n('Posted_on');?> </span><a href="<?php echo $p->url;?>" rel="bookmark"><time class="entry-date published"><?php echo date('d F Y', $p->date) ?></time></a></span>
|
||||
<span class="cat-links"><span class="screen-reader-text"><?php echo i18n('Category');?> </span><?php echo $p->category;?></span>
|
||||
<span class="tags-links"><span class="screen-reader-text">Tags </span><?php echo $p->tag;?></span>
|
||||
<?php if (disqus_count()) { ?>
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
<footer class="entry-footer">
|
||||
<span class="byline"><span class="author vcard"><a href="<?php echo $p->authorUrl;?>"><img alt="<?php echo $p->author;?>" title="<?php echo $p->author;?>" src="<?php echo site_url();?>themes/twentysixteen/img/avatar.png" class="avatar avatar-49 grav-hashed grav-hijack" height="49" width="49"/></a><span class="screen-reader-text">Author </span> <a class="url fn n" href="<?php echo $p->authorUrl;?>"><?php echo $p->author;?></a></span></span>
|
||||
|
||||
<span class="posted-on"><span class="screen-reader-text">Posted on </span><a href="<?php echo $p->url;?>" rel="bookmark"><time class="entry-date published"><?php echo strftime($date_format, $p->date) ?></time></a></span>
|
||||
<span class="posted-on"><span class="screen-reader-text">Posted on </span><a href="<?php echo $p->url;?>" rel="bookmark"><time class="entry-date published"><?php echo date('d F Y', $p->date) ?></time></a></span>
|
||||
|
||||
<span class="cat-links"><span class="screen-reader-text"><?php echo i18n('Category');?> </span><?php echo $p->category;?></span>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue