Browse Source

Ajout de hooks (action_before_synchronisationtype, article_pre_action, setting_post_synchronisation_options)

Simounet 4 years ago
parent
commit
57f94fcbee
3 changed files with 3 additions and 0 deletions
  1. 1 0
      action.php
  2. 1 0
      article.php
  3. 1 0
      templates/marigolds/settings.html

+ 1 - 0
action.php

@@ -48,6 +48,7 @@ switch ($action){
         $synchronisationType = $configurationManager->get('synchronisationType');
 
         $synchronisationCustom = array();
+        Plugin::callHook("action_before_synchronisationtype", array(&$synchronisationCustom));
         if('graduate'==$synchronisationType){
             // sélectionne les 10 plus vieux flux
             $feeds = $feedManager->loadAll(null,'lastupdate', $syncGradCount);

+ 1 - 0
article.php

@@ -54,6 +54,7 @@ $action = $_['action'];
 $tpl->assign('action',$action);
 
 $filter = array();
+Plugin::callHook("article_pre_action", array(&$_,&$filter,&$articleConf));
 switch($action){
     /* AFFICHAGE DES EVENEMENTS D'UN FLUX EN PARTICULIER */
     case 'selectedFeed':

+ 1 - 0
templates/marigolds/settings.html

@@ -175,6 +175,7 @@
                         <p><input type="radio"  {if="$synchronisationType=='auto'"} checked="checked" {/if} value="auto" id="synchronisationTypeComplete" name="synchronisationType"> <label for="synchronisationTypeComplete"><strong>
                             {function="_t('AUTOMATIC_FULL')"} :</strong></label> {function="_t('AUTOMATIC_FULL_DESC')"}</p>
                         <p><input type="radio" {if=" $synchronisationType=='graduate'"} checked="checked" {/if}  value="graduate" id="synchronisationTypeGraduated" name="synchronisationType"> <label for="synchronisationTypeGraduated"><strong>{function="_t('AUTOMATIC_GRADUATE')"} :</strong></label> {function="_t('AUTOMATIC_GRADUATE_DESC')"}</p>
+                        {function="Plugin::callHook("setting_post_synchronisation_options", array($synchronisationType))"}
 
                         <p><strong>{function="_t('SYNCHRONISATION_CODE')"} :</strong>
                         {$synchronisationCode}