[#7630] Implementation of Extended menu doesn't work
Summary Implementation of Extended menu doesn't work
Queue MIMP
Queue Version 1.1.1
Type Bug
State Resolved
Priority 2. Medium
Owners Chuck Hagenbuch <chuck (at) horde (dot) org>
Requester gerard (dot) breiner (at) ias (dot) u-psud (dot) fr
Created 11/03/08 (497 days ago)
Due 11/03/08 (497 days ago)
Updated 11/06/08 (494 days ago)
Assigned
Resolved 11/06/08 (494 days ago)
Attachments
Milestone
Patch No

History
11/06/08 Chuck Hagenbuch Comment #3
Assigned to Chuck Hagenbuch
State ⇒ Resolved
Patch ⇒
Reply to this comment
I've implemented this, for 1.1.2, by reading the file in the 
MIMP::addMIMPMenu() function, where it will be done correctly for all 
views, not just the mailbox.
11/06/08 Chuck Hagenbuch Deleted Attachment: patch.zip
 
11/06/08 CVS Commit Comment #2 Reply to this comment
11/03/08 gerard (dot) breiner (at) ias (dot) u-psud (dot) fr Comment #1
State ⇒ Unconfirmed
New Attachment: patch.zip
Patch ⇒ 1
Milestone ⇒
Queue ⇒ MIMP
Due ⇒ 11/03/08
Summary ⇒ Implementation of Extended menu doesn't work
Type ⇒ Bug
Priority ⇒ 2. Medium
Reply to this comment
Hello,



I wanted to add a link "Accueil" to the menu of Mimp by using   
config/menu.php  but unsuccessfull.

So, here is what I modified so that it could works.



mimp/config/menu.php



This  pattern is not correct $_menu[] = array( 'url' =>         
'http://www.example.com/',  'text' =>       'Example, Inc.');

The good pattern is :

$_menu = array( 'your url' =>        'your text');



for example in my case  :  $_menu = array( '/dimp' =>        'Accueil');



mimp/index.php



I added :

if (is_readable(MIMP_BASE . '/config/menu.php')) {

    require MIMP_BASE . '/config/menu.php';

}



mimp/mailbox.php



Before the "foreach of $items" I added :



foreach ($_menu as $link => $label) {

    $mset->add(new Horde_Mobile_link($label, $link));

}



After having these modifications my link "Accueil" is added at the top 
of the menu. I hope my humble contribution will be usefull.



Best regards



Gerard