<?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; bold</title>
	<atom:link href="http://www.openscriptsolution.com/tag/bold/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 Make Response Message Text Bolder Than The Rest of The Message in the Response Email of osTicket v1.6 RC5</title>
		<link>http://www.openscriptsolution.com/2009/12/07/how-to-make-response-message-text-bolder-than-the-rest-of-the-message-in-the-response-email-of-osticket-v1-6-rc5/</link>
		<comments>http://www.openscriptsolution.com/2009/12/07/how-to-make-response-message-text-bolder-than-the-rest-of-the-message-in-the-response-email-of-osticket-v1-6-rc5/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 15:29:44 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[osTicket]]></category>
		<category><![CDATA[bold]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[html email]]></category>
		<category><![CDATA[message]]></category>
		<category><![CDATA[response]]></category>
		<category><![CDATA[staff-side]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[ticket]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=969</guid>
		<description><![CDATA[Have you ever wanted to make the response message text become bolder in the response email in your osTicket System so that your client will be easier to differs and read it from the other message in that email? Since the default of email template in osTicket using the plain text, then we have to [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wanted to make the response message text become bolder in the response email in your osTicket System so that your client will be easier to differs and read it from the other message in that email? Since the default of email template in osTicket using the plain text, then we have to change the type of the message that located in the <strong>class.email.php</strong> file, from the text mode to the html mode. This modification also will answer the same question in <a href="http://www.osticket.com/forums/showthread.php?t=3151" target="_blank">osTicket Discussion Forum</a> as well. Okay, here is the solution I successfully made. <span id="more-969"></span></p>
<ol>
<li>
Open your <strong>\include\class.msgtpl.php</strong> file, and find this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>144
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">                 <span style="color: #0000ff;">',ticket_reply_body='</span><span style="color: #339933;">.</span>db_input<span style="color: #009900;">&#40;</span>Format<span style="color: #339933;">::</span><span style="color: #004000;">striptags</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$var</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'ticket_reply_body'</span><span style="color: #009900;">&#93;</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>144
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">                 <span style="color: #0000ff;">',ticket_reply_body='</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;">'ticket_reply_body'</span><span style="color: #009900;">&#93;</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>209
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">                 <span style="color: #0000ff;">',ticket_reply_subj='</span><span style="color: #339933;">.</span>db_input<span style="color: #009900;">&#40;</span>Format<span style="color: #339933;">::</span><span style="color: #004000;">striptags</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$info</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'ticket_reply_subj'</span><span style="color: #009900;">&#93;</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>209
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">                 <span style="color: #0000ff;">',ticket_reply_subj='</span><span style="color: #339933;">.</span>db_input<span style="color: #009900;">&#40;</span><span style="color: #000088;">$info</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'ticket_reply_subj'</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\class.email.php</strong> file, and find this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>160
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">        <span style="color: #000088;">$body</span> <span style="color: #339933;">=</span> <span style="color: #990000;">stripslashes</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/(<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>|<span style="color: #000099; font-weight: bold;">\r</span>)/s&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$message</span><span style="color: #009900;">&#41;</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>160
161
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">        <span style="color: #666666; font-style: italic;">//$body = stripslashes(preg_replace(&quot;/(\r\n|\r)/s&quot;, &quot;\n&quot;, trim($message)));  // Text mode</span>
        <span style="color: #000088;">$body</span> <span style="color: #339933;">=</span> <span style="color: #990000;">stripslashes</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/(<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>|<span style="color: #000099; font-weight: bold;">\r</span>)/s&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&lt;br /&gt;&quot;</span><span style="color: #339933;">,</span> <span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$message</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// HTML mode</span></pre></td></tr></table></div>

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

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>203
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">        <span style="color: #000088;">$mime</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setTXTBody</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$body</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>203
204
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">        <span style="color: #666666; font-style: italic;">//$mime-&gt;setTXTBody($body);  // switch to HTML mode below</span>
        <span style="color: #000088;">$mime</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setHTMLBody</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$body</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

</li>
<li>
Go to your <strong>Admin Panel</strong> -> <strong>Emails</strong> -> <strong>Templates</strong> -> then click on your template record (default: <strong>osTicket Default Template</strong>), then at the <strong>Message Body</strong> directive under the <strong>Ticket Response/Reply</strong> section, change this code:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">%response</pre></div></div>

<p>become:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;b&gt;%response&lt;/b&gt;</pre></div></div>

<p>Please note that since we have switched from the text mode to the html mode, then we have to change also this URL code at the same template place above in order to have the ability to be clicked, from this code:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">%url/view.php?e=%email&amp;t=%ticket</pre></div></div>

<p>become this following code:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;a href=&quot;%url/view.php?e=%email&amp;t=%ticket&quot;&gt;%url/view.php?e=%email&amp;t=%ticket&lt;/a&gt;</pre></div></div>

<p>afterwards, click on the <strong>Save Changes</strong> button to save the changes.
</li>
</ol>
<p>Now, each time your staff reply to a ticket, then the response message in the email that your client received will become bolder than the rest of the messages. </p>
<p>Please note that by using that technique above, you can also implement this html mode for other section in your email template in Admin Panel. </p>
<p>Have a nice try!</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%2F12%2F07%2Fhow-to-make-response-message-text-bolder-than-the-rest-of-the-message-in-the-response-email-of-osticket-v1-6-rc5%2F&amp;title=How%20to%20Make%20Response%20Message%20Text%20Bolder%20Than%20The%20Rest%20of%20The%20Message%20in%20the%20Response%20Email%20of%20osTicket%20v1.6%20RC5" 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/2009/12/07/how-to-make-response-message-text-bolder-than-the-rest-of-the-message-in-the-response-email-of-osticket-v1-6-rc5/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
