YetiForceCompany / YetiForceCRM

Our team created for you one of the most innovative CRM systems that supports mainly business processes and allows for customization according to your needs. Be ahead of your competition and implement YetiForce!
https://yetiforce.com
Other
1.74k stars 749 forks source link

[Question] Override Vtiger module using loader ? #12298

Closed apcloic closed 4 years ago

apcloic commented 4 years ago

Hello,

Regarding the loader mechanism, i would like to override the following Vtiger module file in order to configure a new theme : /modules/Vtiger/helpers/Util.php

I've read the YF official documentation which says that any module could be overrided : https://yetiforce.com/en/knowledge-base/documentation/developer-documentation/item/loader-and-autoloader-of-files

But it doesn't work, so maybe it works only for standard modules and not Vtiger module ? Do you confirm ?

Regards

mariuszkrzaczkowski commented 4 years ago

show example

apcloic commented 4 years ago

I've created a new theme which is a copy of original twilight (in yf_root/public_html/layouts/basic/skins/mytheme)

I've added the following file in yf_root/custom/modules/Vtiger/helpers/Util.php I've only modified getAllSkins() function like this :

public static function getAllSkins() { return [ 'twilight' => '#404952', 'gray' => '#d1d1db', 'mytheme' => '#682E68' ]; } Then in yf_root_directory/config/Performances.php, I have turned load_custom_file on like this : public static $LOAD_CUSTOM_FILES = true;

Clear the cache -> restart Apache2 -> new theme not available under user settings.

However, if I modify the function directly within the original file (yf_root/modules/Vtiger/helpers/Util.php), the new theme is available.

Regards,

apcloic commented 4 years ago

Hi,

FYI, I've also tried to add a new SMS provider in custom/modules/SMSNotifier/providers/MY_PROVIDER.php with no luck. So it does not autoload. Regards,

apcloic commented 4 years ago

I've done further tests :

mariuszkrzaczkowski commented 4 years ago

Zrobiłem dalsze testy:

  • /languages/_Base.json nie można zastąpić

give an example of translation

apcloic commented 4 years ago

@mariuszkrzaczkowski My bad, I've been confusing because I was trying to overwrite FL_PROCESS which is related to Calendar but it's translated in _Base.json. Nevermind, overwrite _Base.json is working