Hello,
This is my first post in this forum. I didn't want to open a new thread since this is exactly the this I a m looking for.
First, MANY THANKS to osticket.com for your open source program. I have recently installed it on my website and it is starting to help my team a lot. There are a lot of features I didn't go through yet but I am sure they are going to further improve our website management.
Now, forgive my ignorance. I am not a programmer but I like to do things myself. It helps me learn. From what I've seen, I am sure that there are a lot of people willing to help in this forum.
Basically I am looking to hide emails from my staff. I followed the instruction given by PRedmond which I thank very much.
What I did is this (let me know what I am doing wrong):
I went to my server host.
opened File Manager
went to the include/staff/viewticket.inc.php
then went to php editor to change the code inside this page
for my surprise the code on that page was different from the code PRedmond mentioned.
Here is the code I have:
<?php
if(!defined('OSTSCPINC') || !is_object($thisuser) || !$thisuser->isStaff()) die('Access Denied');
$info=($_POST && $errors)?Format:($_POST)(); //on error...use the post data
?>
<div width="100%">
<?if($errors) {?>
<p align="center" id="errormessage"><?=$errors?></p>
<?}elseif($msg) {?>
<p align="center" class="infomessage"><?=$msg?></p>
<?}elseif($warn) {?>
<p class="warnmessage"><?=$warn?></p>
<?}?>
</div>
<table width="80%" border="0" cellspacing=1 cellpadding=2>
<form action="tickets.php" method="post" enctype="multipart/form-data">
<input type='hidden' name='a' value='open'>
<tr><td align="left" colspan=2>Please fill in the form below to open a new ticket.</td></tr>
<tr>
<td align="left" nowrap width="20%"><b>Email Address:</b></td>
<td>
<input type="text" id="email" name="email" size="25" value="<?=$info?>">
<font class="error"><b>*</b> <?=$errors?></font>
<? if($cfg->notifyONNewStaffTicket()) {?>
<input type="checkbox" name="alertuser" <?=(!$errors || $info)? 'checked': ''?>>Send alert to user.
<?}?>
</td>
</tr>
<tr>
<td align="left" ><b>Full Name:</b></td>
<td>
<input type="text" id="name" name="name" size="25" value="<?=$info?>">
<font class="error"><b>*</b> <?=$errors?></font>
</td>
</tr>
<tr>
<td align="left">Telephone:</td>
<td><input type="text" name="phone" size="25" value="<?=$info?>">
Ext <input type="text" name="phone_ext" size="6" value="<?=$info?>">
<font class="error"> <?=$errors?></font></td>
</tr>
<tr height=2px><td align="left" colspan=2 > </td</tr>
<tr>
<td align="left"><b>Ticket Source:</b></td>
<td>
<select name="source">
<option value="" selected >Select Source</option>
<option value="Phone" <?=($info=='Phone')?'selected':''?>>Phone</option>
<option value="Email" <?=($info=='Email')?'selected':''?>>Email</option>
<option value="Other" <?=($info=='Other')?'selected':''?>>Other</option>
</select>
<font class="error"><b>*</b> <?=$errors?></font>
</td>
</tr>
<tr>
<td align="left"><b>Department:</b></td>
<td>
<select name="deptId">
<option value="" selected >Select Department</option>
<?
$services= db_query('SELECT dept_id,dept_name FROM '.DEPT_TABLE.' ORDER BY dept_name');
while (list($deptId,$dept) = db_fetch_row($services)){
$selected = ($info==$deptId)?'selected':''; ?>
<option value="<?=$deptId?>"<?=$selected?>><?=$dept?></option>
<?
}?>
</select>
<font class="error"><b>*</b> <?=$errors?></font>
</td>
</tr>
<tr>
<td align="left"><b>Subject:</b></td>
<td>
<input type="text" name="subject" size="35" value="<?=$info?>">
<font class="error">* <?=$errors?></font>
</td>
</tr>
<tr>
<td align="left" valign="top"><b>Issue Summary:</b></td>
<td>
<i>Visible to client/customer.</i><font class="error"><b>* <?=$errors?></b></font><br/>
<?
$sql='SELECT premade_id,title FROM '.KB_PREMADE_TABLE.' WHERE isenabled=1';
$canned=db_query($sql);
if($canned && db_num_rows($canned)) {
?>
Premade:
<select id="canned" name="canned"
onChange="getCannedResponse(this.options.value,this.form,'issue');this.selectedIndex='0';" >
<option value="0" selected="selected">Select a premade reply/issue</option>
<?while(list($cannedId,$title)=db_fetch_row($canned)) { ?>
<option value="<?=$cannedId?>" ><?=Format:($title)?></option>
<?}?>
</select> <label><input type='checkbox' value='1' name=append checked="true" />Append</label>
<?}?>
<textarea name="issue" cols="55" rows="8" wrap="soft"><?=$info?></textarea></td>
</tr>
<?if($cfg->canUploadFiles()) {
?>
<tr>
<td>Attachment:</td>
<td>
<input type="file" name="attachment"><font class="error"> <?=$errors?></font>
</td>
</tr>
<?}?>
<tr>
<td align="left" valign="top">Internal Note:</td>
<td>
<i>Optional Internal note(s).</i><font class="error"><b> <?=$errors?></b></font><br/>
<textarea name="note" cols="55" rows="5" wrap="soft"><?=$info?></textarea></td>
</tr>
<tr>
<td align="left" valign="top">Due Date:</td>
<td>
PS: I cut some of the code at the end because of limitation of characters set in forum
So basically what I need to know is this:
am I doing something wrong? (am I on a completely wrong path?- again sorry for my programming ignorance)
One thing I thought of is maybe I am using another version of the osticket?
What should I do to add this "hide email from staff" modification?
Many thanks for reading this. And more thanks for replying.
Regards,