Elxis CMS Forum
Extensions => Modules => Topic started by: martiras on October 01, 2009, 13:49:18
-
Is there any chance to put in mod_latestnews.php the source code for icon date and time(posted) near the links?
example .... Latest news: 'icon' 30/09, 17:06 'link title'
'icon' 23/10, 14:03 'link title'
thanks
-
What icon?
For the date, I guess you mean the article's created date.
Open modules/mod_latestnews.php
On the 3 SELECT statements you must add column "created" in the query in order to get this information from the database.
For case 2
from:
$query = "SELECT a.id, a.title, a.seotitle FROM #__content a"
change to:
$query = "SELECT a.id, a.title, a.created, a.seotitle FROM #__content a"
For case 3
from:
$query = "SELECT a.id, a.title, a.seotitle, a.sectionid, cc.seotitle AS seocat, cc.access AS catacc,"
change to:
$query = "SELECT a.id, a.title, a.created, a.seotitle, a.sectionid, cc.seotitle AS seocat, cc.access AS catacc,"
For case 1
from:
$query = "SELECT a.id, a.title, a.seotitle, a.sectionid, a.catid, cc.seotitle AS seocat, s.seotitle AS seosec"
change to:
$query = "SELECT a.id, a.title, a.created, a.seotitle, a.sectionid, a.catid, cc.seotitle AS seocat, s.seotitle AS seosec"
Now go down on line 158(*) where the links are displayed. Add before the link ( <a href=... ):
<?php echo mosFormatDate($row->created, "%d %b %Y %H:%M"); ?>
* Note: The line number may vary depending on your Elxis version.
-
thanks is working fine
but how can i change the month format .... example: from aug to 08
-
Read this please: http://www.php.net/manual/en/function.date.php
-
thank you :P