[vhffs-dev] [1842] No more HTML::Template in groups RSS

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1842
Author:   beuss
Date:     2011-06-02 23:37:24 +0200 (Thu, 02 Jun 2011)
Log Message:
-----------
No more HTML::Template in groups RSS

Modified Paths:
--------------
    trunk/vhffs-public/extern/newgroupsrss.pl
    trunk/vhffs-public/templates/Makefile.am

Added Paths:
-----------
    trunk/vhffs-public/templates/misc/message.tt

Modified: trunk/vhffs-public/extern/newgroupsrss.pl
===================================================================
--- trunk/vhffs-public/extern/newgroupsrss.pl	2011-06-02 21:08:56 UTC (rev 1841)
+++ trunk/vhffs-public/extern/newgroupsrss.pl	2011-06-02 21:37:24 UTC (rev 1842)
@@ -94,15 +94,14 @@
 	print "Content-Type: text/xml; charset=utf-8\n\n" . $rss->as_string;
 
 } else {
-        use POSIX qw(locale_h);
-        use locale;
-        use Locale::gettext;
-        use HTML::Template;
-        my $templatedir = $vhffs->get_config->get_templatedir;
-        my $template = new HTML::Template( filename => $templatedir.'/public/simplemsg.tmpl' );
-        my $message = gettext( 'RSS infos are not published' );
-        $template->param( MESSAGE => $message );
+    use POSIX qw(locale_h);
+    use locale;
+    use Locale::gettext;
+    use Vhffs::Panel::Public;
 
-	binmode STDOUT , ':utf8';
-        print "Content-Type: application/rss+xml; charset=utf-8\n\n" . $template->output;
+    my $panel = new Vhffs::Panel::Public;
+
+    $panel->render('misc/message.tt', {
+        message=> gettext( 'RSS infos are not published' )
+    });
 }

Modified: trunk/vhffs-public/templates/Makefile.am
===================================================================
--- trunk/vhffs-public/templates/Makefile.am	2011-06-02 21:08:56 UTC (rev 1841)
+++ trunk/vhffs-public/templates/Makefile.am	2011-06-02 21:37:24 UTC (rev 1842)
@@ -13,6 +13,7 @@
 	content/usersearch-results.tt \
 	layouts/public.tt \
 	misc/closed.tt \
+	misc/message.tt \
 	parts/footer.tt \
 	parts/group-general.tt \
 	parts/header.tt \

Added: trunk/vhffs-public/templates/misc/message.tt
===================================================================
--- trunk/vhffs-public/templates/misc/message.tt	                        (rev 0)
+++ trunk/vhffs-public/templates/misc/message.tt	2011-06-02 21:37:24 UTC (rev 1842)
@@ -0,0 +1 @@
+<h1 class="message">[% message | html %]</h1>


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/