CRM Vtiger6 – set up comments in required module

Hi everyone,
In this post we will set up comments feature in any module.
We will add comments in new module, named SalesPlan which a have created. In your case it can be your own module or one of the existing vtiger module.

Vtiger developers offer to us below script, where we should just mention required module name.

Ok, let’s follow it.

Create new_module.php in root directory and put below script:

require_once ‘vtlib/Vtiger/Module.php’;
$commentsModule = Vtiger_Module::getInstance(‘ModComments’);
$fieldInstance = Vtiger_Field::getInstance(‘related_to’, $commentsModule);
echo “DONE”;

$detailviewblock = ModComments::addWidgetTo(‘SalesPlan’);
echo “DONE!”;

Now, let’s take a look what this script does. Actually Comments module already installed in Vtiger6 version, so we just have to relate it with our module. I guess it’s clear.

After save new_module.php file and run it. In Browser you will see Two times done label.
Ok, we have just related comments module with our module in vtiger.

Here the screentshot:

CRM Vtiger Comments


Hope you have success with that, if you have any questions,  please leave them below in comment. We are glad to help you.