Recent Topics

1 Oct 11, 2005 22:28    

Hi,

I would like to get in my blog a little bar with the date displayed within. I mean something like [url=http://www.neo75.com/]this weblog[/url], and left only timestamp on each post. In this way, it would be easier to recognize which posts are newer.
I often post twice or more per day, and the repeating of the same date bother me so much.
I guess it wouldn't easy to modify this skin that way, but I'm not that clever to do this by myself.
This is [url=http://www.silenzi.com]my weblog[/url].

If someone would help me, I'll appreciate it very much.

Thank you in advance,

Francesco

2 Oct 11, 2005 22:41

Open up /skins/leaf/_main.php and find the start of the post loop. It should look like the first line below. Then add in the $MainList->date_if_changed(); right after the opening brace.

if( isset($MainList) ) while( $Item = $MainList->get_item() )
        {
                $MainList->date_if_changed();

           

3 Oct 12, 2005 00:17

Man, you rock :D
I immediately found the line - it was just commented out, and I've only had to remove the // to get it works.
Now it displays the date, as I desired!

Two more questions:

a) Can I act on that line only with HTML, by including it in a tab, change font to be displayed with, change the color, etc.? Or does it take the same character's attribute of the post text? I mean, I want to highlight the date in a such different way than both post and title;

b) How can I remove the "second date" - I mean, the doublet date shown right before the timestamp and the post's title? Now that I got the "day-date", I want no longer a date displayed before every single post.

Thank you sir, your tips are always soooo useful to me! I've never thank you enough! If you ever come to Italy, I'll offer you a beer ;)

Francesco

4 Oct 12, 2005 00:27

1. By default it wraps the date in h2 tags. So you can use CSS to style that however you want. Just add this at the end of your main css file:

h2 {
color: #f00;
border: 1px solid #000;
background: #666;
}


Of course, style it however you want. If that doesn't work, you can change it so it doesn't use h2, but some other code of your choosing.

2. The code you need to remove to get rid of the second date will look something like

$Item->issue_date();

I'm happy to help. I hope I can make to Italy some day and take you up on that offer. :D


Form is loading...