mateusznitka / protocolsmanager

GLPI Plugin to report users inventory
8 stars 12 forks source link

display personnel number as owner #62

Open babydunet opened 4 months ago

babydunet commented 4 months ago

Hello everyone and thank you for this excellent plugin

GLPI users have a number in their profile that I want to display in the PDF file as for the first and last name with the "owner" tag

How to add this in the plugin script? THANKS

pistokcad commented 4 months ago

Hi.

It possible, but you have to modify the generate.class.php and template.php several places. My customized version can use and print these (and modified to hungarian date-time format): //Login ID: {login_userid} //Valid since: {begin_date} //Valid until: {end_date} //Phone: {phone_number} //Phone 2: {phone_number_2} //Mobile phone: {mobile_phone_number} //Administrative number: {registration_number} //Comment: {comment} (and not mentioned - print it and use it the glpi site url for direct download link to generated pdf in the sent e-mail)

And if I think good you would like to use the database "ID" number or something else?

I cannot commit or send to here because I don't have any idea how can I do that. One more thing: I using a forked version: https://github.com/Wolvverine/protocolsmanager

babydunet commented 4 months ago

Hi pistokca and thank you for your response, Yes this is what I want to add to the plugin, is it possible to have your 2 php files to understand how you went about adding this information to the PDF file? thank you for your help

Capture d'écran 2024-04-15 163615

pistokcad commented 4 months ago

I know I can attach here - but I would like to merge to that fork. :) I use these file with GLPI 10.0.12 without problem. Modified_10.zip

babydunet commented 4 months ago

Thanks pistokcad, I will create the same topic on the fork that I will install now

babydunet commented 4 months ago

I installed folk but I got a PHP error https://github.com/Wolvverine/protocolsmanager

PHP Deprecated function (8192): Required parameter $CFG_GLPI follows optional parameter $message in /var/www/html/itsm/glpi/plugins/protocolsmanager/inc/Buttons.php at line 5 Uncaught Exception Error: Class "PluginProtocolsmanagerConfig" not found in /var/www/html/itsm/glpi/plugins/protocolsmanager/front/config.form.php at line 9

pistokcad commented 4 months ago

Please check the PHP version. I'm using php8.0

Wolvverine commented 3 months ago

Plugin fork and GLPI are now on PHP 8.2 tested.

We use:

https://github.com/Wolvverine/docker-glpi