sugarcrm programmatically hiding module menu - sugarcrm

I know there is a way to hide module menu from Admin -> Display Modules and Subpanels.
Is there any way to do the same from the code.
Particularly I need to hide my custom module: cm_items. This way customers could access this module items from the other referenced custom module.
I'm using the PRO edition of SugarCRM Versión 6.5.11 (Build 8754)

In your modules/cm_items/ directory you should be able to drop in an empty Menu.php file. If that doesn't work try resetting the $module_menu array in that file:
$module_menu = array();

Make sure the module isn't listed in the global array $moduleList and it shouldn't be available to be added.

just comment the line in custom/Extension/application/Ext/Language/en_us.lang.ext.php file
$app_list_strings['moduleList']['cm_items'] = 'items';

Related

Typo3 6.2 Module: How to add an action to an existing module

I need your help!
Goal:
A Typo3 6.2 module should be extended with a button to delete all user data inserted. By default it is only possible to delete data one-by-one.
Conditions:
no changes in the core data of the original module allowed
I tried the following:
1. Extending the controller with XClasses & adding a new method cleanupAction
Problems with that:
cleanupAction is not allowed
Action would have to be added to ext_tables.php of the original module. But this is not allowed.
2. An own backend module:
Problem with that:
An entry in main nav in backend is generated, which is not desired and not needed.
Do you have any ideas how to tackle the problem? I only want to have an action, which can be called in the backend, without having a main-nav entry.
Thanks for your help!
Set up your own extension, containing a controller, some typoscript setup and a template.
The typoscript is used to change the template of the original backend module to your own version of the template:
module.tx_originalextension.view.templateRootPath = EXT:my_new_extension/Resources/Private/Templates/
Copy all templates from the original extension to your new extension. Add the new "delete all" button where you need it and link it with your new extension controller -> deleteAllAction. Of course, you need to implement the deleteAllAction in your controller.
In your controller, inject the original repository from the original extension, and use it to delete the data.
Remember to check the links in the copied templates. They need to point to the original extension, so add "extensionName" to any f:link.action calls expect the new "deleteAll" link.

MSComctlLib reference/components load with "was not a loaded control class" error

I'm having trouble oppening an project developed in VB6. Some controls attached with MSComctLib class are not loading.
I'm using Windows 7.
In the error analysis the following message appears (without the number of lines):
Class MSComctlLib.ImageList of control ImageList1 was not a loaded control class.
Class MSComctlLib.Toolbar of control Toolbar1 was not a loaded control class.
MSComctlLib.StatusBar class of control sbStatusBar was not a loaded control class.
and then a lot of invalid property names,
Ex:
The property name _ExtentX in ImageList1 is invalid
The property name Buttons in Toolbar1 is invalid
...
According to the guidance of microsoft support site http://support.microsoft.com/kb/896559, an update would be the solution http://www.microsoft.com/en-us/download/details.aspx?id=10019
I tried running the executable VisualBasic6-KB896559-v1-ENU
but I still have the same error when opening the project.
Could someone tell me how to solve it?
Thanks in advance!
If you don't have the common controls selected in your project, but the controls are on a form, then you'll receive these errors when you try to load the project (or add a pre-existing form to a project that doesn't have the component selected).
On the VB6 menu, select Project-Components. Scroll down to Microsoft Windows Common Controls 6.0 (if you have a service pack installed, then the SP level will usually be at the end of the library name). Select that component, click Ok. Save the project, and then reload the project.
If this is the source of your issue, you should now be able to load those forms that have a reference into the common controls.

ext_conf_template - how to use settings in root.ts

I develop TYPO3 extension. And I have file ext_conf_templates with my settings. How do I use this settings in the typoscript, root.ts ?
# cat=Template_einstellung/101/0104; type=options[nein=,ja=noborder]; label=remove bottom border (only with transparent use)
template.border =
In your ext_localconf.php add below code.
$conf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY]);
$border = $conf['template.']['border'];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptConstants("
plugin.tx_yourextensionkey.template.border = $border
");
Now, anywhere in your typoscript setup you can access your border variable with {$plugin.tx_yourextensionkey.template.border}. You can name this variable as you like but best practice is to use plugin and extension name prefix to make it unique across installations.
Above works for TYPO3 CMS version 8.7. I think it´s the same routine all the way down to version 6.2 but I´m not 100% sure.
You can verify that this works with the Template backend module. In the main select box select TypoScript Object Browser. Make sure that the browser select box says Constants. Now you should be able to find your new variable.

TYPO3: Backend Module

I've installed the lfeditor extension, the backend module is registered as per below (ext_tables.php):
TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'SGalinski.lfeditor',
'user',
...
In other words, the backend module is registered as a submodule of the user main module.
I can't seem to be able to find the backend module though. Changing the second parameter to 'web' results in the link showing up under Web, but of course I don't want to change the original code.
How do I activate the user main module?
User menu was moved to the top bar, so modules added to it will be availble there ;) Right, this one should be probably be placed in other menu (System?), but I think that's an author's concept.
Try to activate one of the "User" extension, for example "User>User Settings". If you activate it, menu "USER TOOLS" should be visible.

Phpfox Register Page Plugin Call

Can someone please explain this piece of code works in phpfox {plugin call='user.template_default_block_register_step2_7'}
Thanks in advance.
plugins are works in phpfox as a hook.
to add your custom code with in default phpfox system without changing any file we used plugin.
{plugin call='user.template_default_block_register_step2_7'}
to use this plugin you must create a file name user.template_default_block_register_step2_7.php
in any module even in your custom module.
what ever you write in this file it's automatically added where this plugin call.
you can add multiple plugin with same name in different module.
plugin file path
module_name/include/plugin/
It will include a block file in the following location,that block file has the registration page.
www/projectname/Module/user/template/default/block/register/step2.html