hi, you can look at this file to see how to manage add menu "top" and "left" from an external module.
/dev/skeletons/modMyModule.class.php look this part : // Main menu entries $this->menus = array(); // List of menus to add Le 25/01/13 08:32, Philippe Berthet a écrit : > Hi All, > > First of all I want to congratulate the team for the work done here. > I've spend time trying to find an open source ERP with a real > community, struggling with openERP, Tryton, weberp & al before finally > founding Dolibarr : A real open source software, not too big, not too > small, easy to enter into code, well structured, with a clever module > base system and with a real documentation to start without being lost > immediately. > Thanks for the work guys, Dolibarr Rocks! > > Now the hard part : > I've written a module to synchronize contacts between Dolibarr and a > Gmail account, so Dolibarr contacts can be easily viewed and managed > from a smartphone, but I am a little confuse with the menu system. My > module need to insert a new entry on the highest level of the third > party left menu. Finally, I'm using the printLeftBlock() hook, > checking that ($_SESSION["mainmenu"]=='companies') to do it. > Unfortunately, this hook is called after the print of the search > forms, bookmarks, and help, so my menu is a little bit lost at the > bottom... Is this the good way to do this? If yes, Do you think it is > possible to move this hook call just aftter the > "$menuleft->showmenu();" in main.inc.php, or maybe better to call it > twice : Once at the place it is now and once after the showmenu(), but > with different values set in $parameters array ? > I've check the sources in 3.3; this will not hurt any base module, but > of course I don'k know if this hook is used by external module... > > BTW, do you think this module could be candidate to Dolistore? Did I > have to ask if it has any interest to end users on the forum before > submitting it? You can find a full description of it here > :http://www.onelog.be/index/dolibarrGcontacts?lang=fr (sorry, only in > French for now) > > I've also written a module based on canvas and extrafields to manage > products creation and presentation, allowing different fields to be > displayed based on the category selected for the product. > Again, I got troubles on menu system : Canvas mechanism need to be > called with 'canvas=product@canvasName' in $_GET when creating a new > product, so menu entry for product->new need to by modified... The > only way I found was to hard sql update url column in llx_menu table > for titre="NewProduct" in my module activation, but this is not a very > clean solution : It requires to use the Auguria menu system only, and > the module need to be reactivated if the menu system is changed. > Is there an other way to manage this?, if not, could I propose a patch > with a solution to this? > > Sorry for this long post and thanks in advance for your answers. > > -- > Philippe Berthet > www.onelog.be <http://www.onelog.be> > > > > > _______________________________________________ > Dolibarr-dev mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/dolibarr-dev Cordialement, -- Régis Houssin --------------------------------------------------------- Cap-Networks Cidex 1130 34, route de Gigny 71240 MARNAY FRANCE VoIP: +33 1 83 62 40 03 GSM: +33 6 33 02 07 97 Web: http://www.cap-networks.com/ Email: [email protected] Dolibarr developer: [email protected] Web Portal: http://www.dolibarr.fr/ SaaS offers: http://www.dolibox.fr/ Shop: http://www.dolistore.com/ Development platform: https://doliforge.org/ ---------------------------------------------------------
_______________________________________________ Dolibarr-dev mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/dolibarr-dev
