1 whittler Jul 29, 2004 00:05
3 isaac Jul 29, 2004 10:26
You can also do this in the Backoffice Settings> Regional tab. The Date format matches the standard PHP "[url=http://us3.php.net/manual/en/function.date.php]date[/url]" format.
4 whittler Jul 29, 2004 10:54
Thanks guys. But this did not address my question. Note my original post stated:
I know how to change it's format (e.g. from 31/05/04 to 31 May 2004)
What I want to do is create a style for the date. At the moment, it's aligned on the left. But I want to center it, and give it a different background. Kind of like a header for each post.
5 mattbta Jul 29, 2004 17:01
whoops! *slaps forehead*
OK, so now that I understand the question correctly let's try this.
The date/single post title/etc all gets displayed from the following line of code in your _main.php file which comes immediately after the bPosts div start.
<h2><?php
single_cat_title();
single_month_title();
single_post_title();
arcdir_title();
last_comments_title();
stats_title();
profile_title();
?></h2>
That is where the styling can be done. If it were me I would use another div or span to replace the <h2> tags so that the formatting will take. Then style that class accordingly.
6 whittler Jul 29, 2004 23:57
Hi mattbta,
I have tried that, but for some reason it does not work. I created the following new style:
.Date {
color: #FF9900;
background: #000000;
text-align: center;
width: 100%;
margin: 0;
padding: 0;
}
and included it as so:
<h2 class="Date">
<?php
single_cat_title();
single_month_title();
single_post_title();
arcdir_title();
last_comments_title();
stats_title();
profile_title();
?></h2>
For some reason, this does not work. Even if you just alter the <h2> tag by introducing the .Date elements to it, it doesn't work. The only thing that seems to work with the date is if you change the text-color of the <h2> tag. Note, it is easier to see the dodgy effects of messing with the <h2> tag if you view it in Explorer.
The other thing I noticed is that if you try to move the code for the date (e.g. to inside the bPost div [as opposed to bPosts div]), it stays in the same place i.e. above the bPost div in the bPosts div.
I think I'm chucking this one in the too hard basket.
7 mattbta Jul 30, 2004 00:06
Whoops again on my part. Instead of making a new class for it, just edit the css for
.bPosts h2 {
}
That's what controls the h2 element if you're using a skin. Sorry for the run around...I knew there had to be something simple. So take all the css for that class you made, and put it there in the .bPosts h2 declaration.
8 isaac Jul 30, 2004 08:20
You could both benefit from the following links:
http://css.maxdesign.com.au/selectutorial/index.htm
http://www.w3schools.com/css/css_intro.asp
9 whittler Jul 31, 2004 05:29
mattbta, thanks for the advice. It did work.
isaac, thanks for the links. I'm learning more and more all the time.
You can change the visual appearance through the CSS, but to change the actual format have a look at conf/_locales.php
The format b2evo uses for that date is based on the locale defined in that file
for me, which corresponds to this line of code
You can successfully edit the date format portion of the array with any PHP date format variables. See http://www.php.net/date for the different options.
HTH,
Matt