début de gestion des commentaires avec punbb
This commit is contained in:
parent
0442f52da0
commit
596b5dee05
2 changed files with 28 additions and 2 deletions
|
|
@ -52,6 +52,16 @@ class configuration
|
||||||
*/
|
*/
|
||||||
var $forum = 'http://perdu.com';
|
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
|
* Additional URL
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,11 @@ class strip_manager
|
||||||
*/
|
*/
|
||||||
var $current_id = 0;
|
var $current_id = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Comments associated to a strip
|
||||||
|
*/
|
||||||
|
var $comments = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Additional variables
|
* Additional variables
|
||||||
*
|
*
|
||||||
|
|
@ -273,13 +278,24 @@ class strip_manager
|
||||||
|
|
||||||
// Description
|
// Description
|
||||||
preg_match_all('/<dc:description>(.*?)<\/dc:description>/is', $data, $matches);
|
preg_match_all('/<dc:description>(.*?)<\/dc:description>/is', $data, $matches);
|
||||||
//$this->description = str_replace( "\n", '<br/>', html_entity_decode( $matches[1][0] ) );
|
$this->description = str_replace( "\n", '<br/>', html_entity_decode( $matches[1][0] ) );
|
||||||
$this->description = html_entity_decode( $matches[1][0] );
|
//$this->description = html_entity_decode( $matches[1][0] );
|
||||||
|
|
||||||
// All the texts inside the SVG
|
// All the texts inside the SVG
|
||||||
preg_match_all('/">(.*?)<\/tspan>/i',$data,$matches);
|
preg_match_all('/">(.*?)<\/tspan>/i',$data,$matches);
|
||||||
$this->text = html_entity_decode( implode( $matches[1], "\n" ) );
|
$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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue