自定义函数举例:

  1. function thold_user_admin_edit ($user) {  
  2.  
  3. global $fields_user_user_edit_host;  
  4.  
  5. $value = '';  
  6.  
  7. if ($user != 0) {  
  8.  
  9. $value = db_fetch_cell("SELECT data FROM plugin_thold_contacts WHERE user_id  
  10.  
  11. = $user AND type = 'email'");  
  12.  
  13. }  
  14.  

  1. $fields_user_user_edit_host['email'] = array(  
  2.  
  3. "method" => "textbox",  
  4.  
  5. "value" => $value,  
  6.  
  7. "friendly_name" => "电子邮件地址",  
  8.  
  9. "form_id" => "|arg1:id|",  
  10.  
  11. "default" => "",  
  12.  
  13. "max_length" => 255  
  14.  
  15. );  
  16.  

通过上文的描述,我们知道了Cacti 插件中setup.php 文件的编写的全过程,有点复杂但是还是值得的!

  • cacti中配置nagios的注意事项
  • Cacti:AppServ环境,事件查看器报错_httpd php5ts
  • Cacti流量监控由bit转换为M的方法
  • cacti、rrd 相关
  • 用Linux上的cacti去监控Windows服务器
  • Cacti的数据备份与迁移
  • CACTI基本设置之安全篇


相关内容