-
AuthorPosts
-
teletrance Friend
teletrance
- Join date:
- July 2008
- Posts:
- 110
- Downloads:
- 0
- Uploads:
- 10
- Thanks:
- 11
- Thanked:
- 8 times in 1 posts
February 18, 2011 at 10:59 am #160371Hi, I would like to change Las update function with current time in teline IV. can you tell please what php code should change?
thanks!teletrance Friendteletrance
- Join date:
- July 2008
- Posts:
- 110
- Downloads:
- 0
- Uploads:
- 10
- Thanks:
- 11
- Thanked:
- 8 times in 1 posts
February 18, 2011 at 11:27 am #377366hm, solved: 🙂 in /templates/ja_teline_iv/blocks/topbar.php replace
<p class="ja-updatetime"><span><?php echo JText::_('Last update')?></span><em><?php echo T3Common::getLastUpdate(); ?></em></p>
with
<p class="ja-updatetime"><span><?php echo JText::_('')?></span><em><?php echo JHTML::date(''); ?></em></p>
1 user says Thank You to teletrance for this useful post
powerfuldarkangel Friendpowerfuldarkangel
- Join date:
- June 2011
- Posts:
- 30
- Downloads:
- 0
- Uploads:
- 4
- Thanks:
- 6
- Thanked:
- 1 times in 1 posts
July 19, 2011 at 9:46 pm #401939The only thing this does is put the current date instead of the last update…. I need it to show the time not the date… Pls help! :((
chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
July 26, 2011 at 2:55 am #403011Hi powerfuldarkangel
This is a bug and it will be fixed soon. You can follow this bug via http://pm.joomlart.com/browse/JAECPLGTIIIJOOMLAIVI-177
chavan Friendchavan
- Join date:
- October 2014
- Posts:
- 4612
- Downloads:
- 0
- Uploads:
- 110
- Thanked:
- 1440 times in 1290 posts
August 1, 2011 at 4:19 am #403860Hi powerfuldarkangel
You open file plugins/system/jat3/jat3/core/common.php
Replace
function getLastUpdate($fieldname = null) {
.....
}
by
function getLastUpdate($fieldname = null)
{
if (!$fieldname) $fieldname = 'created';
$db = &JFactory::getDBO();
$query = "SELECT `$fieldname` FROM #__content a ORDER BY `$fieldname` DESC LIMIT 1";
$db->setQuery($query);
$data = $db->loadObject();
if ($data->$fieldname) {
$date = JFactory::getDate(strtotime($data->$fieldname));
//get timezone configured in Global setting
$app = & JFactory::getApplication();
// Get timezone offset
$tz = $app->getCfg('offset');
// Set timezone offset for date
$date->setTimezone(new DateTimeZone($tz));
//return by the format defined in language
return $date->toFormat(JText::_('T3_DATE_FORMAT_LASTUPDATE'), true);
}
return ;
}
This bug was fixed and will be release in next version of T3 framework.
December 1, 2011 at 4:17 am #427409I am using the latest Teline IV but the problem is not fixed.
http://www.joomlart.com/forums/topic/date-and-time-information-at-left-corner-top-does-now-work/.
<em>@Do Ha 256735 wrote:</em><blockquote>Hi powerfuldarkangel
You open file plugins/system/jat3/jat3/core/common.php
Replace
function getLastUpdate($fieldname = null) {
.....
}
by
function getLastUpdate($fieldname = null)
{
if (!$fieldname) $fieldname = 'created';
$db = &JFactory::getDBO();
$query = "SELECT `$fieldname` FROM #__content a ORDER BY `$fieldname` DESC LIMIT 1";
$db->setQuery($query);
$data = $db->loadObject();
if ($data->$fieldname) {
$date = JFactory::getDate(strtotime($data->$fieldname));
//get timezone configured in Global setting
$app = & JFactory::getApplication();
// Get timezone offset
$tz = $app->getCfg('offset');
// Set timezone offset for date
$date->setTimezone(new DateTimeZone($tz));
//return by the format defined in language
return $date->toFormat(JText::_('T3_DATE_FORMAT_LASTUPDATE'), true);
}
return ;
}
This bug was fixed and will be release in next version of T3 framework.</blockquote>
-
AuthorPosts
This topic contains 6 replies, has 4 voices, and was last updated by norito 12 years, 11 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum