SimplePortal
Customization => Custom Coding => Topic started by: Snoopix on January 05, 2014, 03:32:17 PM
-
Hi guys, i want change time format on portal articles,
<div class="middletext">', $article['message']['time'], ' ', $txt['by'], ' ', $article['poster']['link'], '<br />', $txt['sp-articlesViews'], ': ', $article['topic']['views'], ' | ', $txt['sp-articlesComments'], ': ', $article['topic']['replies'], '</div>';
but i don't know how do it, i want change only this time format not default time format (all forum).
ps. sorry my english is bad : 3
-
Sources/PortalArticles.php
'time' => timeformat($row['poster_time']),
'time' => timeformat($row['poster_time'], '%d %m %Y'),
Change '%d %m %Y' as the desired time format. You can use the same style that you use in SMF admin settings.
-
hi
for change recent topics block's time format need change time format on function ssi_recentTopics (ssi.php)?
thx a lot
-
hi
for change recent topics block's time format need change time format on function ssi_recentTopics (ssi.php)?
thx a lot
Yes, since the sp_recent function in the PortalBlocks.php file uses SSI.
Alternatively you could just rewrite all the queries and place them in this function.
-
You can do this instead:
Sources/PortalBlocks.php
if ($display == 'compact')
foreach ($items as $key => $item)
$items[$key]['time'] = timeformat($item['timestamp'], '%d %m %Y', 'none');
if ($display == 'compact')
Again change '%d %m %Y' as the desired time format.