From 060c5a8c91b00402df08b5a39d7384f4a77aea85 Mon Sep 17 00:00:00 2001 From: nojhan Date: Tue, 22 Apr 2008 20:20:01 +0000 Subject: [PATCH] commentaires qui marchent avec traductions --- lang/en-EN.php | 4 +++- lang/fr-FR.php | 2 ++ strip_manager.php | 17 ++++++++++++++--- template_default.html | 1 + 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/lang/en-EN.php b/lang/en-EN.php index 2e69ee6..300787d 100644 --- a/lang/en-EN.php +++ b/lang/en-EN.php @@ -16,7 +16,9 @@ class language var $source_rss = "Click on the image for the source file in the SVG format."; var $see_also = "See also:"; var $forum ="Forum"; - + var $forum_new = "New"; + var $forum_error = "Cannot read comments"; + function language() { $vars = get_class_vars(__CLASS__); diff --git a/lang/fr-FR.php b/lang/fr-FR.php index 38d7d1f..3bd5e2e 100644 --- a/lang/fr-FR.php +++ b/lang/fr-FR.php @@ -16,6 +16,8 @@ class language var $source_rss = "Cliquez sur l'image pour le fichier source au format SVG."; var $see_also = "Voir aussi :"; var $forum = "Forum"; + var $forum_new = "Nouveau"; + var $forum_error = "Impossible de lire les commentaires"; function language() { diff --git a/strip_manager.php b/strip_manager.php index 95a2e84..518e1c2 100644 --- a/strip_manager.php +++ b/strip_manager.php @@ -136,6 +136,11 @@ class strip_manager */ var $comments = ''; + /** + * Link to the post page related to the strip on the forum + */ + var $forum_post_url = ''; + /** * Additional variables * @@ -286,15 +291,21 @@ class strip_manager $this->text = html_entity_decode( implode( $matches[1], "\n" ) ); } + // if one want to use punbb as forum if( $this->general->use_punbb ) { - // TODO : url en fonction du mod punbb - $fh = fopen($this->general->forum . '/post.php?ttitle=TODO&fid=TODO', 'r'); + // lasts posts associated to the strip + $fh = fopen( $this->general->forum.'/extern.php?action=new&fid=1', 'r'); + if (!$fh) { - $this->comments = "Impossible de lire les commentaires."; + // TODO traduction + $this->comments = $this->lang-forum_error; } else { $this->comments = stream_get_contents($fh); fclose($fh); } + + // link for posting a new comment + $this->forum_post_url = $this->general->forum . '/post.php?ttitle='.$this->title.'&fid='.$this->general->punbb_forum_id; } } diff --git a/template_default.html b/template_default.html index 8616151..6df167a 100644 --- a/template_default.html +++ b/template_default.html @@ -57,6 +57,7 @@

{lang.forum}

{comments:h}

+

{lang.forum_new}

{lang.boutique} {general.title} {lang.teeshirt}.

{lang.see_also}