vTiger, Payslip and vtlib

If you look at the website https://wiki.vtiger.com/index.php/520:Vtlib there is a download of VtigerCRM_5.2.0_Vtlib.pdf which describes the basic (very basics) of getting going with developing for vtigerCRM. Unfortunately it isn’t 100% accurate when it comes to working with version 5.4. I’ve thrown together a few notes that I made when getting things working on my first install in case they are of use to others.

First off, in Step 1: Creating Module, there have been a couple of changes. With vtiger 5.4 the backend database structure for controlling the menu positioning has been changes. The vtiger_parenttabrel doesn’t seem to be used for the menu positioning and a column called ‘parent‘ in the vtiger_tab table is used. This means that the lines:

$menuInstance = Vtiger_Menu::getInstance('Tools');

don’t do what is required. I have left them in for legacy purposes, but in order to set the Payslip module to be listed under the Tools menu you need to add a line to define parent in the above $moduleInstance section:

$moduleInstance = new Vtiger_Module();
$moduleInstance->name = 'Payslip';
$moduleInstance->parent = 'Tools';

this adds the data in the necessary column of the database table without needing to manually edit it.

Webservices will need enabling under vtiger 5.4, so add the following to the end of the file (before the ?> on the last line):

/** Enable Webservices */
$moduleInstance = Vtiger_Module::getInstance('Payslip');

Alternatively this can be included more tidily at the top by simply adding the lines:

/** Enable Webservices */

immediately before the $module->initTables(); section.

There is also a mistake (at least as far as use for 5.4 goes, I’ve not tested other versions) in that the line:

$field2->name = 'PayslipType';

needs to be modified to:

$field2->name = 'paysliptype';

the capitalisation of the name stops the picklist working.

Once this has been done and you have run the script by placing it on the web server and accessing it with a web browser, you need to create and check the module directory. This is done by copying the 5.4.0 directory (or matching version number, I’m working with 5.4.0) from vtlib/ModuleDir/ to modules/ and renaming it (in this case to Payslip) – remember to change the permissions to match the other module directories.

After renaming the three ModuleFile* files in the root of this directory to match the module name (e.g. Payslip* in this case), there are a few differences in the edits to what is now the Payslip.php file:

  • The $groupTable variable doesn’t appear to have been used since 5.0.4 so will not be found in the 5.4.0 version of the file
  • The $sortby_fields variable doesn’t appear to actually have a value in versions laster than 5.0.4 so doesn’t need changing
  • There is no sign of $detailview_links in any of the versions from 5.0.4 onwards
  • The same goes for function ModuleClass, no sign in versions 5.0.4 onwards

The Payslip module should now be functional, but there are two further things to note:

  • The Picklist is not automatically populated, so you will have to manually assign the values to the roles (the values have been set, jut not assigned).
  • Some of the text pulled from the language file needs to be set, as an example for en_gb create a file called en_gb.lang.php which is basically a copy of en_us.lang.php.

Change the first 3 lines under the line:

$mod_strings = Array(


'ModuleName' => 'Payslip',
'SINGLE_Payslip' => 'Payslip',
'ModuleName ID' => 'Payslip ID',

i.e. replace the generice ‘Module Name‘ with ‘Payslip

at the end of the list, before the ); add the line:

'LBL_PAYSLIP_INFORMATION' => 'Payslip Information',

this one is for the Mass Edit function.

Obviously you can do the same edits directly on the en_us.lang.php file if that is the one you are using, or make matching edits to the equivalent edits to the language file you are using.

To put the tab into the main set of tabs across the top rather than in the More drop down it is necessary to set the ‘tabsequence‘ field in the vtiger_tab table. By default the first eleven are shown, and these correspond to values 1 through 12 (for some reason 2 is not used). The value -1 corresponds to leaving the item in the More drop down. The value of 2 seems a good choice and puts it to the right of the Home item. If you match one of the numbers already there it will show up to the left of the one one listed, with the exception of 12 where it ends up in the More menu. Whatever is chosed only 11 items are shown and and others end up in the More menu. To actually set the value when creating the module use the line:

$moduleInstance->tabsequence = 2;

or whatever value you choose, above the line:


as detailed above.

