Cacti (home)ForumsDocumentation

Differences

This shows you the differences between two versions of the page.

plugins.convert [2011/08/21 19:06]
gandalf
plugins.convert [2019/10/29 15:16] (current)
Line 1: Line 1:
-  * change function calls from api_plugin_* to plugin_*+====== Plugin Conversion ====== 
 + 
 +  * change function calls from <code>api_plugin_*</code> to <code>plugin_*</code>
   * internationalize all texts shown to the user: use <code>__("text")</code>; create <plugin>.po file   * internationalize all texts shown to the user: use <code>__("text")</code>; create <plugin>.po file
   * internationalize date/time   * internationalize date/time
-  * pay attention to $menu indexes, often set in <plugin>_config_arrays; e.g. $menu["Utilities"] now goes $menu["utilities"]["items"]+  * pay attention to $menu indexes, often set in <plugin>_config_arrays; e.g. <code>$menu["Utilities"]</code> now goes <code>$menu["utilities"]["items"]</code>
   * after registering a new realm, often set in <plugin>_config_arrays call function plugin_load_realms() to load realms into global variable   * after registering a new realm, often set in <plugin>_config_arrays call function plugin_load_realms() to load realms into global variable
  
   * table handling has changed, consider using the new table class! This will reduce more efforts, e.g. most $colors changes (see below) are related to table handling.   * table handling has changed, consider using the new table class! This will reduce more efforts, e.g. most $colors changes (see below) are related to table handling.
-      * html_start_box($title, $width, $cell_padding, $align, $add_text = "", $collapsing = false, $table_id = "") \\ old 3rd parameter $colors has gone +      * <code>html_start_box($title, $width, $cell_padding, $align, $add_text = "", $collapsing = false, $table_id = "")</code>old 3rd parameter $colors has gone 
-      * html_header_sort_checkbox expects $display_text in new format:  +      * html_header_sort_checkbox expects $display_text in new format: <code> array(
-  +
-<code> array(+
  "name" => array(  "name" => array(
  "name" => __("CDEF Title"),  "name" => __("CDEF Title"),
Line 35: Line 35:
     * $colors["panel"] => class="rowAlternate3"     * $colors["panel"] => class="rowAlternate3"
  
-  * form_alternate_row_color takes new parameters: \\ function form_alternate_row_color($row_id = "", $hover = false, $row_class = "") AND THE USE OF A COUNTER LIKE $I IS NO LONGER REQUIRED +  * form_alternate_row_color takes new parameters: \\ <code>function form_alternate_row_color($row_id = "", $hover = false, $row_class = "")</code> AND THE USE OF A COUNTER LIKE $I IS NO LONGER REQUIRED 
-  * use function html_create_nav($current_page, $max_pages, $rows_per_page, $total_rows, $columns, $base_url, $page_var = "page") to create nav bar, e.g. \\ $nav = html_create_nav($_REQUEST["page"], MAX_DISPLAY_PAGES, $_REQUEST["rows"], $total_rows, 8, 'rrdcleaner.php' . (strlen($_REQUEST["filter"]) ? "?filter=" . $_REQUEST["filter"]:""));+  * use <code>function html_create_nav($current_page, $max_pages, $rows_per_page, $total_rows, $columns, $base_url, $page_var = "page")</code> to create nav bar, e.g. \\ <code>$nav = html_create_nav($_REQUEST["page"], MAX_DISPLAY_PAGES, $_REQUEST["rows"], $total_rows, 8, 'rrdcleaner.php' . (strlen($_REQUEST["filter"]) ? "?filter=" . $_REQUEST["filter"]:""));</code>;
  





Personal Tools