Page 1 of 1

Admin Ticket List

Posted: Wed Apr 18, 2012 8:19 pm
by steve
Hello,

I have modified the ticket_list.inc.php file so my admin ticket list displays customs fields.

Does anybody know how to limit the amount of character displayed from the custom field value. Lets say custom field = ABCDEFGHIJKLMNOPQRSTUVWXYZ obviously that is very long, if that were to display in the admin ticket list it would really stretch out the table. Anybody know how to make it so it cuts of at say 15 character, so instead it displays ABCDEFGHIJKLMNO....?

Thanks,

Steve

Re: Admin Ticket List

Posted: Thu Apr 19, 2012 11:57 am
by Klemen
Use PHP's substr() function.

instead of printing out $variable_name use

Code: Select all

substr($variable_name, 0, 15); 

Re: Admin Ticket List

Posted: Fri Apr 20, 2012 4:13 pm
by steve
Thank you!

Thank is exactly what i needed.

Re: Admin Ticket List

Posted: Tue May 15, 2012 9:38 pm
by dr_patso
stevekotyk wrote:Thank you!

Thank is exactly what i needed.
how did you modify your ticket list?? did you have it display separate columns?

Re: Admin Ticket List

Posted: Tue May 15, 2012 10:02 pm
by steve
I used the method described in this thread

viewtopic.php?f=14&t=3036&p=15624&hilit ... ist#p15624

My admin ticket list shows the following.

http://i50.tinypic.com/5lvqqa.png

The reported issue column is the one i wanted the above mention code for, as this field generally contains a lot of data.