dolibarr-dev
[Top][All Lists]
Advanced

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

Re: [Dolibarr-dev] Where should I file the new modules ?


From: Régis Houssin
Subject: Re: [Dolibarr-dev] Where should I file the new modules ?
Date: Tue, 07 Aug 2012 21:06:06 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:14.0) Gecko/20120713 Thunderbird/14.0

petites précision concernant l'optimisation

si vous êtes sûr que la classe n'est pas déjà appelée, ce qui est souvent le cas après l'appel du main.inc.php
il est préférable d'utiliser "include" ou "require" à la place de "include_once" ou "require_once"

si vous avez un doute, utiliser plutôt :

if (! class_exists('NomClasse')) {
    require DOL_DOCUMENT_ROOT.'/core/class/...';
}

idem, si vous devez utiliser la fonction dol_include_once() et que vous n'êtes pas sûr:

dol_include_once('/monmodule/class/maclasse.class.php', 'MaClasse');

50% de gains sur le chargement des classes


Le 07/08/12 20:55, Marc-Henri Pamiseux a écrit :
Hi Laurent,

I've just done it.
Look here for the French version :
http://wiki.dolibarr.org/index.php/D%C3%A9veloppement_module#Le_descripteur_des_modules_sp.C3.A9cifiques_pour_la_version_3.3

and look here for the English one :
http://wiki.dolibarr.org/index.php/Module_development#Specific_descriptor_module_for_version_3.3

I indicated a reserve clause to version 3.2

Hope to read you,

Le 07/08/2012 11:57, Destailleur Laurent a écrit :
Hi Marc Henri, if you have time to report answer of Regis into the wiki
dev documention, you are welcome
:-)

Note: For the moment usage of custom dir was not yet completely debugged
but with 3.2, it should be enough ready to start to add it into
documentation.

      

_______________________________________________
Dolibarr-dev mailing list
address@hidden
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: address@hidden

Dolibarr developer: address@hidden
Web Portal: http://www.dolibarr.fr/
SaaS offers: http://www.dolibox.fr/
Shop: http://www.dolistore.com/
Development platform: https://doliforge.org/
---------------------------------------------------------

reply via email to

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