- Edited
This MOD will be helpful for those who use their smart phones to access, modify, and close existing tickets. It's not aesthetically pleasing, but loads a LOT faster over a cellular network, and gets the job done.
First off, we need to have a mobile browser detector, which I've attached the script courtesy of DetectMobileBrowsers.mobi. (If this is used for commercial software, please support them at (http://detectmobilebrowsers.mobi/?switch=full#upgrade))
The PHP code does a good job at detecting a wide range of browsers and allows the functionality of customizing depending on the mobile browser in use.
Simply unzip and upload the attached file into /include/staff
After that, edit /include/staff/header.inc.php
ADD:
<?
//MOD by michael.therrien 7/24/09
if(isset($_GET))$_SESSION="TRUE";
if(isset($_GET))unset($_SESSION);
include("mobile_device_detect.php");
if(!isset($_SESSION) && mobile_device_detect(true,true,true,true,true,true,false,false))
{
echo"Welcome to osTicket Mobile!<br>";
}
else
{ ?>
BEFORE:
<link rel="stylesheet" href="css/main.css" media="screen">
Then ADD:
<?}?>
Before:
</head>
Then ADD:
<?if(mobile_device_detect(true,true,true,true,true,true,false,false)){ if(isset($_SESSION))echo"<a href=\"index.php?mobile\">Mobile"; else echo"<a href=\"index.php?full\">Full";echo" Version</a> | ";};?>
BEFORE:
<a href="logout.php">Log Out</a></p>
Hope this is handy!!!
UPDATE FOR THOSE WHO'VE ALREADY INSTALLED THE MOD: Updated attachment, many more phones supported, no need to change any code. There is still a few known incompatibilities, however there are a few workarounds in the comments section (if you have issues).