All Modification found in One Place

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
ey4fun
Posts: 26
Joined: Sat Oct 10, 2015 4:22 am

All Modification found in One Place

Post by ey4fun »

Im going to post here all modification i found in one place.
there is a lot of content on this forum that requires a lot of time to search.

Required Field in admin + Red Asterik

Klemen wrote:Fields are not required from admin panel because staff may not always have all the information you can request from a customer.

To make it required, you would need to modify file "admin/admin_submit_ticket.php".

I haven't tested it, but:

1. find line

Code: Select all

$tmpvar[$k]=hesk_makeURL(nl2br(hesk_input($_POST[$k])))
2. find the first else ABOVE that line.
3. ABOVE that "else" add

Code: Select all

		elseif ($v['req'])
        {
        	$tmpvar[$k]=hesk_makeURL(nl2br(hesk_input($_POST[$k])));
            if (!strlen($tmpvar[$k]))
            {
            	$hesk_error_buffer[$k]=$hesklang['fill_all'].': '.$v['name'];
            }
        }
Klemen wrote:Also, to show the red asterisk, in "admin/new_ticket.php" replace

Code: Select all

$v['req'] = '';
with

Code: Select all

$v['req'] = $v['req'] ? '<font class="important">*</font>' : ''; 
Twice!
Last edited by ey4fun on Tue Oct 13, 2015 11:50 pm, edited 3 times in total.
ey4fun
Posts: 26
Joined: Sat Oct 10, 2015 4:22 am

Re: All Modification found

Post by ey4fun »

Adding Ticket ID to Print
Klemen wrote:Nice, good job :D

The sequential ID is in the "id" column, so

Code: Select all

$ticket['id']
Which means adding this line

Code: Select all

<td bgcolor="#EEE"><b>' . $hesklang['id'] . ':</b></td><td bgcolor="#DDD">' . $ticket['id'] . '</td>
Last edited by ey4fun on Fri Oct 23, 2015 8:57 pm, edited 2 times in total.
ey4fun
Posts: 26
Joined: Sat Oct 10, 2015 4:22 am

Re: All Modification found

Post by ey4fun »

Hide IP Addres in Print
Klemen wrote:To hide the IP address you need to delete this code from the "print.php" file:

Code: Select all

	<tr>
		<td>' . $hesklang['ip'] . ':</td>
		<td>' . $ticket['ip'] . '</td>
	</tr>
Last edited by ey4fun on Tue Oct 13, 2015 11:47 pm, edited 1 time in total.
ey4fun
Posts: 26
Joined: Sat Oct 10, 2015 4:22 am

Re: All Modification found

Post by ey4fun »

Hide Category From Customer
Klemen wrote:Something like this should work:

1. Open index.php in a text editor

2. find this code

Code: Select all

    if (hesk_dbNumRows($res) == 1)
    {
    	/* Only 1 public category, no need for select box */
    	$row = hesk_dbFetchAssoc($res);
		echo '<input type="hidden" name="category" value="'.$row['id'].'" />';
    }
3. just BELOW add this

Code: Select all

    elseif ( ! empty($_GET['catid']) )
    {
		echo '<input type="hidden" name="category" value="'.intval($_GET['catid']).'" />';
    }
4. Save, upload and test!
Last edited by ey4fun on Tue Oct 13, 2015 11:47 pm, edited 1 time in total.
ey4fun
Posts: 26
Joined: Sat Oct 10, 2015 4:22 am

Re: All Modification found

Post by ey4fun »

Excel For Mac doesnt display information
Klemen wrote:I am able to open your report normally.

Looks like Excel on Mac doesn't support CDATA in XML files.

Try uploading this file to your "admin" folder and see if you can open new reports generated:
http://www.hesk.com/extras/export_mac_253.zip
Last edited by ey4fun on Tue Oct 13, 2015 11:46 pm, edited 1 time in total.
ey4fun
Posts: 26
Joined: Sat Oct 10, 2015 4:22 am

Re: All Modification found in One Place

Post by ey4fun »

Hiding a customized field from end user eyes
you can find this thread here - posting.php?mode=quote&f=13&p=14166
Klemen wrote:Open ticket.php in notepad and find

Code: Select all

$v['use'] && $v['place']==0
and change it to

Code: Select all

$v['use'] && $v['place']==0 && !in_array($k,array('custom1','custom2','custom3'))
Similarly change

Code: Select all

$v['use'] && $v['place']
to

Code: Select all

$v['use'] && $v['place'] && !in_array($k,array('custom1','custom2','custom3'))
This should hide the first, second and third custom field from the customer. You can change the list by modifying 'custom1', 'custom2','custom3'.
Klemen wrote:Try modifying the same code in the index.php - so you have that code modified in both index.php and ticket.php
Klemen wrote:Should be the same code in both files (the code I posted few replies back).

In index.php it will hide the fields from the "submit a ticket" form and in ticket.php it will hide the fields when the customer is looking at the ticket.
Klemen
Site Admin
Posts: 10168
Joined: Fri Feb 11, 2005 4:04 pm

Re: All Modification found in One Place

Post by Klemen »

Nice idea, but could get a bit confusing because not all modifications posted on the forum are for the same HESK version.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply