Update of /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_comments
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9563/serendipity_plugin_comments
Modified Files:
serendipity_plugin_comments.php
Log Message:
Removed plugins setting the locale. This is done in
serendipity_config.inc.php depending on the included language and the
'recommended way'. :-)
Index: serendipity_plugin_comments.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/plugins/serendipity_plugin_comments/serendipity_plugin_comments.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- serendipity_plugin_comments.php 26 Feb 2004 11:45:25 -0000 1.15
+++ serendipity_plugin_comments.php 27 Mar 2004 12:10:23 -0000 1.16
@@ -9,6 +9,7 @@
@define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'Wieviele Zeichen sollen pro Kommentar gezeigt werden? (Standard: 120)');
@define('PLUGIN_COMMENTS_MAXENTRIES', 'Anzahl an Kommentaren');
@define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'Wieviele Kommentare sollen gezeigt werden? (Standard: 15)');
+ @define('PLUGIN_COMMENTS_ABOUT', '%s zu%s');
break;
case 'en':
@@ -21,7 +22,7 @@
@define('PLUGIN_COMMENTS_MAXCHARS_BLAHBLAH', 'How many chars will be displayed for each comment? (Default: 120)');
@define('PLUGIN_COMMENTS_MAXENTRIES', 'Maximum number of comments');
@define('PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH', 'How many comments will be shown? (Default: 15)');
-
+ @define('PLUGIN_COMMENTS_ABOUT', '%s about%s');
break;
}
@@ -38,7 +39,6 @@
'wordwrap',
'max_chars',
'max_entries',
- 'language',
'dateformat'));
}
@@ -63,12 +63,6 @@
$propbag->add('description', PLUGIN_COMMENTS_MAXENTRIES_BLAHBLAH);
break;
- case 'language':
- $propbag->add('type', 'string');
- $propbag->add('name', GENERAL_PLUGIN_LANGUAGE);
- $propbag->add('description', GENERAL_PLUGIN_LANGUAGE_BLAHBLAH);
- break;
-
case 'dateformat':
$propbag->add('type', 'string');
$propbag->add('name', GENERAL_PLUGIN_DATEFORMAT);
@@ -85,7 +79,6 @@
{
global $serendipity;
$title = COMMENTS;
- $lang = strtolower($this->get_config('language'));
$max_entries = $this->get_config('max_entries');
$max_chars = $this->get_config('max_chars');
$wordwrap = $this->get_config('wordwrap');
@@ -107,24 +100,6 @@
$dateformat = '%a, %d.%m.%Y %H:%M';
}
- if ($lang != 'de' && $lang != 'en') {
- $lang = 'en';
- }
-
- switch($lang) {
- case 'de':
- $loc = setlocale(LC_ALL, 'de_DE');
- if (!$loc) $loc = setlocale(LC_ALL, 'de');
- $out = '%s zu%s';
- break;
-
- case 'en':
- $loc = setlocale(LC_ALL, 'en_US');
- if (!$loc) $loc = setlocale(LC_ALL, 'en');
- $out = '%s about%s';
- break;
- }
-
$q = 'SELECT c.body AS comment,
c.timestamp AS stamp,
c.author AS user,
@@ -164,7 +139,7 @@
serendipity_plugin_api::hook_event('frontend_display', $entry);
printf(
- $out,
+ PLUGIN_COMMENTS_ABOUT,
$user,
' <a class="highlight" href="' . serendipity_archiveURL($row['entry_id'], $row['subject']) .'#c' . $row['comment_id'] . '" title="' . htmlentities($row['subject']) . '">'
|