diff options
author | rvelices <rv-github@modusoptimus.com> | 2007-01-09 11:38:54 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2007-01-09 11:38:54 +0000 |
commit | b910549db2dc6e5b62750ac6faa68ea406d7b142 (patch) | |
tree | cb0e93aac7fc6d54adedc8230a8e7d16f4a20fb7 /admin/include/functions_plugins.inc.php | |
parent | c841c568f6d6f098fc097b7d8ee06c8602aa03d4 (diff) |
Plugins: new way of adding links and content to administration pages...
git-svn-id: http://piwigo.org/svn/trunk@1705 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/include/functions_plugins.inc.php | 40 |
1 files changed, 10 insertions, 30 deletions
diff --git a/admin/include/functions_plugins.inc.php b/admin/include/functions_plugins.inc.php index 45f3c734c..f5b43a6af 100644 --- a/admin/include/functions_plugins.inc.php +++ b/admin/include/functions_plugins.inc.php @@ -1,7 +1,7 @@ <?php // +-----------------------------------------------------------------------+ // | PhpWebGallery - a PHP based picture gallery | -// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net | +// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | // +-----------------------------------------------------------------------+ // | branch : BSF (Best So Far) // | file : $Id$ @@ -68,36 +68,16 @@ function get_fs_plugins() return $plugins; } -/*allows plugins to add their content to the administration page*/ -function add_plugin_admin_menu($title, $func) +/** + * Retrieves an url for a plugin page. + * @param string plugin_id + * @param string page - the php script file name (without .php extension) + */ +function get_admin_plugin_menu_link($plugin_id, $page) { - global $page; - if ( is_array( $func) ) - { - $s = ''; - foreach( $func as $e) - { - if (is_object($e)) - { - $s.=get_class($e)."\n"; - } - else - { - $s.=$e; - } - } - $uid = md5( $s ); - } - else - { - $uid = md5( $func ); - } - $page['plugin_admin_menu'][] = - array( - 'title' => $title, - 'function' => $func, - 'uid' => $uid - ); + $url = get_root_url().'admin.php?page=plugin&section=' + .urlencode($plugin_id .'~'. $page); + return $url; } ?>
\ No newline at end of file |