You are not logged in.
Right now I am creating report directories as: computerreport
My php files reflect this naming.
What do I have to change so that in GLPI my report shows as: Computer Report
Thanks,
Dan
Offline
Hi,
It's in your language files (ak : "computerreport.en_GB.php")
This first value is your plugin name : $LANG['plugin_reports']['computerreport'][1]= " Computer Report"
GLPI : 9.1.6 - OCS : 2.1.2
Plateforme : Windows Server 2008R2 Standard Edition Service Pack 1
Apache/2.2.31 (Win32) mod_ssl/2.2.31 OpenSSL/1.0.1p PHP/5.4.45 mod_perl/2.0.8 Perl/v5.16.3 ()
MySQL: 5.7.10-log
Offline
That just doesn't work for me.
This is my file:
<?php
$LANG['plugin_reports']['computerusers'][1] = "Computer User Info";
?>
and it still shows as computerusers in the report list.
Thanks,
Dan
Offline
In first post you said your report directory is : computerreport
In your file you have $LANG['plugin_reports']['computerusers']
Folder name must be equal to file name and to this entry
GLPI : 9.1.6 - OCS : 2.1.2
Plateforme : Windows Server 2008R2 Standard Edition Service Pack 1
Apache/2.2.31 (Win32) mod_ssl/2.2.31 OpenSSL/1.0.1p PHP/5.4.45 mod_perl/2.0.8 Perl/v5.16.3 ()
MySQL: 5.7.10-log
Offline
Thanks. I have tried several attempts with different names and I posted incorrectly here. I did reconfirm that both parts are named the same and tried again and it still is not working.
What am I missing?
Here is my latest attempt:
/var/www/glpi/plugins/reports/report/computerreport
- computerreport.en_US.php
- computerreport.php
computerreport.php:
<?
define('GLPI_ROOT', '../../../..');
include(GLPI_ROOT."/inc/includes.php");
$USEDBREPLICATE=0;
$DBCONNECTION_REQUIRED=1;
$report = new PluginReportsAutoReport($LANG['plugin_reports']['computerreport'][1]);
// write columns Computer name with sql id computername .....
// (sql field, column name)
$columns= array(new PluginReportsColumn('computername','Computer'),
new PluginReportsColumn('username',$LANG['stats'][20]),
new PluginReportsColumn('serial',$LANG['common'][19]),
new PluginReportsColumn('contact_num','Location'));
$report->setColumnsNames($columns);
//SQL Statement
$sql="select A.name as computername,serial,contact_num,B.name as username from glpi_computers as A left join glpi_users as B on A.users_id=B.id";
$report->setSqlRequest($sql);
$report->execute();
?>
computerreport.en_US.php:
<?php
$LANG['plugin_reports']['computerreport'][1] = "Computer Report";
?>
Last edited by danh (2012-11-05 17:02:36)
Thanks,
Dan
Offline
checking in...
Last edited by danh (2012-11-21 23:35:35)
Thanks,
Dan
Offline
I am still no closer to fixing this. I even tried on a brand new install and I get the same results.
Thanks,
Dan
Offline
I'm still seeking help on this one?
Anyone having this issue?
Thanks,
Dan
Offline
Hello Dan,
well, just followed your advice to create the report from your post #5,
copied computerreport.en_US.php to computerreport.de_DE.php,
then changed "Computer Report" to "PC Report" in there.
In Setup->Plugins->Reports -> Rights management by report
I found "PC Report" on first position and changed it's rights accordingly.
Then, the "PC Report" could be accessed via Tools->Reports-> PC Report.
Are you sure, that your locale is en_US -> standard seems "en_GB" if you set
language to English in user's settings.
In debug mode you can see variable "glpilanguage" for locale.
I was using GLPI 0.83.31 and reports 1.5.0.
Falko
Offline
WOW! THANK YOU!..!
I can't believe that was it.
Again, thank you :-)
Thanks,
Dan
Offline