Date stamp and its formating

Discussion and education for beginner / novice programmers interested in embarking on the development process to take advantage of the extensible nature of the Joomla! CMS.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Forum rules
Post Reply
mr_mayo
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Feb 13, 2008 7:28 pm

Date stamp and its formating

Post by mr_mayo » Wed Feb 13, 2008 7:40 pm

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

mr_mayo
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Feb 13, 2008 7:28 pm

Re: Date stamp and its formating

Post by mr_mayo » Thu Feb 14, 2008 4:52 pm

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

mr_mayo
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Wed Feb 13, 2008 7:28 pm

Re: Date stamp and its formating

Post by mr_mayo » Fri Feb 15, 2008 3:39 am

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.


Post Reply