mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 04:10:38 +02:00
Show activation start date instead of post date if set
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||
* $Id: news_shortcodes.php,v 1.31 2009-10-23 18:14:42 secretr Exp $
|
||||
* $Id: news_shortcodes.php,v 1.32 2009-12-03 20:46:39 bugrain Exp $
|
||||
*
|
||||
* News shortcode batch
|
||||
*/
|
||||
@@ -166,24 +166,25 @@ class news_shortcodes
|
||||
|
||||
function sc_newsdate($parm)
|
||||
{
|
||||
$date = ($this->news_item['news_start'] > 0) ? $this->news_item['news_start'] : $this->news_item['news_datestamp'];
|
||||
$con = new convert;
|
||||
if($parm == '')
|
||||
{
|
||||
return $con->convert_date($this->news_item['news_datestamp'], 'long');
|
||||
return $con->convert_date($date, 'long');
|
||||
}
|
||||
switch($parm)
|
||||
{
|
||||
case 'long':
|
||||
return $con->convert_date($this->news_item['news_datestamp'], 'long');
|
||||
return $con->convert_date($date, 'long');
|
||||
break;
|
||||
case 'short':
|
||||
return $con->convert_date($this->news_item['news_datestamp'], 'short');
|
||||
return $con->convert_date($date, 'short');
|
||||
break;
|
||||
case 'forum':
|
||||
return $con->convert_date($this->news_item['news_datestamp'], 'forum');
|
||||
return $con->convert_date($date, 'forum');
|
||||
break;
|
||||
default :
|
||||
return date($parm, $this->news_item['news_datestamp']);
|
||||
return date($parm, $date);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user