|
From: Oliver M. B. <ol...@fa...> - 2005-01-04 09:41:31
|
Hi!
Currently the title and descriptions of RSS feeds of Journals is hardcoded in
journal.pl::displayRSS(). I had to translate them for my site into
another language with another grammer, so moved these into the
data;journal;default template. A patch against R_2_5_0_41 is attached.
I'd greatly appreciate it, if the patch (or something similar) could be merged.
Index: journal.pl
===================================================================
RCS file: /cvsroot/slashdotjp/slashjp/plugins/Journal/journal.pl,v
retrieving revision 1.6
diff -u -r1.6 journal.pl
--- journal.pl 31 Dec 2004 12:36:49 -0000 1.6
+++ journal.pl 4 Jan 2005 09:30:45 -0000
@@ -255,21 +255,21 @@
($constants->{journal_rdfitemdesc_html} > 2 && !$user->{is_anon})
);
- my($title, $journals, $link);
+ my($title, $desc, $link);
if ($form->{op} eq 'friendview') {
- $title = "$juser->{nickname}'s Friends'";
- $journals = 'Journals';
+ $title = getData('rss_fv_title', { nickname => $juser->{nickname} });
+ $desc = getData('rss_fv_desc', { nickname => $juser->{nickname} });
$link = '/journal/friends/';
} else {
- $title = "$juser->{nickname}'s";
- $journals = 'Journal';
+ $title = getData( 'rss_title', { nickname => $juser->{nickname} });
+ $desc = getData( 'rss_desc', { nickname => $juser->{nickname} });
$link = '/journal/';
}
xmlDisplay(rss => {
channel => {
- title => "$title $journals",
- description => "$title $constants->{sitename} $journals",
+ title => $title,
+ description => $desc,
'link' => root2abs() . '/~' . fixparam($juser->{nickname}) . $link,
creator => $juser->{nickname},
},
Index: templates/data;journal;default
===================================================================
RCS file: /cvsroot/slashdotjp/slashjp/plugins/Journal/templates/data;journal;default,v
retrieving revision 1.2
diff -u -r1.2 data;journal;default
--- templates/data;journal;default 31 Dec 2004 12:36:49 -0000 1.2
+++ templates/data;journal;default 4 Jan 2005 09:30:45 -0000
@@ -68,6 +68,18 @@
[% returnme.data_constant = 1 %]
Sorry, the requested journal entries were not found.
+[% CASE 'rss_title' %]
+ [% nickname %]'s Journal
+
+[% CASE 'rss_desc' %]
+ [% nickname %]'s [% constants.sitename %] Journal
+
+[% CASE 'rss_fv_title' %]
+ [% nickname %]'s Friends' Journals
+
+[% CASE 'rss_fv_desc' %]
+ [% nickname %]'s Friends' [% constants.sitename %] Journals
+
[% END %]
__seclev__
--
Oliver M. Bolzer
GPG (PGP) Fingerprint = 621B 52F6 2AC1 36DB 8761 018F 8786 87AD EF50 D1FF
|