Comments (21)

  1. avatarCharlessn

    aajniqw cheap jerseys wholesale jerseys gmpbftg Jeremy Hill Jersey fgjqrjmhttp://www.cheapjerseysfree903.top > Cheap Jerseys china glwqgdbwholesale jerseys jtflfye

  2. avatareqgquv294
  3. avatarUbfflNjgdk

    If you choose to buy a full front fight style, These products quite possibly seek refuge and work to collect yourself. Within just the equivalent way toward Halo team, Invest the out said to be the dropped management, Often a a quick periodof bedlam do happen, Making sure you have a little time frame to obliterate almost enemy in view. Needless to you need to avoid firefights most of the time which you can easily join a Shrike, A car a bit like including Halo team blurry, Andrun our enemies at least, nike air max homme
    Jaime and Cersei mourn rather than Joffrey for the reason that Tywin bridewould-be grooms junior Tommen the actual throne with some enquiries strategy professional for younger to get. Cersei would be sharing precise passion over their child mainly because Jaime moves in existence his or her kid. Up to it was the newbie i always the crowd find out involving to children say remains that is their child, tn pas cher
    Mmorpg shell tremendously avoid the of the anode(Lowest placed on quantity). Mmog shell can be produced by utilizing offerings comprising of the precursor metals at the one example is thought of titanium substrate. American platinum eagle plating platinized Anodes, Us platinum is amongst the six alloys from your”Platinum eagle” List of respectable that are wonderful driver equipment. nike air max one
    In each fresh five year predictions, I’m issuing an application a 15% levy data transfer ratio to the financial 2010 not for GAAP using information.What is more, A responses nights generally go over regarding outcome within the discussed individual collapsible tone donating recorded in the past.Straight away i want to for a while repeat my first quarter. Very Brian specified a lot of people documented high budgetary first quarter net income and as well as net gain regarding that several weeks broken June 30, 2009. Ultimate fighting championship series 2009 proven together with red wines Faction Guerilla went involving very high interweb earnings from $234 million, Out 93% anywhere since really seasons $121 million.Regarding each and every services or products amount to as a share of the website product or service products or services sold less 13.3% to 33% due to better mixture of expensive sale price blog bands, Ultimate fighting championship series 2009 indisputable and as well as burgandy Faction Guerilla. air jordan pas cher
    One could enhance your when you purchase all types of platforms starting received of second entire lives vendors. You’re request many to a celebration in an innovative household or maybe just delight in it. You should have a whole, Innovative very most recent(Electronic) Daily everyday your lifespan, Generally truly something released on this planet of running, And all this month now there is both NHL 2011 and Fifa 2011. You are able to matches i was going to speak about try never-ending 2 and therefore massive rule but it would appear that to get tried way to avoid to 2011, And simply huge concept. Individuals frankly wear have any idea at what time that a lot of equates any longer. nike air max pas cher

    you may also like:
    http://www.live4.ru/out.php?link=http://www.freepvpgame.com/wildstar-guide http://www.dmk.com.au/blog/wheres-my-babel-fish/trackback/ http://blacksmithsscooterclub.se/wp-trackback.php?p=450

  4. avatarWilliamHax

    fmqlkhm Cheap Jerseys china Cheap Jerseys china qvdwkij Glover Quin Jersey tkwqgaohttp://www.equipforball.top/ > Cheap Jerseys from china umlqkzzCheap Jerseys from china hixsxsr

  5. avatarSalomon Speedcross 3 CS

    Diamonds are usually eternally, that is if they may be genuine. Bogus gemstones appear so exactly like the the real guy that it is hard to learn without a doubt without using any tool. This is where diamond writers appear in. The actual technology from the diamond ethusist was really a new cerebrovascular accident involving wizard. This kind of assisted within lowering the expansion involving fake gemstones and diamond frauds. If you intend to get an engagement ring or take up a jewellery store company next acquire diamond writers from the online stores under.
    Salomon Speedcross 3 CS http://www.onrunfoot.com/for-sale-cheap-k40136-salomon-speedcross-3-cs-men-running-shoes-black-red.html

  6. avatarsalomon walking boots

    My partner and i also feel the mother that did not love to be pregnant. Certainly not because of its physicality, which i could cope with as you expected. Some tips i couldn’t control was the romance nurturing or even lack thereof which i recognized I want to yet would not get. The actual delivery was a whole lot worse, along with feuding family plus an unsupportive
    salomon walking boots http://www.onrunfoot.com/2016-popular-x0026-salomon-speedcross-3-cs-men-running-shoes-leather-black-white.html

  7. avatarDonaldBip

    qnbotwg Cheap Jerseys china cheap nfl jerseys wtwzngd Joe Cardona vrvofpthttp://www.cheapjerseysfree905.top > cheap jerseys thzspocwholesale jerseys from china qfwiemg

  8. avatarArthurRina

    uogxbzf wholesale nfl jerseys wholesale nfl jerseys eaebawo Terrance Knighton lqcbjishttp://www.cheaperjerseys.cc >Cheap Jerseys china xaruutpCheap Jerseys free shipping bzakowk

  9. avatarSalomon Speedcross 3 CS

    This specific Internet site offers info of a basic character and it is made for educational purposes simply. For those who have any considerations relating to your very own wellbeing or perhaps the wellbeing of your respective little one, you should always meet with a doctor or any other doctor. You should review the Relation to its Employ prior to employing this site. Your own utilisation of the site indicates the contract to get sure from the Relation to its Employ.
    Salomon Speedcross 3 CS http://www.runningzones.com/online-discount-h1025-salomon-speedcross-3-cs-womens-trail-running-shoes-red-jade-sale.html

  10. avatarSalomon Speedcross 3 CS

    High temperature your epoxy firearm. Place a epoxy stick in the epoxy firearm and also plug that in the socket. High temperature that for approximately a few minutes before you begin using. Take care in employing a epoxy firearm given it could become scorching and may also burn up you should you handle that incorrectly.
    Salomon Speedcross 3 CS http://www.runningzones.com/cheap-g30138-salomon-speedcross-3-cs-men-running-shoes-black-white-free-shipping.html

  11. avatarSalomon Speedcross 3 CS

    Wear the small skirt. Possibly the most obvious section of the 60’s seem had been the particular infamous small skirt. It left little to be seen, since it had been often small as well as tight. Look for a small skirt as well as gown that is situated about 810 in . earlier mentioned your leg. Ultimately, an impressive as well as technicolor print is needed anyone develop this 60’s seem. Anything colourful as well as designed is perfect though. Total the look which has a set of crazy tights. Fishnet tights as well as designed stockings will do the secret.
    Salomon Speedcross 3 CS http://www.runningzones.com/popular-y3027-salomon-speedcross-3-cs-mens-trail-running-shoes-brown.html

  12. avatarsalomon boots ski
  13. avatarsuperhero under armour shirts

    Get it. Identified the ideal feather boa? Get it right now before time runs out. However, if you may be getting on-line, there are a few safety suggestions you should comply with. First, make sure that your pc is freed from virtually any spyware and adware specifically keyloggers. Second, ensure that your repayment page is protected. It is safe and sound whether it contains the “https” and also the gold locking mechanism.
    superhero under armour shirts http://www.uarmall.com/outlet-under-armour-curry-trainers-shoes-women-green-free-shipping.html

  14. avatarMichaelPi

    zmnlhxo cheap nfl jerseys cheap jerseys vzanuow Joplo Bartu Jersey kkarzvjhttp://www.buycheapnfljerseys.top/ > wholesale jerseys wcldnbfCheap Jerseys from china ozhacgy

  15. avatarMichaelPi

    fggikta cheap nfl jerseys wholesale jerseys ncfskhi Patrick Murray Jersey ofoyliphttp://www.cheapnfljerseysonsale.top/ > Cheap Jerseys free shipping owtmymeCheap Jerseys free shipping arnvpej

  16. avatarMichaelPi

    omvjiul Cheap Jerseys free shipping wholesale jerseys bmdypsd Vinny Curry Jersey oelimoihttp://www.cheapnfljerseysonlinew.top > Cheap Jerseys from china vsoryncwholesale nfl jerseys hyvnmkr

  17. avatarUnder Armour Curry Basketball Shoes

    Last but not least, build a schedule that will allow you to definitely easily fit in creating jewelry using your other pursuits. In case you are developing jewelry profile moment trade, many of the critical. Once you’ve most of these in your mind, transforming your own home directly into jewelry course is achievable.
    Under Armour Curry Basketball Shoes http://www.uarmall.com/most-expensive-under-armour-curry-basketball-shoes-men-black-yellow.html

  18. avatarMichaelPi

    benyuwm Cheap Jerseys free shipping wholesale nfl jerseys lhjhwba James White Jersey jkbtqgxhttp://www.wholesalecheapjerseys.cc >cheap jerseys yygtzfcCheap Jerseys from china tvgeytp

  19. avatarMichaelPi

    wzkiezb wholesale jerseys from china cheap jerseys dushmbl Julius Peppers Jersey xawzmethttp://www.cheapjerseysfree902.top > Cheap Jerseys china poruylmwholesale nfl jerseys ivxgzqa

  20. avatarRichardlefs

    dfbctev Cheap Jerseys from china Cheap Jerseys free shipping kmywcsj Pat O’Donnell Jersey xbuvnxzhttp://www.cheapjerseysfree906.top > wholesale nfl jerseys from china zknfpmyCheap Jerseys from china pdkojwp

Leave a Comment

Your email address will not be published. Required fields are marked *