Hello,
To help you, I need more information.
What is the purpose of encrypting the ticket ID?
How will it be used if it is encrypted? GLPI will not be able to understand it 
(or you will be obliged to decrypt it)!
Thank you,
Regards,

Olivier MORON
GLPI Development

RAYNET SAS
Tel : +33 476 33 4952
Fax: +33 4 76 70 56 63


From: Glpi-dev [mailto:glpi-dev-boun...@gna.org] On Behalf Of Max Safonov
Sent: Tuesday, December 08, 2015 4:37 PM
To: Liste de diffusion des developpeurs GLPI
Subject: Re: [Glpi-dev] add new tag

Could you explain in detail how to do it correctly, I have little experience in 
php

2015-12-08 17:06 GMT+02:00 Moron, Olivier 
<olivier.mo...@araymond.com<mailto:olivier.mo...@araymond.com>>:
Hello,

In fact you need to modify two things:

1)      The tag definition

2)      The tag value
And I saw that you have done only the 2) part

So look into notiifcationtargetticket.php, and add into the getTags() function 
in the $tag array your new tag.
And then you should be able to add it into your notification templates
And then you should be able to assign a value to it in the getDatasForObject()

Regards,

Olivier MORON
GLPI Development

RAYNET SAS
Tel : +33 476 33 4952
Fax: +33 4 76 70 56 63<tel:%2B33%204%2076%2070%2056%2063>


From: Glpi-dev 
[mailto:glpi-dev-boun...@gna.org<mailto:glpi-dev-boun...@gna.org>] On Behalf Of 
Max Safonov
Sent: Tuesday, December 08, 2015 2:36 PM

To: Liste de diffusion des developpeurs GLPI
Subject: Re: [Glpi-dev] add new tag

yes, I need to add a new tag with ticket number is the same as 
##ticket.id##<http://ticket.id#%23>  It is necessary for me to encrypt the 
ticket number, so I need a new tag
I need new tag with id task for crypt this number and sent in notification to 
user, for crypt id I use next:
$id=count($datas['tickets']);
$key="xxxxx";
$text1=base64_encode(mcrypt_ecb(MCRYPT_DES, $key, $id, MCRYPT_ENCRYPT));

2015-12-08 15:01 GMT+02:00 Moron, Olivier 
<olivier.mo...@araymond.com<mailto:olivier.mo...@araymond.com>>:
Hello,
What I don’t understand is that this tag is already available:
[cid:image001.png@01D1325F.CACDEC70]

So ?
Regards,


Olivier MORON
GLPI Development

RAYNET SAS
Tel : +33 476 33 4952
Fax: +33 4 76 70 56 63<tel:%2B33%204%2076%2070%2056%2063>


From: Glpi-dev 
[mailto:glpi-dev-boun...@gna.org<mailto:glpi-dev-boun...@gna.org>] On Behalf Of 
Max Safonov
Sent: Tuesday, December 08, 2015 1:54 PM
To: Liste de diffusion des developpeurs GLPI
Subject: Re: [Glpi-dev] add new tag

my glpi version 0.83.7, She works steadily for many years

 I added to notificationtargetticket.class.php
     // is ticket deleted
      $datas['##ticket.isdeleted##'] = 
Dropdown::getYesNo($item->getField('is_deleted'));
//start
// Tickets status infos
$restrict = $data['tickets_id'];
$tickets = getAllDatasFromTable('glpi_tickets',$restrict);
$datas['tickets'] = array();
if (count($tickets)) {
        $ticket = new Ticket();
foreach ($tickets as $ticket) {
        $tmp = array();
        $datas['tickets'][] = $tmp;
        }
}
$datas['##ticket.number##'] = 0;
if (!empty($datas['tickets'])) {
        $datas['##ticket.number##'] = $datas['tickets_id']);
}
//finish


I need a new tag that would be the ticket number, thank you very much for 
having responded

2015-12-08 14:40 GMT+02:00 Moron, Olivier 
<olivier.mo...@araymond.com<mailto:olivier.mo...@araymond.com>>:
Hello,

Could you explain in details?
And give your configuration?
Thank you,
Regards,


Olivier MORON
GLPI Development

RAYNET SAS
Tel : +33 476 33 4952
Fax: +33 4 76 70 56 63<tel:%2B33%204%2076%2070%2056%2063>


From: Glpi-dev 
[mailto:glpi-dev-boun...@gna.org<mailto:glpi-dev-boun...@gna.org>] On Behalf Of 
Max Safonov
Sent: Tuesday, December 08, 2015 1:23 PM
To: glpi-dev@gna.org<mailto:glpi-dev@gna.org>
Subject: [Glpi-dev] add new tag

Hello, I need help.
I need to add a new tag with ticket number is the same as 
##ticket.id##<http://ticket.id#%23>
I tried to add on example notificationtargetticket.class.php
but does not work

Please help with the problem.

Sincerely,
Max Safonov

_______________________________________________
Glpi-dev mailing list
Glpi-dev@gna.org<mailto:Glpi-dev@gna.org>
https://mail.gna.org/listinfo/glpi-dev


_______________________________________________
Glpi-dev mailing list
Glpi-dev@gna.org<mailto:Glpi-dev@gna.org>
https://mail.gna.org/listinfo/glpi-dev


_______________________________________________
Glpi-dev mailing list
Glpi-dev@gna.org<mailto:Glpi-dev@gna.org>
https://mail.gna.org/listinfo/glpi-dev

_______________________________________________
Glpi-dev mailing list
Glpi-dev@gna.org
https://mail.gna.org/listinfo/glpi-dev

Reply via email to