Youp3
samedi 14 janvier 2006 à 18:03
Bon, j'ai finalement réussi à voir comment elle fonctionnait et j'ai une solution.

Mais, ben oui il en faut, il y a une contrainte : il faut deux affichages du forum pour d'abord ouvrir le sujet et ensuite l'approuver.
C'est partie pour ma solution :
Dans le fichier sources/action_public/forum.php, chercher :
CODE
$this->ipsclass->DB->do_shutdown_update( 'topics', array( 'state' => 'open' ), 'tid IN ('.implode( ",", $this->update_topics_open ) .')' );
remplacer par
CODE
$this->ipsclass->DB->do_shutdown_update( 'topics', array( 'state' => 'open', 'approved' => '1' ), 'tid IN ('.implode( ",", $this->update_topics_open ) .')' );
Dans le fichier sources/classes/post/class_post_new.php, chercher :
CODE
//-----------------------------------------
// Check close times...
//-----------------------------------------
if ( $state == 'open' AND ( $this->times['open'] OR $this->times['close'] )
AND ( $this->times['close'] <= time() OR ( $this->times['open'] > time() AND !$this->times['close'] ) ) )
{
$state = 'closed';
ajouter après :
CODE
$this->obj['moderate'] = 1;
Dans le fichier sources/classes/post/class_post_edit.php, chercher :
CODE
if( $this->topic['topic_open_time'] AND $this->times['open'] )
{
$times['state'] = "closed";
ajouter après :
CODE
$times['approved'] = 0;
Et voilà, normalement vous obtiendrez un comportement similaire à ce que vous souhaitez.