Hello,I am in the process of adding mod_geoip2 in "staff/tickets.inc.php" to show the country flag image in a new column.To make this function I will need to first fetch the IP address of the ticket.I tried to add the below code in "tickets.inc.php"<?php echo $ticket->getIP(); ?>But I get this error:"Fatal error: Call to a member function getIP() on a non-object"The code works perfectly in ticket-view.inc.php but not in tickets.inc.php.I only know to fiddle with PHP and I am not a PHP Programmer. Can some one help me to just print the IP Address of the ticket?Best Regards,San

IS there some reason why you wouldn't go to:Admin panel 0-> Manage -> Forms -> Ticket DetailsUnder Form Fields add:IP Address, Short Answer, Internal, geoip2And then have the script update that field in the database?This would handle the display of the var on the ticket view page for you.

Unfortunately GeoIP2 is only one part of my customization.Please I would kindly request you to guide me on how to get<?php echo $ticket->getIP(); ?> working in "tickets.inc.php".

Sorry I have no idea, I've never tried to something like that on 1.8.x+  But I imagine that this thread might point you in the right direction: http://forum.osticket.com/d/discussion//a-better-ticket-list

Write a Reply...