- Edited
Hello All,
I want to give credit for this MOD to daz123. He posted it as a reply to a feature request of mine and another OS Ticket enthusiast. Please see the code and instructions below. I have also included a screen shot of what it looks like post implementation. The goal of this from my perspective is to use this as a means of notifying customers of outages or system wide issues to avoid the need for a flood of tickets.
Instructions:
In the file 'include/staff/preference.inc.php' find:
<tr><th>Helpdesk Name/Title:</th>
<td><input type="text" size="40" name="helpdesk_title" value="<?=$config?>"> </td>
</tr>
Add this code underneath:
<tr><th>Helpdesk Index Message:</th>
<td><textarea rows="6" cols="35" name="helpdesk_message"><?=$config?></textarea><br>
Enter the message above to be shown on the index page</td>
</tr>
Now in index.php find:
<p class="big">In order to streamline support requests and better serve you, we utilize a support ticket system. Every support request is assigned a unique ticket number which you can use to track the progress and responses online. For your reference we provide complete archives and history of all your support requests. A valid email address is required.</p>
**Note** My text was slightly different but it was still easy to find
and replace it with this:
<p class="big"><?php echo $cfg->HelpDeskMessage(); ?></p>
Now in 'include/class.config.php' after the following
function getBaseUrl(){ //Same as above with no trailing slash.
return rtrim($this->getUrl(),'/');
}
Add this code:
function HelpDeskMessage(){
return $this->config;
}
In the same file 'include/class.config.php' after:
',helpdesk_title='.db_input($var).
Add the following code:
Add this code:
',helpdesk_message='.db_input(htmlspecialchars($var)).
Now run the following query on your database:
ALTER TABLE ost_config
ADD helpdesk_message text;
ScreenCaps:
Admin:
Main Page:
This is a great start to getting banner messages out to people. Hopefully others will take the code, mod it themselves and re-post improvements.
Rich