- Edited
Hi,
To changing of home message through admin panel. To change it, i have to modify the source files.
Thanks.
Hi,
To changing of home message through admin panel. To change it, i have to modify the source files.
Thanks.
You want to do what?
Yeah, that's why i posted.
http://osticket.com/forums/showthread.php?t=6445(http://osticket.com/forums/showthread.php?t=6445)
^ Is this feature request similar to what you're wanting?
Hi,
I threw together this for you, which (basically) does what you're asking for.
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>
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:
',helpdesk_message='.db_input(htmlspecialchars($var)).
Now run the following query on your database:
ALTER TABLE ost_config
ADD helpdesk_message text;
And that's it, go to your admin preferences and settings and update the message from there :)
Any probs, let me know, I'm no experienced programmer so anyone feel free to improve on it
Regards,
Thanks!
I really appreciate the work you put into this. You should really make sure you get credit for this mod and post it in MODS as well.
Again thanks...I know that there are several people looking for this sort of thing.
Thanks!I really appreciate the work you put into this. You should really make sure you get credit for this mod and post it in MODS as well.
Again thanks...I know that there are several people looking for this sort of thing.
Glad it worked for you, it was only a ten minute thing thrown together for the op and I found it would be useful too, doesn't take much, just knowing I did it is enough for me, don't need any credit.. :
when implemented in v 1.6 ended up with a blank page. I did get what appeared to be the right fields in the Admin area but the text and main page broke.
:when implemented in v 1.6 ended up with a blank page. I did get what appeared to be the right fields in the Admin area but the text and main page broke.
Can you post your index.php code so I can compare it to mine?
And are you sure you're copying this bit correctly?
<p class="big"><?php echo $cfg->HelpDeskMessage(); ?></p>
Edit: I just implemented this in to a brand new install of osTicket and it is working, so it must be you didn't copy something over correctly?
You are correct! It works Beautifully! I have made a note to self to never use notepad for code editing again...
Thanks for this I can certainly use this and I know others can as well.
Thanks for confirming :