afficher_config_objet

This pipeline is used to add elements into the configuration panels for SPIP objects.

It is called as demonstrated in ecrire/exec/articles.php:

  1. $masque = pipeline('afficher_config_objet',
  2. array('args' => array('type'=>'type objet', 'id'=>$id_objet),
  3. 'data'=>$masque));

Download

As of writing, it only applies to articles and adds its content into the "Forum and Petitions" panel.

Example

The "Forum" plugin adds moderation control settings (no forum, registration required, post-moderation...) for each article, using the following code:

  1. function forum_afficher_config_objet($flux){
  2. if (($type = $flux['args']['type']) == 'article'){
  3. $id = $flux['args']['id'];
  4. if (autoriser('modererforum', $type, $id)) {
  5. $table = table_objet($type);
  6. $id_table_objet = id_table_objet($type);
  7. $flux['data'] .= recuperer_fond( "prive/configurer/moderation", array($id_table_objet => $id));
  8. }
  9. }
  10. return $flux;
  11. }

Download

Author Mark Baber Published : Updated : 12/05/17

Translations : English, français