当前位置: 首页>>代码示例>>PHP>>正文


PHP Modules::add方法代码示例

本文整理汇总了PHP中Modules::add方法的典型用法代码示例。如果您正苦于以下问题:PHP Modules::add方法的具体用法?PHP Modules::add怎么用?PHP Modules::add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Modules的用法示例。


在下文中一共展示了Modules::add方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: action_plugin_activation

 /**
  *
  */
 public function action_plugin_activation($file)
 {
     if (realpath($file) == __FILE__) {
         Modules::add('Incoming Links');
         // Add a periodical execution event to be triggered hourly
         CronTab::add_hourly_cron('incoming_links', 'incoming_links', 'Find links to this blog.');
     }
 }
开发者ID:anupom,项目名称:my-blog,代码行数:11,代码来源:incoming_links.plugin.php

示例2: action_plugin_activation

 public function action_plugin_activation($file)
 {
     if (realpath($file) == __FILE__) {
         Modules::add('GetClicky');
         Options::set('getclicky__cachetime', '300');
         Options::set('getclicky__loggedin', 1);
     }
 }
开发者ID:habari-extras,项目名称:getclicky,代码行数:8,代码来源:getclicky.plugin.php

示例3: action_plugin_activation

 /**
  * action_plugin_activation
  * Registers the core modules with the Modules class. Add these modules to the
  * dashboard if the dashboard is currently empty.
  * @param string $file plugin file
  */
 function action_plugin_activation($file)
 {
     if (Plugins::id_from_file($file) == Plugins::id_from_file(__FILE__)) {
         Modules::add('Latest Entries');
         Modules::add('Latest Comments');
         Modules::add('Latest Log Activity');
     }
 }
开发者ID:anupom,项目名称:my-blog,代码行数:14,代码来源:coredashmodules.plugin.php

示例4: action_plugin_activation

 /**
  * action: plugin_activation
  *
  * @access public
  * @param string $file
  * @return void
  */
 public function action_plugin_activation($file)
 {
     if (Plugins::id_from_file($file) != Plugins::id_from_file(__FILE__)) {
         return;
     }
     Options::set('fireeagle__refresh_interval', 3600);
     Modules::add(_t('Fire Eagle', 'fireeagle'));
 }
开发者ID:habari-extras,项目名称:fireeagle,代码行数:15,代码来源:fireeagle.plugin.php

示例5: action_plugin_activation

 public function action_plugin_activation($file)
 {
     if (realpath($file) == __FILE__) {
         Modules::add('Technorati');
         Session::notice(_t('Please set your Technorati API Key in the configuration.'));
         Options::set('technorati__apikey', '');
     }
 }
开发者ID:habari-extras,项目名称:technorati,代码行数:8,代码来源:technorati.plugin.php

示例6: action_plugin_activation

 /**
  * action_plugin_activation
  * Registers the core modules with the Modules class. 
  * @param string $file plugin file
  */
 function action_plugin_activation($file)
 {
     if (Plugins::id_from_file($file) == Plugins::id_from_file(__FILE__)) {
         Modules::add('My Tickets');
         if (Options::get('tracdashmodule__trac_query') == null) {
             Options::set('tracdashmodule__trac_query', 'enter query');
         }
     }
 }
开发者ID:habari-extras,项目名称:tracdashmodule,代码行数:14,代码来源:tracdashmodule.plugin.php

示例7: action_plugin_activation

 public function action_plugin_activation($file = '')
 {
     if (Plugins::id_from_file($file) == Plugins::id_from_file(__FILE__)) {
         ACL::create_token('snapshot', 'Manage Database Snapshots', 'Export', true);
         // save the default options
         Options::set('exportsnapshot__frequency', 'manually');
         Options::set('exportsnapshot__type', 'blogml');
         // add the module
         Modules::add(_t('Snapshots', 'exportsnapshot'));
     }
 }
开发者ID:habari-extras,项目名称:exportsnapshot,代码行数:11,代码来源:exportsnapshot.plugin.php

