Create a simple module for Vtiger CRM
Here I want to explain how to create a simple installable module for vtiger CRM.
For creating a new installable module named 'testModule' for vtiger, we should have an xml file named: 'manifest.xml'. Contents of this file:
<?xml version="1.0"?>
<module>
<type>extension</type>
<name>testModule</name>
<label>testModule</label>
<parent>Tools</parent>
<version>1.0</version>
<dependencies>
<vtiger_version>5.2.1</vtiger_version>
</dependencies>
</module>
The module folder structure:
testModule->
modules->testModule->index.php
modules->testModule->language->en_us.lang.php
manifest.xml
Write the index file for our purpose. Here is an example to print the 'Hello World' when clicking the module:
<?php
include_once('language/en_us.lang.php');
echo "<font color=red>".HELLO_WORLD."</font>";
?>
Contents of language/en_us.lang.php:
<?php
define('HELLO_WORLD','Hello World');
?>
Then we have to create a .zip archive file for installation via vtiger module manager. Create the 'testModule.zip' file inside the module folder 'testModule' and compress the contents 'modules' and 'manifest.xml' to the 'testModule.zip'.
Then install the zip file via vtiger 'Settings->Module Manger' menu. Go to custom modules tab and click on the 'Import New' button to install it.
After installation you can see the module under 'Tools' menu. The content will be:
Enjoy creating more modules!
<?php
define('HELLO_WORLD','Hello World');
?>
testModule->
modules->testModule->index.php
modules->testModule->language->en_us.lang.php
manifest.xml
For creating a new installable module named 'testModule' for vtiger, we should have an xml file named: 'manifest.xml'. Contents of this file:Here I want to explain how to create a simple installable module for vtiger CRM.
For creating a new installable module named 'testModule' for vtiger, we should have an xml file named: 'manifest.xml'. Contents of this file:
Hi Shobin, I created modules
Hi Shobin,
I created modules using your guide and the comments in the post.
Worked fine!
Do also have an easy setup for entering the forms and the views, so I can use this as a new data entry entity?
Thanks,
Martijn
Hello Shobin I have used your
Hello Shobin I have used your to produce a test module for V Tiger. I have used the same code as you told. The moudle is integrated with V Tiger successfully but when I try to run this module the following error is occured.
Warning: require(modules/Events/language/en_us.lang.php) [function.require]: failed to open stream: No such file or directory in C:\Program Files\vtigercrm-5.2.1\apache\htdocs\vtigerCRM\include\utils\utils.php on line 492
My Files are code are
modules\hello\index.php Code
<?php
include_once('language/en_us.lang.php');
echo "<font color=red>".HELLO_WORLD."</font>";
?>
modules\hello\language code
<?php
define('HELLO_WORLD','Hello World');
?>
manifest.xml Code
<?xml version="1.0"?>
extension
hello
hello
Tools
1.0
5.1.2
all these files are place in hello.zip file and this file is used for integration
language file needs to
language file needs to be;
<?php
$mod_strings = Array('HELLO_WORLD' => 'Hello World');
?>