Recent Topics

1 Jan 04, 2005 05:15    

My archive link reads 'January 2005'

I would like it to read 'jan 05'

Would someone please tell me where to find that option?

Thank you
Mark

2 Jan 04, 2005 05:32

Wow. I think I gotcha covered but you'll have to be brave and experiment a bit. I've never taken advantage of this, but if you look at your skins/skinname/archives.php file you'll see the following:

	# override general date format ? 0 = no: use the date format set in Options, 1 = yes: override
	if(!isset($archive_date_format_over_ride)) $archive_date_format_over_ride = 0;
	# options for daily archive (only if you override the general date format)
	if(!isset($archive_day_date_format)) $archive_day_date_format = 'Y/m/d';


Seems to you can set the first variable to 1 and the second to the appropriate format for what you want. How do you know the appropriate code for the second? I'm guessing it will align with the information you will see if you go to your back office and select 'settings' then 'regional' then 'create new locale'. You don't have to create a new locale - it's just that's an easy way to see the official codes for things like month in 3 characters and year as 2 digits (M,y). Getting the month in lower case is (a) totally groovy and (b) beyond my extremely limited skills.

3 Jan 04, 2005 05:39

Sorry that didn't work :(
Thanks anyway,
Mark

4 Mar 25, 2005 07:53

Here's how to do it for monthly archives.

first back up ./blog/skins/[nameofyourskin]/_archive.php in case something goes wrong.

now copy ./blog/skins/_archive.php to ./blog/skins/[nameofyourskin]/_archive.php
now your skin will use the full version of _archive.php

Now, open up the file. Line 56 should be:
echo T_($month[zeroise($arc_month,2)]),' ',$arc_year;
this prints January 2005

if you change that to:
echo T_(substr($month[zeroise($arc_month,2)],0,3)),' ',$arc_year;
you will get Jan 2005

making it lower case is easy too:
echo T_(strtolower(substr($month[zeroise($arc_month,2)],0,3))),' ', $arc_year;
and now it will print jan 2005

I tried this out on my copy of b2evolution paris, so it at least works for me.


Form is loading...