<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Open Script Solution&#187; field</title>
	<atom:link href="http://www.openscriptsolution.com/tag/field/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.openscriptsolution.com</link>
	<description>... where solutions for script programming are found ...</description>
	<lastBuildDate>Tue, 31 Jan 2012 03:22:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to Add user_registered Column in Authors &amp; Users Page on wp-admin of WordPress</title>
		<link>http://www.openscriptsolution.com/2010/01/13/how-to-add-user_registered-column-in-authors-users-page-on-wp-admin-of-wordpress/</link>
		<comments>http://www.openscriptsolution.com/2010/01/13/how-to-add-user_registered-column-in-authors-users-page-on-wp-admin-of-wordpress/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 02:28:52 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[add]]></category>
		<category><![CDATA[column]]></category>
		<category><![CDATA[field]]></category>
		<category><![CDATA[kolom]]></category>
		<category><![CDATA[pendaftaran]]></category>
		<category><![CDATA[registered date]]></category>
		<category><![CDATA[tanggal]]></category>
		<category><![CDATA[Users & Authors]]></category>
		<category><![CDATA[user_registered]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=1092</guid>
		<description><![CDATA[Once upon a time, I needed to monitor when did my users register their account in one of my WordPress website. It meant that I needed to get the value from user_registered field in the users table, and then displaying it in Authors &#038; Users page on wp-admin of WordPress. I have searched for the [...]]]></description>
			<content:encoded><![CDATA[<p>Once upon a time, I needed to monitor when did my users register their account in one of my WordPress website. It meant that I needed to get the value from <strong>user_registered</strong> field in the users table, and then displaying it in <strong>Authors &#038; Users</strong> page on wp-admin of WordPress. I have searched for the plugin regarding this, but I found nothing. Actually, I wanted to create the plugin to implement it. Unfortunately, I still have no idea how to do this, since I am not expert to create the plugin (probably someday I can do it). So I decided to edit the core file of WordPress. First of all, I opened the <strong>users.php</strong> file that located in <strong>wp-admin</strong> sub directory. After investigating this file for a few minutes, then I found the code regarding how to display the users list in <strong>template.php</strong> based on the code or function call <strong>user_row</strong> and <strong>get_column_headers</strong>. This template.php file located in <strong>/wp-admin/includes/</strong> sub directory. So, here is the modification I made. <span id="more-1092"></span></p>
<p>Open your <strong>/wp-admin/includes/template.php</strong> file, and find this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>899
900
901
902
903
904
905
906
907
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">		<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'users'</span><span style="color: #339933;">:</span>
			<span style="color: #000088;">$_wp_column_headers</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
				<span style="color: #0000ff;">'cb'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;input type=&quot;checkbox&quot; /&gt;'</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'username'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Username'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'email'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'E-mail'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'role'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Role'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'posts'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Posts'</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>then replace with this following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>899
900
901
902
903
904
905
906
907
908
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">		<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'users'</span><span style="color: #339933;">:</span>
			<span style="color: #000088;">$_wp_column_headers</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$page</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
				<span style="color: #0000ff;">'cb'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'&lt;input type=&quot;checkbox&quot; /&gt;'</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'username'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Username'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'email'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'E-mail'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'role'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Role'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'posts'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Posts'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
				<span style="color: #0000ff;">'user_registered'</span> <span style="color: #339933;">=&gt;</span> __<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Registered Date'</span><span style="color: #009900;">&#41;</span> <span style="color: #666666; font-style: italic;">// added by Masino Sinaga, January 13, 2010</span>
			<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Find again this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1985
1986
1987
1988
1989
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">			<span style="color: #b1b100;">default</span><span style="color: #339933;">:</span>
				<span style="color: #000088;">$r</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;td <span style="color: #006699; font-weight: bold;">$attributes</span>&gt;&quot;</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$r</span> <span style="color: #339933;">.=</span> apply_filters<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'manage_users_custom_column'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$column_name</span><span style="color: #339933;">,</span> <span style="color: #000088;">$user_object</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$r</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;/td&gt;&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>before the first line of that code, please insert this following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1984
1985
1986
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">			<span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'user_registered'</span><span style="color: #339933;">:</span>  <span style="color: #666666; font-style: italic;">// added by Masino Sinaga, January 13, 2010</span>
				<span style="color: #000088;">$r</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;td <span style="color: #006699; font-weight: bold;">$attributes</span>&gt;<span style="color: #006699; font-weight: bold;">$user_object-&gt;user_registered</span>&lt;/td&gt;&quot;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>That&#8217;s all. Now, go to your wp-admin of your WordPress website, then see the <strong>Authors &#038; Users</strong> page under the <strong>Users</strong> menu. You should see now the new column at the right most of the list named <strong>Registered Date</strong>. I had tested and it worked like a charm.</p>
<p>Please do not hesitate to leave your comment if you have a new idea how to implement this using the plugin in WordPress.</p>
<p>Hopefully this will help someone else out there.</p>
<p><strong>Updated on October 5, 2011</strong>: That article above I wrote when the version of WordPress was under 3.0. I found a great plugin today in order to do the same function above. It is <a href="http://wordpress.org/extend/plugins/recently-registered/" title="Recently Registered plugin" target="_blank"><strong>Recently Registered</strong></a>.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.openscriptsolution.com%2F2010%2F01%2F13%2Fhow-to-add-user_registered-column-in-authors-users-page-on-wp-admin-of-wordpress%2F&amp;title=How%20to%20Add%20user_registered%20Column%20in%20Authors%20%26%23038%3B%20Users%20Page%20on%20wp-admin%20of%20WordPress" id="wpa2a_2"><img src="http://www.openscriptsolution.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.openscriptsolution.com/2010/01/13/how-to-add-user_registered-column-in-authors-users-page-on-wp-admin-of-wordpress/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How to Know The Duplicate Records Based on The Same Value in a Field in MySQL Database</title>
		<link>http://www.openscriptsolution.com/2009/11/28/how-to-know-the-duplicate-records-based-on-the-same-value-in-a-field-in-mysql-database/</link>
		<comments>http://www.openscriptsolution.com/2009/11/28/how-to-know-the-duplicate-records-based-on-the-same-value-in-a-field-in-mysql-database/#comments</comments>
		<pubDate>Sat, 28 Nov 2009 08:10:38 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[duplicate]]></category>
		<category><![CDATA[field]]></category>
		<category><![CDATA[record]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=921</guid>
		<description><![CDATA[Have you ever wanted to know which record has duplicate content based on the same content in a field in MySQL database? This information will be get after you select the records and display them which one have the same content by groupping them by that field. Well, here is the script how you can [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wanted to know which record has duplicate content based on the same content in a field in MySQL database? This information will be get after you select the records and display them which one have the same content by groupping them by that field. Well, here is the script how you can do that. <span id="more-921"></span></p>
<p>Suppose we have a table named <strong>mytable</strong> which has these following records inside:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">+----+-------+
| id | name  |
+----+-------+
|  1 | One   |
|  2 | One   |
|  3 | Two   |
|  4 | Two   |
|  5 | Two   |
|  6 | Three |
|  7 | Three |
|  8 | Three |
|  9 | Three |
| 10 | Four  |
| 11 | Five  |
+----+-------+
11 rows in set (0.00 sec)</pre></div></div>

<p>and you want to display which one has the duplicate content in the <strong>name</strong> filed become like this:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">+-------+---------+
| name  | howmany |
+-------+---------+
| Three |       4 |
| Two   |       3 |
| One   |       2 |
+-------+---------+
3 rows in set (0.00 sec)</pre></div></div>

<p>In the other words, we will display the value in <strong>name</strong> field which have more than one records, whereas, the records which do not the duplicate content, will be avoided (in this case the record which have the value in field <strong>name</strong>-nya: <strong>Four</strong> and <strong>Five</strong>).</p>
<p>Well, here is the SQL script to do make it came true:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">SELECT name, COUNT(name) AS howmany 
FROM `my_table`
GROUP BY name 
HAVING howmany &gt; 1
ORDER BY howmany DESC;</pre></div></div>

<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.openscriptsolution.com%2F2009%2F11%2F28%2Fhow-to-know-the-duplicate-records-based-on-the-same-value-in-a-field-in-mysql-database%2F&amp;title=How%20to%20Know%20The%20Duplicate%20Records%20Based%20on%20The%20Same%20Value%20in%20a%20Field%20in%20MySQL%20Database" id="wpa2a_4"><img src="http://www.openscriptsolution.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.openscriptsolution.com/2009/11/28/how-to-know-the-duplicate-records-based-on-the-same-value-in-a-field-in-mysql-database/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Make The New Field Searchable in the Ticket List Page of osTicket v1.6 RC5</title>
		<link>http://www.openscriptsolution.com/2009/11/25/how-to-make-the-new-field-searchable-in-the-ticket-list-page-of-osticket-v1-6-rc5/</link>
		<comments>http://www.openscriptsolution.com/2009/11/25/how-to-make-the-new-field-searchable-in-the-ticket-list-page-of-osticket-v1-6-rc5/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 12:09:15 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[osTicket]]></category>
		<category><![CDATA[field]]></category>
		<category><![CDATA[new]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[searchable]]></category>
		<category><![CDATA[staff-side]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=913</guid>
		<description><![CDATA[This following modification will make the new field that you have added to the osTicket System become searchable in the ticket list page at the staff-side. Assuming the new field name is applications. You can read my modification regarding how to add new or extra fields by reading this article: How to Add Extra Fields [...]]]></description>
			<content:encoded><![CDATA[<p>This following modification will make the new field that you have added to the osTicket System become searchable in the ticket list page at the staff-side. Assuming the new field name is <strong>applications</strong>. You can read my modification regarding how to add new or extra fields by reading this article: <a href="http://www.openscriptsolution.com/2009/11/15/how-to-add-extra-fields-on-the-open-ticket-form-of-client-side-in-osticket-v1-6-rc5/" target="_blank">How to Add Extra Fields on the Open Ticket Form of Client Side in osTicket v1.6 RC5</a>. <span id="more-913"></span></p>
<p>Open your <strong>\include\staff\tickets.inc.php</strong> file, and find this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>145
146
147
148
149
150
151
152
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">            <span style="color: #000088;">$qwhere</span><span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot; AND ( ticket.email LIKE '%<span style="color: #006699; font-weight: bold;">$queryterm</span>%'&quot;</span><span style="color: #339933;">.</span>
                        <span style="color: #0000ff;">&quot; OR ticket.name LIKE '%<span style="color: #006699; font-weight: bold;">$queryterm</span>%'&quot;</span><span style="color: #339933;">.</span>
                        <span style="color: #0000ff;">&quot; OR ticket.subject LIKE '%<span style="color: #006699; font-weight: bold;">$queryterm</span>%'&quot;</span><span style="color: #339933;">.</span>
                        <span style="color: #0000ff;">&quot; OR message.message LIKE '%<span style="color: #006699; font-weight: bold;">$queryterm</span>%'&quot;</span><span style="color: #339933;">.</span>
                        <span style="color: #0000ff;">&quot; OR response.response LIKE '%<span style="color: #006699; font-weight: bold;">$queryterm</span>%'&quot;</span><span style="color: #339933;">.</span>
                        <span style="color: #0000ff;">&quot; OR note.note LIKE '%<span style="color: #006699; font-weight: bold;">$queryterm</span>%'&quot;</span><span style="color: #339933;">.</span>
                        <span style="color: #0000ff;">&quot; OR note.title LIKE '%<span style="color: #006699; font-weight: bold;">$queryterm</span>%'&quot;</span><span style="color: #339933;">.</span>
                        <span style="color: #0000ff;">' ) '</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>then replace with this following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>145
146
147
148
149
150
151
152
153
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">            <span style="color: #000088;">$qwhere</span><span style="color: #339933;">.=</span><span style="color: #0000ff;">&quot; AND ( ticket.email LIKE '%<span style="color: #006699; font-weight: bold;">$queryterm</span>%'&quot;</span><span style="color: #339933;">.</span>
                        <span style="color: #0000ff;">&quot; OR ticket.name LIKE '%<span style="color: #006699; font-weight: bold;">$queryterm</span>%'&quot;</span><span style="color: #339933;">.</span>
                        <span style="color: #0000ff;">&quot; OR ticket.subject LIKE '%<span style="color: #006699; font-weight: bold;">$queryterm</span>%'&quot;</span><span style="color: #339933;">.</span>
                        <span style="color: #0000ff;">&quot; OR message.message LIKE '%<span style="color: #006699; font-weight: bold;">$queryterm</span>%'&quot;</span><span style="color: #339933;">.</span>
                        <span style="color: #0000ff;">&quot; OR response.response LIKE '%<span style="color: #006699; font-weight: bold;">$queryterm</span>%'&quot;</span><span style="color: #339933;">.</span>
                        <span style="color: #0000ff;">&quot; OR note.note LIKE '%<span style="color: #006699; font-weight: bold;">$queryterm</span>%'&quot;</span><span style="color: #339933;">.</span>
                        <span style="color: #0000ff;">&quot; OR note.title LIKE '%<span style="color: #006699; font-weight: bold;">$queryterm</span>%'&quot;</span><span style="color: #339933;">.</span>
                        <span style="color: #0000ff;">&quot; OR ticket.applications LIKE '%<span style="color: #006699; font-weight: bold;">$queryterm</span>%'&quot;</span><span style="color: #339933;">.</span> <span style="color: #666666; font-style: italic;">// &lt;-- this is the change</span>
                        <span style="color: #0000ff;">' ) '</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>If you add more than one field, then you have to add the other field the same way you do above. Hope it is helpful.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.openscriptsolution.com%2F2009%2F11%2F25%2Fhow-to-make-the-new-field-searchable-in-the-ticket-list-page-of-osticket-v1-6-rc5%2F&amp;title=How%20to%20Make%20The%20New%20Field%20Searchable%20in%20the%20Ticket%20List%20Page%20of%20osTicket%20v1.6%20RC5" id="wpa2a_6"><img src="http://www.openscriptsolution.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.openscriptsolution.com/2009/11/25/how-to-make-the-new-field-searchable-in-the-ticket-list-page-of-osticket-v1-6-rc5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Important Things to Edit New Fields in osTicket v1.6 RC5</title>
		<link>http://www.openscriptsolution.com/2009/11/21/important-things-to-edit-new-fields-in-osticket-v1-6-rc5/</link>
		<comments>http://www.openscriptsolution.com/2009/11/21/important-things-to-edit-new-fields-in-osticket-v1-6-rc5/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 16:45:39 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[osTicket]]></category>
		<category><![CDATA[edit]]></category>
		<category><![CDATA[field]]></category>
		<category><![CDATA[new]]></category>
		<category><![CDATA[ticket]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=897</guid>
		<description><![CDATA[For those of you who have successfully added the new or extra fields in the open new ticket form, please do not forget to customize also the ticket edit feature on the staff-side. From several questions in osTicket Discussion Forum, I read that many people forgot about this. These files are needed to customize if [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you who have successfully added the new or extra fields in the open new ticket form, please do not forget to customize also the ticket edit feature on the staff-side. From several questions in osTicket Discussion Forum, I read that many people forgot about this. <span id="more-897"></span></p>
<p>These files are needed to customize if you added new/extra fields in your osTicket:</p>
<ol>
<li>\include\staff\editticket.inc.php</li>
<li>\include\class.ticket.php</li>
</ol>
<p>Basically, the modification you need to apply in the first file above is similar as you did in the \include\client\open.inc.php file for client-side, and in the \include\staff\newticket.inc.php file for staff-side. You also need to customize the <strong>update()</strong> function as you did also in the <strong>create()</strong> function that located in the second file above.</p>
<p>We will discuss about it later in the separate article.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.openscriptsolution.com%2F2009%2F11%2F21%2Fimportant-things-to-edit-new-fields-in-osticket-v1-6-rc5%2F&amp;title=Important%20Things%20to%20Edit%20New%20Fields%20in%20osTicket%20v1.6%20RC5" id="wpa2a_8"><img src="http://www.openscriptsolution.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.openscriptsolution.com/2009/11/21/important-things-to-edit-new-fields-in-osticket-v1-6-rc5/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to Add Extra Fields on the Open Ticket Form of Client Side in osTicket v1.6 RC5</title>
		<link>http://www.openscriptsolution.com/2009/11/15/how-to-add-extra-fields-on-the-open-ticket-form-of-client-side-in-osticket-v1-6-rc5/</link>
		<comments>http://www.openscriptsolution.com/2009/11/15/how-to-add-extra-fields-on-the-open-ticket-form-of-client-side-in-osticket-v1-6-rc5/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 12:32:19 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[osTicket]]></category>
		<category><![CDATA[client-side]]></category>
		<category><![CDATA[extra]]></category>
		<category><![CDATA[field]]></category>
		<category><![CDATA[new]]></category>
		<category><![CDATA[open]]></category>
		<category><![CDATA[ticket]]></category>
		<category><![CDATA[viewticket]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=856</guid>
		<description><![CDATA[There are lots of question that asking about how to add extra or new fields into the open ticket form and display them onto the viewticket page in osTicket System. One of the questions that you can see is by clicking on this link. This following modification was being made by myself to answer such [...]]]></description>
			<content:encoded><![CDATA[<p>There are lots of question that asking about how to add extra or new fields into the open ticket form and display them onto the viewticket page in osTicket System. One of the questions that you can see is <a href="http://www.osticket.com/forums/showthread.php?t=3055" target="_blank">by clicking on this link</a>. This following modification was being made by myself to answer such question. In this example, we will add set of checkboxes that contains of 5 checkboxes, plus one textbox, and groupped them into two additional fields (<strong>applications</strong> and <strong>productkey</strong>), onto the form on the client-side. We will make it also for the staff-side in the separate article, later. <span id="more-856"></span></p>
<ol>
<li>
First of all, alter your <strong>ost_ticket</strong> table, by adding two new fields: <strong>applications</strong> and <strong>productkey</strong>. You may use this following SQL script (please note that <strong>ost_</strong> is the table prefix name, in case it differents with yours, adjust it by yourself):</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">ALTER TABLE ost_ticket
ADD COLUMN `applications` varchar(100) default '' NOT NULL,
ADD COLUMN `productkey` varchar(50) default'' NOT NULL;</pre></div></div>

</li>
<li>
Open your <strong>\include\client\open.inc.php</strong> file, and find this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>95
96
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">&lt;?</span> <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>after the last line of that code, please insert this following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">    &lt;tr&gt;
      &lt;td&gt;Applications: &lt;/td&gt;
      &lt;td&gt;
        &lt;input name=applications[] type=checkbox value=&quot;Application 1&quot; &gt;Application 1
        &lt;input name=applications[] type=checkbox value=&quot;Application 2&quot; &gt;Application 2
        &lt;input name=applications[] type=checkbox value=&quot;Application 3&quot; &gt;Application 3
        &lt;input name=applications[] type=checkbox value=&quot;Application 4&quot; &gt;Application 4
        &lt;input name=applications[] type=checkbox value=&quot;Application 5&quot; &gt;Application 5
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Product Key: &lt;/td&gt;
      &lt;td&gt;
        &lt;input type=&quot;text&quot; name=&quot;productkey&quot; size=&quot;35&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$info</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'productkey'</span><span style="color: #009900;">&#93;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
      &lt;/td&gt;    
    &lt;/tr&gt;</pre></td></tr></table></div>

</li>
<li>
Open your <strong>\include\class.ticket.php</strong> file, and find this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>44
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$overdue</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>after that line, please insert this following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>45
46
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$applications</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$productkey</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Find again this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>88
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">            <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">overdue</span> <span style="color: #339933;">=</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'isoverdue'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>then replace with this following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>88
89
90
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">            <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">overdue</span> <span style="color: #339933;">=</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'isoverdue'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">applications</span> <span style="color: #339933;">=</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'applications'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">productkey</span> <span style="color: #339933;">=</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'productkey'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Find again this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>140
141
142
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">function</span> getSubject<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">subject</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>after the last line of that code, please insert this following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>143
144
145
146
147
148
149
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">function</span> getApplications<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">applications</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">function</span> getProductKey<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">productkey</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Find again this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1107
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">        <span style="color: #000088;">$fields</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'message'</span><span style="color: #009900;">&#93;</span>  <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'text'</span><span style="color: #339933;">,</span>     <span style="color: #0000ff;">'required'</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'error'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'Message required'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>after that line, please insert this following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1108
1109
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">        <span style="color: #000088;">$fields</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'applications'</span><span style="color: #009900;">&#93;</span>  <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'text'</span><span style="color: #339933;">,</span>     <span style="color: #0000ff;">'required'</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'error'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'Applications required'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$fields</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'productkey'</span><span style="color: #009900;">&#93;</span>  <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'text'</span><span style="color: #339933;">,</span>     <span style="color: #0000ff;">'required'</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'error'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'Product key required'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Find again this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1197
1198
1199
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">                Sys<span style="color: #339933;">::</span><span style="color: #004000;">alertAdmin</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Overlimit Notice'</span><span style="color: #339933;">,</span><span style="color: #000088;">$msg</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>after the last line of that code, please insert this following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1201
1202
1203
1204
1205
1206
1207
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">        <span style="color: #000088;">$mycounter</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$var</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'applications'</span><span style="color: #009900;">&#93;</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$app</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
	  <span style="color: #000088;">$strapp</span> <span style="color: #339933;">.=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$mycounter</span><span style="color: #339933;">==</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>?<span style="color: #000088;">$app</span><span style="color: #339933;">:</span><span style="color: #0000ff;">&quot;, &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$app</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
	  <span style="color: #000088;">$mycounter</span><span style="color: #339933;">++;</span>          	
        <span style="color: #009900;">&#125;</span>
        <span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$app</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Find again this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1260
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">                <span style="color: #0000ff;">',ip_address='</span><span style="color: #339933;">.</span>db_input<span style="color: #009900;">&#40;</span><span style="color: #000088;">$ipaddress</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span></pre></td></tr></table></div>

<p>then replace with this following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1260
1261
1262
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">                <span style="color: #0000ff;">',ip_address='</span><span style="color: #339933;">.</span>db_input<span style="color: #009900;">&#40;</span><span style="color: #000088;">$ipaddress</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>
		<span style="color: #0000ff;">',applications='</span><span style="color: #339933;">.</span>db_input<span style="color: #009900;">&#40;</span><span style="color: #000088;">$strapp</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span>
		<span style="color: #0000ff;">',productkey='</span><span style="color: #339933;">.</span>db_input<span style="color: #009900;">&#40;</span><span style="color: #000088;">$var</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'productkey'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span></pre></td></tr></table></div>

</li>
<li>
Open your <strong>\include\client\viewticket.inc.php</strong> file, and find this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>27
28
29
30
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">	&lt;tr&gt;
                &lt;th&gt;Create Date:&lt;/th&gt;
                &lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span>Format<span style="color: #339933;">::</span><span style="color: #004000;">db_datetime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCreateDate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;
            &lt;/tr&gt;</pre></td></tr></table></div>

<p>after the last line of that code, please insert this following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>31
32
33
34
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">      &lt;tr&gt;
                &lt;th&gt;Applications:&lt;/th&gt;
                &lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getApplications</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;
      &lt;/tr&gt;</pre></td></tr></table></div>

<p>Find again this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>43
44
45
46
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">            &lt;tr&gt;
                &lt;th&gt;Phone:&lt;/th&gt;
                &lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span>Format<span style="color: #339933;">::</span><span style="color: #004000;">phone</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getPhoneNumber</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;
            &lt;/tr&gt;</pre></td></tr></table></div>

<p>after that line, please insert this following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>47
48
49
50
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">            &lt;tr&gt;
                &lt;th&gt;Product Key:&lt;/th&gt;
                &lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getProductKey</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;
            &lt;/tr&gt;</pre></td></tr></table></div>

</li>
</ol>
<p>That&#8217;s all. Hopefully this will be helpful.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.openscriptsolution.com%2F2009%2F11%2F15%2Fhow-to-add-extra-fields-on-the-open-ticket-form-of-client-side-in-osticket-v1-6-rc5%2F&amp;title=How%20to%20Add%20Extra%20Fields%20on%20the%20Open%20Ticket%20Form%20of%20Client%20Side%20in%20osTicket%20v1.6%20RC5" id="wpa2a_10"><img src="http://www.openscriptsolution.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.openscriptsolution.com/2009/11/15/how-to-add-extra-fields-on-the-open-ticket-form-of-client-side-in-osticket-v1-6-rc5/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How to Add New Tab Next to Post Reply Tab in Staff Panel of osTicket v1.6 RC5</title>
		<link>http://www.openscriptsolution.com/2009/11/07/how-to-add-new-tab-next-to-post-reply-tab-in-staff-panel-of-osticket-v1-6-rc5/</link>
		<comments>http://www.openscriptsolution.com/2009/11/07/how-to-add-new-tab-next-to-post-reply-tab-in-staff-panel-of-osticket-v1-6-rc5/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 04:35:45 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[osTicket]]></category>
		<category><![CDATA[field]]></category>
		<category><![CDATA[new]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[staff panel]]></category>
		<category><![CDATA[staff-side]]></category>
		<category><![CDATA[tab]]></category>
		<category><![CDATA[viewticket]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=787</guid>
		<description><![CDATA[Have you ever wanted to add a new tab next to Post Reply tab in Staff Panel of your osTicket System? Well, here is the solution. There are two possibilities of this purpose. First, you want to display something which is read-only, such as static information. Or, the second, you want to add the form [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wanted to add a new tab next to <strong>Post Reply</strong> tab in Staff Panel of your osTicket System? Well, here is the solution. There are two possibilities of this purpose. First, you want to display something which is read-only, such as static information. Or, the second, you want to add the form inside that new tab. We will discuss for those both possibilities. This modification applied for staff-side only. <span id="more-787"></span></p>
<p>Open your <strong>\include\staff\viewticket.inc.php</strong>, and find this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>342
343
344
345
346
347
348
349
350
351
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">                        <span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>
                            <span style="color: #339933;">&lt;</span>div  style<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;margin-left: 50px; margin-top: 30px; margin-bottom: 10px;border: 0px;&quot;</span><span style="color: #339933;">&gt;</span>
                                <span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;button&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">'submit'</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">'Post Reply'</span> <span style="color: #339933;">/&gt;</span>
                                <span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;button&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">'reset'</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">'Reset'</span> <span style="color: #339933;">/&gt;</span>
                                <span style="color: #339933;">&lt;</span>input <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;button&quot;</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">'button'</span> value<span style="color: #339933;">=</span><span style="color: #0000ff;">'Cancel'</span> onClick<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;history.go(-1)&quot;</span> <span style="color: #339933;">/&gt;</span>
                            <span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span>
                        <span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;</span>
                    <span style="color: #339933;">&lt;/</span>form<span style="color: #339933;">&gt;</span>                
                <span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;</span>
            <span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>then after the last line of that code, please insert this following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>352
353
354
355
356
357
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">            <span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;youractionhere&quot;</span> <span style="color: #000000; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;tabbertab&quot;</span>  align<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;left&quot;</span><span style="color: #339933;">&gt;</span>
                <span style="color: #339933;">&lt;</span>h2<span style="color: #339933;">&gt;</span>Your <span style="color: #000000; font-weight: bold;">New</span> Tab<span style="color: #339933;">&lt;/</span>h2<span style="color: #339933;">&gt;</span>
                <span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>
                This will only demonstrate how you can add your own <span style="color: #000000; font-weight: bold;">new</span> tab in viewticket page<span style="color: #339933;">.</span>
                <span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;</span>
	    <span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>It depends on the purpose of that new tab. If you want only to display some information which is read-only, then you simply use the technique that shown on the code above. That&#8217;s it, and done until this point! You don&#8217;t have to do anything that we will explain on the next paragraph below.</p>
<p>However, if you want this new tab has a form inside, for example, you want to process or send the 2 new field, then we have to created a form and put it inside that new tab. Simply replace this following code that we take from above:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>354
355
356
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">                <span style="color: #339933;">&lt;</span>p<span style="color: #339933;">&gt;</span>
                This will only demonstrate how you can add your own <span style="color: #000000; font-weight: bold;">new</span> tab in viewticket page<span style="color: #339933;">.</span>
                <span style="color: #339933;">&lt;/</span>p<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>become:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">                &lt;p&gt;
                    &lt;form action=&quot;tickets.php?id=<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$id</span><span style="color: #000000; font-weight: bold;">?&gt;</span>#youractionhere&quot; name=&quot;youractionhere&quot; class=&quot;inline&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt;
                        &lt;input type=&quot;hidden&quot; name=&quot;ticket_id&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$id</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot;&gt;
                        &lt;input type=&quot;hidden&quot; name=&quot;a&quot; value=&quot;youractionhere&quot;&gt;
                        &lt;p&gt;
&nbsp;
                        &lt;div&gt;
                            &lt;label for=&quot;field-one&quot;&gt;Field One:&lt;/label&gt;
                            &lt;input type=&quot;text&quot; name=&quot;field-one&quot; id=&quot;field-one&quot; value=&quot;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$info</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'field-one'</span><span style="color: #009900;">&#93;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; size=30px /&gt;
                            &lt;/select&gt;&lt;font class=&quot;error&quot;&gt;*&amp;nbsp;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$errors</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'field-one'</span><span style="color: #009900;">&#93;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/font&gt;
                        &lt;/div&gt;
                        &lt;div style=&quot;margin-top: 3px;&quot;&gt;
                            &lt;label for=&quot;field-two&quot; valign=&quot;top&quot;&gt;Field Two:&lt;/label&gt;
                                &lt;font class=&quot;error&quot;&gt;*&amp;nbsp;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$errors</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'field-two'</span><span style="color: #009900;">&#93;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/font&gt;&lt;/label&gt;&lt;br/&gt;
                            &lt;textarea name=&quot;field-two&quot; id=&quot;field-two&quot; cols=&quot;80&quot; rows=&quot;7&quot; wrap=&quot;soft&quot; style=&quot;width:90%&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$info</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'field-two'</span><span style="color: #009900;">&#93;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/textarea&gt;
                        &lt;/div&gt;
&nbsp;
                            &lt;div  align=&quot;left&quot; style=&quot;margin-left: 50px;margin-top: 10px; margin-bottom: 10px;border: 0px;&quot;&gt;
                                &lt;input class=&quot;button&quot; type='submit' value='Submit' /&gt;
                                &lt;input class=&quot;button&quot; type='reset' value='Reset' /&gt;
                                &lt;input class=&quot;button&quot; type='button' value='Cancel' onClick=&quot;history.go(-1)&quot; /&gt;
                            &lt;/div&gt;
                        &lt;/p&gt;
                    &lt;/form&gt;
                &lt;/p&gt;</pre></td></tr></table></div>

<p>After that, we have to catch that values from the form in the <strong>\scp\tickets.php</strong> file. Find this code in that file:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>106
107
108
109
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">            <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
                <span style="color: #000088;">$errors</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'err'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=</span><span style="color: #000088;">$errors</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'err'</span><span style="color: #009900;">&#93;</span>?<span style="color: #000088;">$errors</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'err'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">:</span><span style="color: #0000ff;">'Unable to post the response.'</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>then after the last line of that code above, please insert this following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>110
111
112
113
114
115
116
117
118
119
120
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">        <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">'youractionhere'</span><span style="color: #339933;">:</span>
            <span style="color: #000088;">$fields</span><span style="color: #339933;">=</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$fields</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'field-one'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'text'</span><span style="color: #339933;">,</span>  <span style="color: #0000ff;">'required'</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'error'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'Field one required'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$fields</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'field-two'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'type'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'text'</span><span style="color: #339933;">,</span>  <span style="color: #0000ff;">'required'</span><span style="color: #339933;">=&gt;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'error'</span><span style="color: #339933;">=&gt;</span><span style="color: #0000ff;">'Field two required'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$params</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Validator<span style="color: #009900;">&#40;</span><span style="color: #000088;">$fields</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$params</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">validate</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                <span style="color: #000088;">$errors</span><span style="color: #339933;">=</span><span style="color: #990000;">array_merge</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$errors</span><span style="color: #339933;">,</span><span style="color: #000088;">$params</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">errors</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #666666; font-style: italic;">// Proceed here, what do you want it to do for those two fields above?</span>
            <span style="color: #666666; font-style: italic;">// Insert it or update the existing value to database? It's up to you, right?</span>
	<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Generally, only those steps above that you have to do. If you want to add another functionality or your own algorithm, you can follow the techniques that already exist on another modifications I created on this blog. Have a nice try, and good luck!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.openscriptsolution.com%2F2009%2F11%2F07%2Fhow-to-add-new-tab-next-to-post-reply-tab-in-staff-panel-of-osticket-v1-6-rc5%2F&amp;title=How%20to%20Add%20New%20Tab%20Next%20to%20Post%20Reply%20Tab%20in%20Staff%20Panel%20of%20osTicket%20v1.6%20RC5" id="wpa2a_12"><img src="http://www.openscriptsolution.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.openscriptsolution.com/2009/11/07/how-to-add-new-tab-next-to-post-reply-tab-in-staff-panel-of-osticket-v1-6-rc5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
