The BAM Announcements plugin provides the Month and Day but NOT the Year.
Here at the MyBB community board, the announcements DO show the complete day, month and Year.
How do I make the Year appear in the announcement date?
code segments like below need to be removed from the plugin file (
~/plugins/
bam.php) {
around lines
334 -
342}
if (date("Y") != my_date ('Y', $querydata['date'])) {
// Not the current year, display the year.
else {
// Current year, don't display year.
$date = '('.my_date('F d', $querydata['date']).')';
}
}
Note:
php files should be
saved with
utf-8 encoding without Byte Order Mark.
in general, we use editor like
Notepad++ or file editor at web host panel
I tried removing code but could not make it work that method.
Instead, I added the 'Y' to the "else" statement.
Original code:
else {
// Current year, don't display year.
$date = '('.my_date('F d' , $querydata['date']).')';
}
Modified code:
else {
// Current year, don't display year.
$date = '('.my_date('F d, Y' , $querydata['date']).')';
}
'
Y' for
Year was added to the
else statement
PS - Thank you for the tip about Notepad ++ I've been using Araneae - Notepad++ looks more advanced. I look forward to it.