Hi kids,
quick question and it may have an easy answer, i'm just getting started with joomla.
is there a way to break apart the date stamp of an article so that i could give it individual css characteristics. For example
<div class="bold">january</div> 28, <div class="color">2008</div>
or
january 28, 2008
Date stamp and its formating
Moderators: tjay, seadap, Rogue4ngel, matthewhayashida
Forum rules
Re: Date stamp and its formating
so my question, i guess, is would i have to adjust this with the JDate definition or in the createdate variable. I'm completely in way over my head, but I'm having fun trying to pull it all apart and seeing what will work, just nothing has up to this point. and i want a little more control over the typography of my layout
Re: Date stamp and its formating
so on a hunch i went over to the wordpress page and typed in date format, low and behold i found this: http://codex.wordpress.org/User:DavePar ... I/the_date code as follows...
add_filter('the_date', array('foo_bar', 'the_date_filter'), 10, 4);
class foo_bar {
function the_date_filter($content, $format, $before, $after) {
if ($content != '') {
if ($after != '') {
$content = substr($content, strlen($before), -strlen($after));
}
else {
$content = substr($content, strlen($before));
}
$content = $before . "<strong>$content</strong>" . $after;
}
return $content
}
}
is there a way to implement this into a joomla site? i don't know php very well but substitute span class id for the strong tag and it looks sort of like what I'm after but i have no idea how to put it into practice.
add_filter('the_date', array('foo_bar', 'the_date_filter'), 10, 4);
class foo_bar {
function the_date_filter($content, $format, $before, $after) {
if ($content != '') {
if ($after != '') {
$content = substr($content, strlen($before), -strlen($after));
}
else {
$content = substr($content, strlen($before));
}
$content = $before . "<strong>$content</strong>" . $after;
}
return $content
}
}
is there a way to implement this into a joomla site? i don't know php very well but substitute span class id for the strong tag and it looks sort of like what I'm after but i have no idea how to put it into practice.