MyBB Community Forums

Full Version: Changing month to seasons
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!

I am trying to change the display (everywhere, forums, threads, etc.,) from showing the Month and Year (which is what I have it currently set at through the admin cp via time and date settings) to show a Season and the current year. The year part isn't the problem however I would like for it to show instead of 'March' I would like it to say 'Winter' for example. I have messed around with the lang files and changed all the Month names to the seasons however this didn't work because mybb gets its date from PHP. However I did find something on this thread, that shows a little code snippet that changed the weekdays names into the german language. Is there a way, instead of the weekdays to change the month names to whatever I want them to be (in this case into seasons) Example: March = Winter April = Winter May = Spring June = Spring July = Spring...and so on...

Anyone have an idea on how I could accomplish this?

// Set the current date and time now
$datenow = my_date($mybb->settings['dateformat'], TIME_NOW, '', false); 
$timenow = my_date($mybb->settings['timeformat'], TIME_NOW);
$lang->welcome_current_time = $lang->sprintf($lang->welcome_current_time, $datenow.', '.$timenow);
And here is my website for an example, if needed, of what I am trying to accomplish. It's a wolf rpg so instead of months I would like seasons to make it more simple in reflecting a 'time frame' something happened in. So it would say Spring of 2011 instead of the month.

http://aurial.net/rpg/blackstone/
In the language file global.lang.php all the month names are there, you can change them to whatever you want, e.g. change November, December, January, and February all to Winter.
Ive changed those as well. The problem is it uses PHP for the time. So no matter what, it's going to show it as whatever it is in PHP time. I was just seeing how to change that, maybe insert a code that would change the words to other words. Kind of like the language does, but replace with seasons. If that makes sense. Thanks anyways!
The other problem with this is that January and February 01 would both display as the same date ... hm.
Well actually im not even interested in having the days so that wouldn't be a problem. Wink
You realize that timestamps are important functionality, yes?
For something else other than the user? My forum is a play by post rpg game. I just would rather the posts and time be shown in the seasons with the year, I'm not looking to change much other than the month names. And through the admin cp I can choose to exclude the date day, which I have and haven't had any issues.
Do as you wish. I think removing timestamps is pretty severe.
Thanks for trying to help me out anyways! Wink