commentaires qui marchent avec traductions

This commit is contained in:
nojhan 2008-04-22 20:20:01 +00:00
commit 060c5a8c91
4 changed files with 20 additions and 4 deletions

View file

@ -16,6 +16,8 @@ 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()
{

View file

@ -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()
{

View file

@ -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;
}
}

View file

@ -57,6 +57,7 @@
<div id="footbar">
<p id="forum"><a href="{general.forum}">{lang.forum}</a></p>
<p id="forum_comments">{comments:h}</p>
<p id="forum_post"><a href="{forum_post_url}">{lang.forum_new}</a></p>
<p id="shop_infos"><a href="{general.shop}">{lang.boutique} {general.title}</a> {lang.teeshirt}.</p>
{lang.see_also}
<ul id="linkbar">