Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

Add custom information on software or other tab

Hello

I would like to add custom information displayed on software ,other or hardware tab. Is anyone who did something similar? Could someone give at least a starting point?

I am having a Centos 6 with Apache/2.2.15 and ocs inverntory 2.4.1 server

Thank you
in Administrative console by (730 points)

1 Answer

0 votes

I was able to add new lines with custom reports on software tab.

This is how i did it

1. Add a new entry in 
    /usr/share/ocsinventory-reports/ocsreports/plugins/language/en_GB/en_GB.txt  (or other language)
 like  2130 Microsoft Office Professional Plus 2010

2. Modify 
    /usr/share/ocsinventory-reports/ocsreports/require/function_console.php
add 7 new entries similar with OCS_REPORT_NB_ERR ; 

This is my example for office 2010

$multi_search

    "OCS_REPORT_OFFICE2010" => array("FIELD" => 'SOFTWARES-NAME', "COMP" => 'like', "VALUE" => 'Microsoft Office Professional Plus 2010'),

$table

    "OCS_REPORT_OFFICE2010" => "softwares",

$table_field

    "OCS_REPORT_OFFICE2010" => "softwares",

$link

    "OCS_REPORT_OFFICE2010" => array("PAGE" => 'ms_multi_search'),

$repart

    "OCS_REPORT_OFFICE2010" => "SOFT",

$lbl_field

    "OCS_REPORT_OFFICE2010" => $l->g(2130),         (it contains the id from en_GB.txt new entry)

$sql_field

    "OCS_REPORT_OFFICE2010" => array('SQL' => "select %s from %s where NAME like '%s'",

        'ARG' => array('count(distinct hardware_id) c', $table["OCS_REPORT_OFFICE2010"], 'Microsoft Office Professional Plus 2010%')),

    

Logout and login to see the new changes

by (730 points)
 
Powered by Question2Answer
...