Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6102
Modified Files:
serendipity_sidebar_items.php serendipity_functions.inc.php
Log Message:
Begin support fot setlocale() and strftime(), removes no-longer needed month translations.
TODO: Find out which locales should be used for lang_en, lang_de, lang_es (Anyone?)
Index: serendipity_sidebar_items.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_sidebar_items.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- serendipity_sidebar_items.php 9 Feb 2004 15:21:41 -0000 1.40
+++ serendipity_sidebar_items.php 13 Feb 2004 18:25:33 -0000 1.41
@@ -79,7 +79,7 @@
$link = $serendipity['serendipityHTTPPath'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'archives/' . date('Ym', $ts) . '.html';
- $ts_title = $serendipity['months'][date('n', $ts)] . ' ' . date('Y', $ts);
+ $ts_title = ucfirst(strftime("%B %Y", $ts));
echo '<a href="' . $link . '" title="' . $ts_title . '">' . $ts_title . '</a><br />' . "\n";
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.204
retrieving revision 1.205
diff -u -d -r1.204 -r1.205
--- serendipity_functions.inc.php 13 Feb 2004 16:50:39 -0000 1.204
+++ serendipity_functions.inc.php 13 Feb 2004 18:25:33 -0000 1.205
@@ -339,7 +339,7 @@
$activeDays[date('j', $row['timestamp'])] = $row['timestamp'];
}
}
-
+ $monthName = ucfirst(strftime("%B", mktime(0,0,0,$month)));
// Prepare the table
$link = $serendipity['serendipityHTTPPath'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'archives/' . $year . sprintf('%02d', $month) . '.html?' . $base_query;
?>
@@ -357,7 +357,7 @@
</td>
<td colspan="5" align="center" valign="bottom" class="serendipity_calendarHeader">
- <b><?php echo ($serendipity['XHTML11'] ? '<span style="white-space: nowrap">' : '<nobr>'); ?><a href="<?php echo $link; ?>"><?php echo $serendipity["months"][$month] . ' \'' . substr($year, 2); ?></a><?php echo ($serendipity['XHTML11'] ? '</span>' : '</nobr>'); ?></b>
+ <b><?php echo ($serendipity['XHTML11'] ? '<span style="white-space: nowrap">' : '<nobr>'); ?><a href="<?php echo $link; ?>"><?php echo $monthName . ' \'' . substr($year, 2); ?></a><?php echo ($serendipity['XHTML11'] ? '</span>' : '</nobr>'); ?></b>
</td>
<td align="right" class="serendipity_calendarHeader">
@@ -374,9 +374,10 @@
<tr>
<?php
-foreach($serendipity['weekDayAbb'] AS $weekKey => $weekVal) {
+for ( $i = 1; $i <= 7; $i++ ) {
+ $date = mktime(0,0,0,3,$i,2004);
?>
- <td class="serendipity_weekDayName" align="center"><?php echo $weekVal; ?></td>
+ <td class="serendipity_weekDayName" align="center"><?php echo substr(strftime("%a", $date),0,2); ?></td>
<?php
}
?>
@@ -729,7 +730,7 @@
$lastDate = '';
for ($x = 0, $num_entries = count($entries); $x < $num_entries; $x++) {
- $d = date(DATE_FORMAT_1, $entries[$x]['timestamp']);
+ $d = ucfirst(strftime(DATE_FORMAT_1, $entries[$x]['timestamp']));
$bydate[$d][] = $entries[$x];
}
@@ -991,7 +992,7 @@
}
/* Show when the entry was made */
- echo ' ' . ON . ' ' . date('M d, H:i', $comment['timestamp']);
+ echo ' ' . ON . ' ' . ucfirst(strftime('%b %e %Y, %H:%M', $comment['timestamp']));
if ($_SESSION['serendipityAuthedUser'] === true) {
echo ' (<a href="' . $serendipity['baseURL'] . 'comment.php?serendipity[delete]=' . $comment['id'] . '&serendipity[entry]=' . $comment['entry_id'] . '&serendipity[type]=comments">' . DELETE . '</a>)';
|