mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 14:17:49 +02:00
Show activation start date instead of post date if set
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
* 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
|
* News shortcode batch
|
||||||
*/
|
*/
|
||||||
@@ -166,24 +166,25 @@ class news_shortcodes
|
|||||||
|
|
||||||
function sc_newsdate($parm)
|
function sc_newsdate($parm)
|
||||||
{
|
{
|
||||||
|
$date = ($this->news_item['news_start'] > 0) ? $this->news_item['news_start'] : $this->news_item['news_datestamp'];
|
||||||
$con = new convert;
|
$con = new convert;
|
||||||
if($parm == '')
|
if($parm == '')
|
||||||
{
|
{
|
||||||
return $con->convert_date($this->news_item['news_datestamp'], 'long');
|
return $con->convert_date($date, 'long');
|
||||||
}
|
}
|
||||||
switch($parm)
|
switch($parm)
|
||||||
{
|
{
|
||||||
case 'long':
|
case 'long':
|
||||||
return $con->convert_date($this->news_item['news_datestamp'], 'long');
|
return $con->convert_date($date, 'long');
|
||||||
break;
|
break;
|
||||||
case 'short':
|
case 'short':
|
||||||
return $con->convert_date($this->news_item['news_datestamp'], 'short');
|
return $con->convert_date($date, 'short');
|
||||||
break;
|
break;
|
||||||
case 'forum':
|
case 'forum':
|
||||||
return $con->convert_date($this->news_item['news_datestamp'], 'forum');
|
return $con->convert_date($date, 'forum');
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
return date($parm, $this->news_item['news_datestamp']);
|
return date($parm, $date);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user