[Fusionforge-commits] r12534 - in trunk/src: docs www/admin

Olivier Berger olberger at fusionforge.org
Wed Mar 2 17:51:37 CET 2011


Author: olberger
Date: 2011-03-02 17:51:35 +0100 (Wed, 02 Mar 2011)
New Revision: 12534

Modified:
   trunk/src/docs/README.Plugins
   trunk/src/www/admin/index.php
Log:
Add new hook so that plugins can add their links to the "Project Maintenance" section

Modified: trunk/src/docs/README.Plugins
===================================================================
--- trunk/src/docs/README.Plugins	2011-03-02 16:51:17 UTC (rev 12533)
+++ trunk/src/docs/README.Plugins	2011-03-02 16:51:35 UTC (rev 12534)
@@ -390,6 +390,13 @@
                a <li> block and will appear on the Site Admin page in the
                Site Utilities list.
 
+  Hook Name  : site_admin_project_maintenance_hook
+  Locations  : www/admin/index.php
+  Description: Use this to provide a link to the project maintenance pages
+               for your plugin. The hook should obey the plugin_hook_by_reference()
+               protocol and concatenate a <li> HTML block to params['result'] so 
+               that it can appear in the "Plugins Project Maintenance" subsection
+
   Hook Name  : task_extra_detail
   Parameters : task_id - The numeric ID for a task
   Locations  : www/pm/detail_task.php
@@ -429,4 +436,6 @@
   Description: Used to provide plugin specific infos on a group's
                public area.
 
+TODO : document user_logo (plugin_hook_by_reference) : returns in params['content'] 
+
   -- Roland Mas <lolando at debian.org>

Modified: trunk/src/www/admin/index.php
===================================================================
--- trunk/src/www/admin/index.php	2011-03-02 16:51:17 UTC (rev 12533)
+++ trunk/src/www/admin/index.php	2011-03-02 16:51:35 UTC (rev 12534)
@@ -155,6 +155,20 @@
 	</form></li>
 	<li><a href="search.php?groupsearch=1&search=%&is_public=0"><?php echo _('Private Projects'); ?></a></li>
 </ul>
+<?php
+	$params = array('result' => '');
+	$plugins_site_admin_project_html = '';
+	plugin_hook_by_reference("site_admin_project_maintenance_hook", $params);
+	if ($params['result']) {
+			$plugins_site_admin_project_html = $params['result'];
+	}
+	if ($plugins_site_admin_project_html) {
+		echo '<h3>'.  _('Plugins Project Maintenance') .'</h3>';
+		echo '<ul>';
+		echo $plugins_site_admin_project_html;
+		echo '</ul>';
+	}
+?>
 
 <h2><?php echo _('News'); ?></h2>
 <ul>




More information about the Fusionforge-commits mailing list