Hi guys,
Was wondering if the hard-coded $submitted was necessary and could be permanently removed from Sky? I noticed it was hard-coded when attempting to use the submitted_by module, removing the lines below solved the problem but since this theme is so well maintained I'm sure I'll have to manually remove it in the future again. :)
I don't think this code does anything anymore, other than override $submitted unnecessarily?
In preprocess-node.inc:
// Use Microformats for Dates
if ($vars['submitted']) {
$vars['submitted'] = t('Posted <abbr class="created" title="!microdate">@date</abbr> by !username', array(
'!username' => theme('username', $node),
'@date' => format_date($node->created),
'!microdate' => format_date($node->created, 'custom', "Y-m-d\TH:i:sO")
)
);
}
Thanks!
Comments
Comment #1
jacineIt definitely does something... It overrides that variable, makes a microformatted version of the submitted date, and that date prints out in templates/node.tpl.php.
I've never used the "submitted by" module, and you are fine to remove that if you want, but the implementation in Sky is actually a "feature," so removing it permanently wouldn't be best for everyone else that doesn't use that module.
Having an option to enable/disable as a theme settings is probably doable... Will look at doing that in the next release.
Comment #2
Apollo610 commentedThanks Jacine, an on/off switch would be great. I'm actually unfamiliar with microformatted dates so didn't realize what was going on in the preprocess - I just knew it was overwriting my overwrite. :)
Thanks again!
Comment #3
aimutch commentedI would like this to be an option too.
Comment #4
jacineDecided to just revert this to the default. It has been committed to HEAD and will show in the next release.