Changeset 1705 for trunk/admin/include
- Timestamp:
- Jan 9, 2007, 12:38:54 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions_plugins.inc.php
r1604 r1705 2 2 // +-----------------------------------------------------------------------+ 3 3 // | PhpWebGallery - a PHP based picture gallery | 4 // | Copyright (C) 2003-200 6PhpWebGallery Team - http://phpwebgallery.net |4 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | 5 5 // +-----------------------------------------------------------------------+ 6 6 // | branch : BSF (Best So Far) … … 69 69 } 70 70 71 /*allows plugins to add their content to the administration page*/ 72 function add_plugin_admin_menu($title, $func) 71 /** 72 * Retrieves an url for a plugin page. 73 * @param string plugin_id 74 * @param string page - the php script file name (without .php extension) 75 */ 76 function get_admin_plugin_menu_link($plugin_id, $page) 73 77 { 74 global $page; 75 if ( is_array( $func) ) 76 { 77 $s = ''; 78 foreach( $func as $e) 79 { 80 if (is_object($e)) 81 { 82 $s.=get_class($e)."\n"; 83 } 84 else 85 { 86 $s.=$e; 87 } 88 } 89 $uid = md5( $s ); 90 } 91 else 92 { 93 $uid = md5( $func ); 94 } 95 $page['plugin_admin_menu'][] = 96 array( 97 'title' => $title, 98 'function' => $func, 99 'uid' => $uid 100 ); 78 $url = get_root_url().'admin.php?page=plugin&section=' 79 .urlencode($plugin_id .'~'. $page); 80 return $url; 101 81 } 102 82
Note: See TracChangeset
for help on using the changeset viewer.