diff --git a/configuration-dist.php b/configuration-dist.php index 3e9047f..a67d307 100644 --- a/configuration-dist.php +++ b/configuration-dist.php @@ -52,6 +52,16 @@ class configuration */ var $forum = 'http://perdu.com'; + /** + * Use PunBB integration ? + */ + var $use_punbb = false; + + /** + * PunBB's forum ID to use for strips comment + */ + var $punbb_forum_id = '1'; + /** * Additional URL */ diff --git a/strip_manager.php b/strip_manager.php index 4f97b4a..95a2e84 100644 --- a/strip_manager.php +++ b/strip_manager.php @@ -131,6 +131,11 @@ class strip_manager */ var $current_id = 0; + /** + * Comments associated to a strip + */ + var $comments = ''; + /** * Additional variables * @@ -273,13 +278,24 @@ class strip_manager // Description preg_match_all('/(.*?)<\/dc:description>/is', $data, $matches); - //$this->description = str_replace( "\n", '
', html_entity_decode( $matches[1][0] ) ); - $this->description = html_entity_decode( $matches[1][0] ); + $this->description = str_replace( "\n", '
', html_entity_decode( $matches[1][0] ) ); + //$this->description = html_entity_decode( $matches[1][0] ); // All the texts inside the SVG preg_match_all('/">(.*?)<\/tspan>/i',$data,$matches); $this->text = html_entity_decode( implode( $matches[1], "\n" ) ); } + + if( $this->general->use_punbb ) { + // TODO : url en fonction du mod punbb + $fh = fopen($this->general->forum . '/post.php?ttitle=TODO&fid=TODO', 'r'); + if (!$fh) { + $this->comments = "Impossible de lire les commentaires."; + } else { + $this->comments = stream_get_contents($fh); + fclose($fh); + } + } }