示例8: action_plugin_activation

 /**
  * action_plugin_activation
  * Registers the core modules with the Modules class. Add these modules to the
  * dashboard if the dashboard is currently empty.
  * @param string $file plugin file
  */
 public function action_plugin_activation($file)
 {
     foreach ($this->default_options as $name => $value) {
         $current_value = Options::get($this->class_name . '__' . $name);
         if (is_null($current_value)) {
             Options::set($this->class_name . '__' . $name, $value);
         }
     }
     if (Plugins::id_from_file($file) == Plugins::id_from_file(__FILE__)) {
         foreach ($this->reports as $rpt => $data) {
             Modules::add($data['module']);
         }
     }
 }
开发者ID:habari-extras,项目名称:ga_dashboard,代码行数:20,代码来源:ga_dashboard.plugin.php

示例9: dash_additem

 /**
  * Adds a module to the user's dashboard
  * @param object form FormUI object
  */
 public function dash_additem($form)
 {
     $new_module = $form->module->value;
     Modules::add($new_module);
     // return false to redisplay the form
     return false;
 }
开发者ID:ringmaster,项目名称:system,代码行数:11,代码来源:admindashboardhandler.php

示例10: action_plugin_activation

 /**
  * action_plugin_activation
  * Registers the core modules with the Modules class. Add these modules to the
  * dashboard if the dashboard is currently empty.
  * @param string $file plugin file
  */
 function action_plugin_activation($file)
 {
     if (Plugins::id_from_file($file) == Plugins::id_from_file(__FILE__)) {
         Modules::add('Latest Spam');
     }
 }
开发者ID:habari-extras,项目名称:spamview,代码行数:12,代码来源:spamview.plugin.php

示例11: action_plugin_activation

 function action_plugin_activation($file)
 {
     Modules::add('123LinkIt');
     CronTab::add_hourly_cron('linkit_fetch', 'linkit_fetch', _t('Fetches the statistical data from the 123LinkIt site.', 'linkit'));
 }
开发者ID:ringmaster,项目名称:123linkit_habari,代码行数:5,代码来源:123linkit.plugin.php

示例12: mettre_a_jour

 /**
  * @method void Mise a jour des modules en BD en fonction du contenu du repertoire des modules
  */
 public function mettre_a_jour()
 {
     if ($dh = opendir($this->plugins_base_dir)) {
         while ($file = readdir($dh)) {
             if ($file == '.' || $file == '..') {
                 continue;
             }
             try {
                 // Tenter d'instancier le plugin
                 $instance = $this->instancier($file);
                 $modules = new Modules();
                 if ($instance instanceof PluginsPaiements) {
                     $modules->type = Modules::PAIEMENT;
                 } else {
                     if ($instance instanceof PluginsTransports) {
                         $modules->type = Modules::TRANSPORT;
                     } else {
                         if ($instance instanceof FiltreBase) {
                             $modules->type = Modules::FILTRE;
                         } else {
                             if ($instance instanceof PluginsClassiques) {
                                 $modules->type = Modules::CLASSIQUE;
                             } else {
                                 continue;
                             }
                         }
                     }
                 }
                 // On ignore
                 // Vérifier si le module existe en BD, et l'ajouter s'il n'y est pas
                 if (!$modules->charger($file)) {
                     $modules->nom = $file;
                     $modules->actif = 0;
                     $modules->add();
                     // On en profite pour le convertir en UTF-8 au passage si nécessaire.
                     $this->conversion_utf8($this->lire_chemin_module($modules->nom));
                 }
             } catch (Exception $ex) {
                 // On ne peut pas instancier -> ignorer
             }
         }
         @closedir($dh);
     }
     // Vérifier que les plugins en base existent toujours sur disque
     $modules = new Modules();
     $result = $modules->query('select nom from ' . Modules::TABLE);
     while ($result && ($row = $modules->fetch_object($result))) {
         try {
             $this->lire_chemin_module($row->nom);
         } catch (Exception $ex) {
             // Le plugin n'existe plus sur disque -> le retirer de la BD
             if ($modules->charger($row->nom)) {
                 $modules->delete();
                 // Supprimer aussi la description
                 $modules->query("delete from " . Modulesdesc::TABLE . " where plugin='{$modules->nom}'");
             }
         }
     }
     CacheBase::getCache()->reset_cache();
 }
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:63,代码来源:ActionsAdminModules.class.php


注:本文中的Modules::add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。