Recent Topics

1 Sep 24, 2009 00:29    

My b2evolution Version: 2.x

Hi!

I'm currently at b2evolution 2.something with the PixelGreen skin. I was wondingering if there was any way to set the post date in the post title?

Example: If I on Christmas Day wrote a post called "Merry Christmas", then I would like it displayed as "2009-12-25 -- Merry Christmas" (actually, the format of the date isn't important, whatever works is OK).

Any ideas?

2 Sep 24, 2009 19:41

free typed :

echo '<a href="'.$Item->get_permanent_url().'">';
$Item->issue_time( array(
		'before'    => ' ',
		'after'     => '',
	));
echo $Item->dget('title').'</a>'."\n";

There's probably a date_format param for the issue_time ;)

¥

3 Sep 24, 2009 20:12

one could also use Item->issue_date and get the ... blog's default date format, but yes: one would copy and paste the "after" line then change "after" to "format" and make the format using the stuff that php likes about date and time formats, which one would find by hitting their Global settings then Regions tab and pretending like they are making a new locale. I think using issue_date would be easier but that's cuz I'm real lazy.

4 Sep 26, 2009 14:38

Thanks for your kind help, but which file should this be added to (and should it replace anything?)

Best,
C

5 Oct 11, 2009 11:40

I hope I can just give this thread a little *bump*

Thanks,
Christian

6 Oct 11, 2009 14:41

index.main.php or maybe posts.main.php or maybe single.main.php or maybe page.main.php or maybe all of 'em. in /skins/picks-el-green/ folder. Which ones depends on what your skin has. If it only has index.* then do that, else do whatever you have. Each of the others is for it's own type of page is the thing.

7 Oct 21, 2009 05:18

EdB wrote:

index.main.php or maybe posts.main.php or maybe single.main.php or maybe page.main.php or maybe all of 'em. in /skins/picks-el-green/ folder. Which ones depends on what your skin has. If it only has index.* then do that, else do whatever you have. Each of the others is for it's own type of page is the thing.

You were absolutely right! Thanks!

For others who'd like to try the same, search for the string "bTitle", and modify it to something like this:

                                        <h3 class="bTitle"><?php $Item->title(); ?></h3>

                                        <p align="right"><?php

                                        echo '<a href="'.$Item->get_permanent_url().'">';

                                        $Item->issue_date( array(
                                        'date_format' => 'd. M Y',
                                         ));

                                        $Item->issue_time( array(
                                         ));

                                        ?></a></p>

Editing the date_format should be easy


Form is loading...