gforge-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gforge-devel] [ gforge-Patches-394 ] Plugin:groupmenu_hook is a new ho


From: noreply
Subject: [Gforge-devel] [ gforge-Patches-394 ] Plugin:groupmenu_hook is a new hook to support adding tabs to the project tabs
Date: Wed, 11 Jun 2003 20:19:53 -0500

Patches item #394, was opened at 2003-06-12 03:19
You can respond by visiting: 
http://gforge.org/tracker/?func=detail&atid=106&aid=394&group_id=1

Category: SiteWide
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Francisco Gimeno (kikov)
Assigned to: Nobody (None)
Summary: Plugin:groupmenu_hook is a new hook to support adding tabs to the 
project tabs

Initial Comment:
It's a new hook to the plugin system. 
The hook is placed in the Layout.class file. 
 
The diff file is attached. 
 
 
It's really easy using it: 
 
----------------- in the plugin class file ---------- 
if ($hookname == 'groupmenu')    { 
        if ( $group->usesPlugin ( $this->name ) ) { 
                                                                        
$params['DIRS'][]='/plugins/'.$this->name.'/index.php?group_id=' 
. $group_id; 
        $params['TITLES'][]=$this->tabtext; 
 
        (($params['toptab'] == $this->name) ? 
$params['selected']=(count($params['TITLES'])-1) : '' ); 
        } 
 
} 
------ 
sorry about the indentation :( 
 
$params is an ARRAY:  'DIR', 'TITLES', 'toptab' and 'selected'. 
 
Just add the new url to DIR, the TITLE of the TAB to 'TITLES', 
and 'selected' if it's the current tab. 
 
BR 

----------------------------------------------------------------------

You can respond by visiting: 
http://gforge.org/tracker/?func=detail&atid=106&aid=394&group_id=1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]