Ask not what osTicket community can do for you - ask what you can do for osTicket community

Go Back   osTicket Forums > osTicket 1.6.x > Suggestions and Feedback > Features Request

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-02-2012, 12:43 AM
shitansh shitansh is offline
Junior Member
 
Join Date: Mar 2012
Posts: 11
Default Allow home message change through admin panel.

Hi,
To changing of home message through admin panel. To change it, i have to modify the source files.
Thanks.
Reply With Quote
  #2  
Old 03-02-2012, 04:55 PM
ntozier's Avatar
ntozier ntozier is offline
Moderator
 
Join Date: Jan 2010
Location: NH USA
Posts: 1,628
Default

You want to do what?
Reply With Quote
  #3  
Old 03-03-2012, 05:23 AM
shitansh shitansh is offline
Junior Member
 
Join Date: Mar 2012
Posts: 11
Default

Yeah, that's why i posted.
Reply With Quote
  #4  
Old 05-01-2012, 02:10 PM
Rich_C Rich_C is offline
Member
 
Join Date: Mar 2012
Posts: 113
Default

http://osticket.com/forums/showthread.php?t=6445


^ Is this feature request similar to what you're wanting?
Reply With Quote
  #5  
Old 05-02-2012, 09:39 PM
daz123 daz123 is offline
Junior Member
 
Join Date: Mar 2012
Location: Birmingham, UK
Posts: 7
Thumbs up

Hi,

I threw together this for you, which (basically) does what you're asking for.

In the file include/staff/preference.inc.php find:
PHP Code:
         <tr><th>Helpdesk Name/Title:</th>
            <td><input type="text" size="40" name="helpdesk_title" value="<?=$config['helpdesk_title']?>"> </td>
        </tr>

Add this code underneath:
PHP Code:
        <tr><th>Helpdesk Index Message:</th>
            <td><textarea rows="6" cols="35" name="helpdesk_message"><?=$config['helpdesk_message']?></textarea><br>
            Enter the message above to be shown on the index page</td>
        </tr>

Now in index.php find:
PHP Code:
<class="big">In order to streamline support requests and better serve youwe utilize a support ticket systemEvery 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 requestsA valid email address is required.</p
and replace it with this:
PHP Code:
<p class="big"><?php echo $cfg->HelpDeskMessage(); ?></p>
Now in include/class.config.php after the following
PHP Code:
    function getBaseUrl(){ //Same as above with no trailing slash.
        
return rtrim($this->getUrl(),'/');
    } 
Add this code:
PHP Code:
    function HelpDeskMessage(){
        return 
$this->config['helpdesk_message'];
    } 
In the same file (include/class.config.php) after:
PHP Code:
 ',helpdesk_title='.db_input($var['helpdesk_title']). 
Add the following code:
PHP Code:
            ',helpdesk_message='.db_input(htmlspecialchars($var['helpdesk_message'])). 

Now run the following query on your database:
PHP Code:
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,

Last edited by daz123; 05-02-2012 at 10:23 PM. Reason: change database query
Reply With Quote
  #6  
Old 05-03-2012, 08:50 AM
Rich_C Rich_C is offline
Member
 
Join Date: Mar 2012
Posts: 113
Default

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.
Reply With Quote
  #7  
Old 05-03-2012, 09:52 AM
daz123 daz123 is offline
Junior Member
 
Join Date: Mar 2012
Location: Birmingham, UK
Posts: 7
Default

Quote:
Originally Posted by Rich_C View Post
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..
Reply With Quote
  #8  
Old 05-03-2012, 12:27 PM
Rich_C Rich_C is offline
Member
 
Join Date: Mar 2012
Posts: 113
Default

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.
Reply With Quote
  #9  
Old 05-03-2012, 12:54 PM
daz123 daz123 is offline
Junior Member
 
Join Date: Mar 2012
Location: Birmingham, UK
Posts: 7
Default

Quote:
Originally Posted by Rich_C View Post
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?

PHP Code:
<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?

Last edited by daz123; 05-03-2012 at 01:37 PM.
Reply With Quote
  #10  
Old 05-08-2012, 11:22 AM
Rich_C Rich_C is offline
Member
 
Join Date: Mar 2012
Posts: 113
Default

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.
Reply With Quote


Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:48 AM.