<?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; post</title>
	<atom:link href="http://www.openscriptsolution.com/tag/post/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.openscriptsolution.com</link>
	<description>... where solutions for script programming are found ...</description>
	<lastBuildDate>Thu, 29 Jul 2010 07:48:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Make Link Tag in WordPress Post/Page Editor Become Open In New Tab/Window by Default</title>
		<link>http://www.openscriptsolution.com/2010/07/10/how-to-make-link-tag-in-wordpress-postpage-editor-become-open-in-new-tabwindow-by-default/</link>
		<comments>http://www.openscriptsolution.com/2010/07/10/how-to-make-link-tag-in-wordpress-postpage-editor-become-open-in-new-tabwindow-by-default/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 16:22:49 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Buka di jendela baru]]></category>
		<category><![CDATA[buka di tab baru]]></category>
		<category><![CDATA[Editor]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Open in New Tab]]></category>
		<category><![CDATA[Open in New Window]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[target="_blank"]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=1222</guid>
		<description><![CDATA[This following modification will change the javascript files that belong to WordPress core, in order to make the Link tag in WordPress post/page editor become open in new tab/window by default. As we know, by default in WordPress, this tag will open in the same window since there is no target=&#8221;_blank&#8221; property in the a [...]]]></description>
			<content:encoded><![CDATA[<p>This following modification will change the javascript files that belong to WordPress core, in order to make the Link tag in WordPress post/page editor become open in new tab/window by default. As we know, by default in WordPress, this tag will open in the same window since there is no <strong>target=&#8221;_blank&#8221;</strong> property in the <strong>a href</strong>, especially if you insert this tag by typing your post/page from HTML tab (not from Visual tab) on your WordPress&#8217; post/page editor. As this will change the core file of your WordPress, then you have to change the related files if you upgrade your WordPress core installation. So, please be kind, everyone! <span id="more-1222"></span></p>
<ol>
<li>
Open your <strong>/wp-includes/js/quicktags.js</strong> file, and find this code:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">if(a){edButtons[c].tagStart='&lt;a href=&quot;'+a+'&quot;&gt;';</pre></div></div>

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

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">if(a){edButtons[c].tagStart='&lt;a href=&quot;'+a+'&quot; target=&quot;_blank&quot;&gt;';</pre></div></div>

</li>
<li>
Open your <strong>/wp-includes/js/quicktags.dev.js</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;">	this<span style="color: #339933;">.</span>newWin <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</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;">	this<span style="color: #339933;">.</span>newWin <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// Modified by Masino Sinaga, July 10, 2010, in order to add target=&quot;_blank&quot; phrase while creating new link</span></pre></td></tr></table></div>

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

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>216
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">		<span style="color: #000000; font-weight: bold;">var</span> newWin <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> tempStr<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>216
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">		<span style="color: #000000; font-weight: bold;">var</span> newWin <span style="color: #339933;">=</span> <span style="color: #0000ff;">'1'</span><span style="color: #339933;">,</span> tempStr<span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// Modified by Masino Sinaga, May 20, 2010, in order to add target=&quot;_blank&quot; phrase while creating new link</span></pre></td></tr></table></div>

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

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>451
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">			<span style="color: #000000; font-weight: bold;">var</span> newWin <span style="color: #339933;">=</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> tempStr<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>451
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">			<span style="color: #000000; font-weight: bold;">var</span> newWin <span style="color: #339933;">=</span> <span style="color: #0000ff;">'1'</span><span style="color: #339933;">,</span> tempStr<span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// Modified by Masino Sinaga, May 20, 2010, in order to add target=&quot;_blank&quot; phrase while creating new link</span></pre></td></tr></table></div>

</li>
<li>
Clear your browser&#8217;s cache that you are currently using, afterwards close and re-open your browser, then try to login to your editor&#8217;s post/page via &#8220;HTML&#8221; tab in your WordPress, then try the Link tag. You should see that WordPress has automatically added the <strong>target=&#8221;_blank&#8221;</strong> phrase inside the Link <strong>a href</strong> tag.
</li>
</ol>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.openscriptsolution.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.openscriptsolution.com/2010/07/10/how-to-make-link-tag-in-wordpress-postpage-editor-become-open-in-new-tabwindow-by-default/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Navigate Posts Only in The Current Category using Smarter Navigation Plugin and Atahualpa Theme of WordPress</title>
		<link>http://www.openscriptsolution.com/2010/01/16/how-to-navigate-posts-only-in-the-current-category-using-smarter-navigation-plugin-and-atahualpa-theme-of-wordpress/</link>
		<comments>http://www.openscriptsolution.com/2010/01/16/how-to-navigate-posts-only-in-the-current-category-using-smarter-navigation-plugin-and-atahualpa-theme-of-wordpress/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 09:14:58 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Atahualpa]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[next]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[previous]]></category>
		<category><![CDATA[smart]]></category>
		<category><![CDATA[Smarter Navigation]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=1095</guid>
		<description><![CDATA[If you want to change the existing navigation in Atahualpa Theme of your WordPress website that navigate all post based on the order of the general Post ID no matter which category you choose, become the smarter technique which will navigate based on the current category that selected by user, then this following modification is [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to change the existing navigation in Atahualpa Theme of your WordPress website that navigate all post based on the order of the general Post ID no matter which category you choose, become the smarter technique which will navigate based on the current category that selected by user, then this following modification is for you! As we know, Atahualpa theme has provided the previous/next link when we display the certain post in the top of the post page. Unfortunately, by default, when we choose the certain category, then we navigate through that navigation post link, it will avoid the selected category. Now, after you implement this following modification, you will be able to navigate only through the posts that located in the certain category that you have choosen. Isn&#8217;t smarter, huh? <span id="more-1095"></span></p>
<ol>
<li>
Download the <a href="http://wordpress.org/extend/plugins/smarter-navigation/">Smarter Navigation</a> plugin.
</li>
<li>
Upload this plugin to your <strong>/wp-content/plugins/</strong> and then extract it.
</li>
<li>
Activate this plugin from your wp-admin.
</li>
<li>
Open your <strong>/wp-content/themes/{youratahualpaname}/functions/bfa_next_previous_links.php</strong> file, and find this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>137
138
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">		previous_post_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$bfa_ata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'single_next_prev_older'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> 
		next_post_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$bfa_ata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'single_next_prev_newer'</span><span style="color: #009900;">&#93;</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>137
138
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">		previous_post_smart<span style="color: #009900;">&#40;</span><span style="color: #000088;">$bfa_ata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'single_next_prev_older'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// previous_post_link replaced by previous_post_smart in order to navigate only in the current category using Smarter Navigation plugin, modified by Masino Sinaga, Januari 16, 2010</span>
		next_post_smart<span style="color: #009900;">&#40;</span><span style="color: #000088;">$bfa_ata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'single_next_prev_newer'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// next_post_link replaced by next_post_smart in order to navigate only in the current category using Smarter Navigation plugin, modified by Masino Sinaga, Januari 16, 2010</span></pre></td></tr></table></div>

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

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>147
148
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">		next_post_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$bfa_ata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'single_next_prev_newer'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> 
		previous_post_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$bfa_ata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'single_next_prev_older'</span><span style="color: #009900;">&#93;</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>147
148
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">		next_post_smart<span style="color: #009900;">&#40;</span><span style="color: #000088;">$bfa_ata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'single_next_prev_newer'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #666666; font-style: italic;">// next_post_link replaced by next_post_smart in order to navigate only in the current category using Smarter Navigation plugin, modified by Masino Sinaga, Januari 16, 2010</span>
		previous_post_smart<span style="color: #009900;">&#40;</span><span style="color: #000088;">$bfa_ata</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'single_next_prev_older'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// previous_post_link replaced by previous_post_smart in order to navigate only in the current category using Smarter Navigation plugin, modified by Masino Sinaga, Januari 16, 2010</span></pre></td></tr></table></div>

</li>
</ol>
<p>The conclusion: All you need to do is simply replace the <strong>link</strong> with <strong>smart</strong> in the <strong>previous_post_link</strong> and <strong>next_post_link</strong> function call in <strong>bfa_next_previous_links.php</strong> file belongs to <strong>Atahualpa</strong> theme. Afterwards, you can navigate through the posts only that located in the certain category you chose.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.openscriptsolution.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.openscriptsolution.com/2010/01/16/how-to-navigate-posts-only-in-the-current-category-using-smarter-navigation-plugin-and-atahualpa-theme-of-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Add Google Search in Top of Post and Page in Atahualpa Theme of WordPress</title>
		<link>http://www.openscriptsolution.com/2009/12/19/how-to-add-google-search-in-top-of-post-and-page-in-atahualpa-theme-of-wordpress/</link>
		<comments>http://www.openscriptsolution.com/2009/12/19/how-to-add-google-search-in-top-of-post-and-page-in-atahualpa-theme-of-wordpress/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 14:54:56 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Atahualpa]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=1049</guid>
		<description><![CDATA[If you want to add the Google Search in each of post or page of Atahualpa theme of WordPress, then this modification is for you! By using this modification, your visitor will have the ability to search any information from your blog to Google, and the search result will be displayed in a new window [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to add the <strong>Google Search</strong> in each of post or page of Atahualpa theme of WordPress, then this modification is for you! By using this modification, your visitor will have the ability to search any information from your blog to Google, and the search result will be displayed in a new window of your browser. <span id="more-1049"></span></p>
<ol>
<li>
Open your <strong>wp-content/themes/atahualpa/header.php</strong> file, and find this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>99
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">		<span style="color: #339933;">&lt;</span>td id<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;middle&quot;</span><span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

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

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;div class=&quot;widget&quot;&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> 
<span style="color: #000088;">$my_domain</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;visualbasicindonesia.com&quot;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// &lt;-- put your domain here!</span>
<span style="color: #000088;">$text_color</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;000000&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$results_bg</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;FFFFFF&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$header_bg</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;FFFFFF&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$border</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;336699&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$logo_height</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;50&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$logo_width</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;313&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$my_logo</span> <span style="color: #339933;">=</span> site_url<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/wp-content/themes/atahualpa/images/google.gif&quot;</span><span style="color: #339933;">;</span> 
<span style="color: #000088;">$my_logo_link</span> <span style="color: #339933;">=</span> site_url<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;/wp-content/themes/atahualpa/images/yourlogo.jpg&quot;</span><span style="color: #339933;">;</span>                   
<span style="color: #000088;">$visited_link</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;663399&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$title_color</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;0000FF&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$url_color</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;008000&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$faint_color</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;0000FF&quot;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">/************************************************************************/</span>
<span style="color: #666666; font-style: italic;">/************************************************************************/</span>
<span style="color: #666666; font-style: italic;">/*                   DO NOT EDIT BELOW HERE                             */</span>
<span style="color: #666666; font-style: italic;">/************************************************************************/</span>
<span style="color: #666666; font-style: italic;">/************************************************************************/</span>
<span style="color: #666666; font-style: italic;">// show the content of the block</span>
<span style="color: #000088;">$content</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;!-- SiteSearch Google --&gt;
&lt;form method=GET action='http://www.google.com/custom' target=_blank&gt;
&lt;center&gt;&lt;a href='http://www.google.com/'&gt;&lt;img src='&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$my_logo</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'
border='0' alt='Google'&gt;&lt;/a&gt;
&lt;input type=hidden name=domains value='&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$my_domain</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'&gt;&lt;input type=text name=q size=15 maxlength=255 value=''&gt;&amp;nbsp;
&lt;input type=submit name=sa value='Search'&gt;&lt;/center&gt;
&lt;center&gt;&lt;font size=-1&gt;&lt;input type=radio name=sitesearch value='' checked&gt;Web
&lt;input type=radio name=sitesearch value='&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$my_domain</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'&gt;www.&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$my_domain</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/center&gt;&lt;/font&gt;
&lt;input type=hidden name=client value='pub-4127448471140412'&gt;
&lt;input type=hidden name=forid value='1'&gt;
&lt;input type=hidden name=ie value='ISO-8859-1'&gt;
&lt;input type=hidden name=oe value='ISO-8859-1'&gt;
&lt;input type=hidden name=cof value='GALT:#&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$url_color</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;GL:1;DIV:#&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$border</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;VLC:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$visited_link</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;AH:center;BGC:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$results_bg</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;LBGC:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$header_bg</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;ALC:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$title_color</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;LC:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$title_color</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;T:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$text_color</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;GFNT:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$faint_color</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;GIMP:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$faint_color</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;LH:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$logo_height</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;LW:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$logo_width</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;L:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$my_logo</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;S:&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$my_logo_link</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;FORID:1;'&gt;
&lt;input type=hidden name=hl value='en'&gt;
&lt;/form&gt;
&lt;!-- Sitesearch  Google --&gt;
&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$content</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;</pre></td></tr></table></div>

</li>
<li>
<div id="attachment_1051" class="wp-caption alignnone" style="width: 82px"><a href="http://www.openscriptsolution.com/wp-content/uploads/2009/12/google.gif"><img src="http://www.openscriptsolution.com/wp-content/uploads/2009/12/google.gif" alt="Google Logo" title="google" width="72" height="24" class="size-full wp-image-1051" />Download this file</a><p class="wp-caption-text">Google Logo</p></div>, then put this file in your <strong>/wp-content/themes/atahualpa/images/</strong> sub directory.
</li>
</ol>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.openscriptsolution.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.openscriptsolution.com/2009/12/19/how-to-add-google-search-in-top-of-post-and-page-in-atahualpa-theme-of-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</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 addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.openscriptsolution.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></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>
		<item>
		<title>Add Post Number, Sender Name, and Time Duration in Each Message of osTicket</title>
		<link>http://www.openscriptsolution.com/2009/09/09/add-post-number-sender-name-and-time-duration-in-each-message-of-osticket/</link>
		<comments>http://www.openscriptsolution.com/2009/09/09/add-post-number-sender-name-and-time-duration-in-each-message-of-osticket/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 02:42:26 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[osTicket]]></category>
		<category><![CDATA[duration]]></category>
		<category><![CDATA[message]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[sender]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=248</guid>
		<description><![CDATA[Both osTicket version 1.6 RC4 and 1.6 RC5 have not included the post number, the sender name of client, and duration time in each message. That is why I made this modification. It is important for you as staff or admin of your ticketing system, if you want to know quickly how much time needed [...]]]></description>
			<content:encoded><![CDATA[<p>Both osTicket version 1.6 RC4 and 1.6 RC5 have not included the post number, the sender name of client, and duration time in each message. That is why I made this modification. It is important for you as staff or admin of your ticketing system, if you want to know quickly how much time needed to respond between one post and the next post in one current ticket. Moreover, you will also know how much total time taken for the opened ticket when you view the certain ticket in full-mode. <span id="more-248"></span></p>
<p>Follow these instructions below.</p>
<ol>
<li>Create a new file, copy-paste the following code to this file, then put it to <strong>\include\</strong> sub directory of your osTicket System, and save it as <strong>class.duration.php</strong>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #666666; font-style: italic;">/**************************************************************************/</span>
<span style="color: #666666; font-style: italic;">/* [MOD] Add #Post, SenderName, Time Duration in Each Message,            */</span> 
<span style="color: #666666; font-style: italic;">/*       by Masino Sinaga, May 7, 2009                                    */</span> 
<span style="color: #666666; font-style: italic;">/* Website: - http://www.masinosinaga.com                                 */</span>
<span style="color: #666666; font-style: italic;">/*          - http://osticket.masinosinaga.com                            */</span>
<span style="color: #666666; font-style: italic;">/**************************************************************************/</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> Duration <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$begindate</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$enddate</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">function</span> Duration<span style="color: #009900;">&#40;</span><span style="color: #000088;">$parambegindate</span><span style="color: #339933;">,</span> <span style="color: #000088;">$paramenddate</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">begindate</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$parambegindate</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">enddate</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$paramenddate</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$diff</span> <span style="color: #339933;">=</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">enddate</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">begindate</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>                 
    <span style="color: #000088;">$diffday</span> <span style="color: #339933;">=</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">floor</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$diff</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">86400</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$modday</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$diff</span><span style="color: #339933;">%</span><span style="color:#800080;">86400</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$diffhour</span> <span style="color: #339933;">=</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">floor</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$modday</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">3600</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$diffminute</span> <span style="color: #339933;">=</span> <span style="color: #990000;">intval</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">floor</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$modday</span><span style="color: #339933;">%</span><span style="color:#800080;">3600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$diffsecond</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$modday</span><span style="color: #339933;">%</span><span style="color:#800080;">60</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$diffday</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; Day(s), &quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$diffhour</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; Hour(s), &quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$diffminute</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; Minute(s), &quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$diffsecond</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; Second(s).&quot;</span><span style="color: #339933;">;</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>

</li>
<li>Open <strong>\scp\tickets.php</strong> file, and find this code:

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>21
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span>INCLUDE_DIR<span style="color: #339933;">.</span><span style="color: #0000ff;">'class.banlist.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>after that code, add the following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>22
23
24
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// MOD Show Post#, SenderName, and Duration on Each Message by Masino Sinaga, July 20, 2009</span>
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span>INCLUDE_DIR<span style="color: #339933;">.</span><span style="color: #0000ff;">'class.duration.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// MOD Show Post#, SenderName, and Duration on Each Message by Masino Sinaga, July 20, 2009</span></pre></td></tr></table></div>

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

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>274
275
276
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">        <span style="color: #000088;">$msgres</span> <span style="color: #339933;">=</span>db_query<span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg_row</span> <span style="color: #339933;">=</span> db_fetch_array<span style="color: #009900;">&#40;</span><span style="color: #000088;">$msgres</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>replace with:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">      <span style="color: #000088;">$msgres</span> <span style="color: #339933;">=</span>db_query<span style="color: #009900;">&#40;</span><span style="color: #000088;">$sql</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg_row</span> <span style="color: #339933;">=</span> db_fetch_array<span style="color: #009900;">&#40;</span><span style="color: #000088;">$msgres</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>  
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">!=</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
          <span style="color: #000088;">$dateend</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'created'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">==</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
          <span style="color: #000088;">$datebegin</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'created'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
          <span style="color: #000088;">$firstdate</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$datebegin</span><span style="color: #339933;">;</span>
          <span style="color: #000088;">$dateend</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'created'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000088;">$lastdate</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dateend</span><span style="color: #339933;">;</span>                 
        <span style="color: #000088;">$datediff</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Duration<span style="color: #009900;">&#40;</span><span style="color: #000088;">$datebegin</span><span style="color: #339933;">,</span><span style="color: #000088;">$dateend</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$resultdiff</span><span style="color: #339933;">=</span><span style="color: #000088;">$datediff</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Duration</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$datebegin</span><span style="color: #339933;">,</span><span style="color: #000088;">$dateend</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000088;">$datebegin</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dateend</span><span style="color: #339933;">;</span>        
        <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>find this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>288
289
290
291
292
293
294
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">            &lt;table align=&quot;center&quot; class=&quot;message&quot; cellspacing=&quot;0&quot; cellpadding=&quot;1&quot; width=&quot;100%&quot; border=0&gt;
                &lt;tr&gt;&lt;th&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span>Format<span style="color: #339933;">::</span><span style="color: #004000;">db_daydatetime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'created'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/th&gt;&lt;/tr&gt;
                <span style="color: #000000; font-weight: bold;">&lt;?</span><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'attachments'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
                &lt;tr class=&quot;header&quot;&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;">getAttachmentStr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'msg_id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'M'</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;&lt;/tr&gt; 
                <span style="color: #000000; font-weight: bold;">&lt;?</span><span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
                &lt;tr&gt;&lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span>Format<span style="color: #339933;">::</span><span style="color: #004000;">display</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'message'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
            &lt;/table&gt;</pre></td></tr></table></div>

<p>replace with:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>288
289
290
291
292
293
294
295
296
297
298
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">        &lt;table align=&quot;center&quot; class=&quot;message&quot; cellspacing=&quot;0&quot; cellpadding=&quot;1&quot; width=&quot;100%&quot; border=0&gt;
          &lt;tr&gt;&lt;th&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;(#&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$i</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;) &quot;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> Format<span style="color: #339933;">::</span><span style="color: #004000;">db_daydatetime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'created'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot; - &quot;</span><span style="color: #339933;">.</span>Format<span style="color: #339933;">::</span><span style="color: #004000;">htmlchars</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getName</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: #000000; font-weight: bold;">?&gt;</span>&lt;/th&gt;
          &lt;/tr&gt;
          <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'attachments'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
          &lt;tr class=&quot;header&quot;&gt;&lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAttachmentStr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'msg_id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'M'</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;&lt;/tr&gt; 
          <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
          &lt;tr&gt;&lt;td&gt;
          <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> Format<span style="color: #339933;">::</span><span style="color: #004000;">display</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'message'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
          &lt;/td&gt;&lt;/tr&gt;
          &lt;tr class=&quot;header&quot;&gt;&lt;td align=&quot;right&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Duration: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$resultdiff</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>    <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;&lt;/tr&gt;
        &lt;/table&gt;</pre></td></tr></table></div>

<p>find this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">            $resp =db_query($sql);
            while ($resp_row = db_fetch_array($resp)) {
                $respID=$resp_row['response_id'];
                ?&gt;
                &lt;table align=&quot;center&quot; class=&quot;response&quot; cellspacing=&quot;0&quot; cellpadding=&quot;1&quot; width=&quot;100%&quot; border=0&gt;
                    &lt;tr&gt;&lt;th&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span>Format<span style="color: #339933;">::</span><span style="color: #004000;">db_daydatetime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$resp_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'created'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&amp;nbsp;-&amp;nbsp;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$resp_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'staff_name'</span><span style="color: #009900;">&#93;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/th&gt;&lt;/tr&gt;
                    <span style="color: #000000; font-weight: bold;">&lt;?</span><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$resp_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'attachments'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
                    &lt;tr class=&quot;header&quot;&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;">getAttachmentStr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$respID</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'R'</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;&lt;/tr&gt;
                    <span style="color: #000000; font-weight: bold;">&lt;?</span><span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
                    &lt;tr&gt;&lt;td&gt; <span style="color: #000000; font-weight: bold;">&lt;?=</span>Format<span style="color: #339933;">::</span><span style="color: #004000;">display</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$resp_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'response'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;&lt;/tr&gt;
                &lt;/table&gt;
            <span style="color: #000000; font-weight: bold;">&lt;?</span><span style="color: #009900;">&#125;</span>
            <span style="color: #000088;">$msgid</span> <span style="color: #339933;">=</span><span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'msg_id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;/div&gt;
&lt;/div&gt;</pre></td></tr></table></div>

<p>replace with:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">        $resp =db_query($sql);
        $j=1;
        while ($resp_row = db_fetch_array($resp)) {
          $i++;
          $respID=$resp_row['response_id'];
          $dateend = $resp_row['created']; 
          $lastdate = $dateend;          
          $datediff = new Duration($datebegin,$dateend);
          $resultdiff=$datediff-&gt;Duration($datebegin,$dateend);            
          ?&gt;
          &lt;table align=&quot;center&quot; class=&quot;response&quot; cellspacing=&quot;0&quot; cellpadding=&quot;1&quot; width=&quot;100%&quot; border=0&gt;
            &lt;tr&gt;&lt;th&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;(#&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$i</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;) &quot;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> Format<span style="color: #339933;">::</span><span style="color: #004000;">db_daydatetime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$resp_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'created'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&amp;nbsp;-&amp;nbsp;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$resp_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'staff_name'</span><span style="color: #009900;">&#93;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/th&gt;
            &lt;/tr&gt;
            <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$resp_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'attachments'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">&gt;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
            &lt;tr class=&quot;header&quot;&gt;
              &lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAttachmentStr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$respID</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'R'</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;&lt;/tr&gt;
            <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
            &lt;tr&gt;&lt;td&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> Format<span style="color: #339933;">::</span><span style="color: #004000;">display</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$resp_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'response'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;&lt;/tr&gt;
            &lt;tr class=&quot;header&quot;&gt;&lt;td align=&quot;right&quot;&gt;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Duration: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$resultdiff</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;br /&gt;&quot;</span><span style="color: #339933;">;</span>    <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/td&gt;&lt;/tr&gt;
          &lt;/table&gt;            
          <span style="color: #000000; font-weight: bold;">&lt;?php</span>     
          <span style="color: #000088;">$datebegin</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dateend</span><span style="color: #339933;">;</span>
          <span style="color: #000088;">$j</span><span style="color: #339933;">++;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #000088;">$msgid</span> <span style="color: #339933;">=</span><span style="color: #000088;">$msg_row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'msg_id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> 
        <span style="color: #000088;">$i</span><span style="color: #339933;">++;</span>
      <span style="color: #009900;">&#125;</span> 
      <span style="color: #000088;">$datediff</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Duration<span style="color: #009900;">&#40;</span><span style="color: #000088;">$firstdate</span><span style="color: #339933;">,</span><span style="color: #000088;">$lastdate</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #000088;">$resultdiff</span><span style="color: #339933;">=</span><span style="color: #000088;">$datediff</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Duration</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$firstdate</span><span style="color: #339933;">,</span><span style="color: #000088;">$lastdate</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    
      <span style="color: #000000; font-weight: bold;">?&gt;</span>
    &lt;/div&gt;
&lt;/div&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> 
  <span style="color: #000088;">$totalpost</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$i</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$ticket</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getStatus</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">==</span><span style="color: #0000ff;">'open'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;div align='right'&gt;&lt;br /&gt;&lt;b&gt;Total: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$totalpost</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; post(s), Duration: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$resultdiff</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/b&gt;&lt;/div&gt;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$lastdate</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Y-m-d H:i:s&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">//userdate();   //date(&quot;Y-m-d H:i:s&quot;);</span>
    <span style="color: #000088;">$datediff</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Duration<span style="color: #009900;">&#40;</span><span style="color: #000088;">$firstdate</span><span style="color: #339933;">,</span><span style="color: #000088;">$lastdate</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$resultdiff</span><span style="color: #339933;">=</span><span style="color: #000088;">$datediff</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Duration</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$firstdate</span><span style="color: #339933;">,</span><span style="color: #000088;">$lastdate</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>    
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;div align='right'&gt;&lt;br /&gt;&lt;b&gt;Ticket still opened, Total Duration: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$resultdiff</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/b&gt;&lt;/div&gt;&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;div align='right'&gt;&lt;br /&gt;&lt;b&gt;Total: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$totalpost</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; post(s), Duration: &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$resultdiff</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;/b&gt;&lt;/div&gt;&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>    
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

</li>
</ol>
<p>Now you can see that there is post number, sender name, and time duration in each message of the current ticket thread. You can also see in the bottom of the ticket thread, duration total for that current ticket. At least, you will get warning especially about the duration total of the opened ticket, thus you can take the respond as quick as you can for that ticket number.</p>
<p><img src="http://img136.imageshack.us/img136/3842/osticketviewticketimpro.jpg" alt="Post Number, Sender Name, and Time Duration in Each Post in osTicket" /></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.openscriptsolution.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.openscriptsolution.com/2009/09/09/add-post-number-sender-name-and-time-duration-in-each-message-of-osticket/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Add &#8220;Read More&#8221; Link in The Post</title>
		<link>http://www.openscriptsolution.com/2009/08/24/add-read-more-link-in-the-post/</link>
		<comments>http://www.openscriptsolution.com/2009/08/24/add-read-more-link-in-the-post/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 04:01:12 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[baca]]></category>
		<category><![CDATA[lanjutannya]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[more]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[read]]></category>
		<category><![CDATA[selengkapnya]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=66</guid>
		<description><![CDATA[If your post in WordPress contains of so many words or sentences or even paragraphs, and you want to display only the first paragraph or even the certain first amount of characters, plus you want to display &#8220;Read More&#8230;&#8221; link, what will you do? Honestly, I have no idea at all how to implement this, [...]]]></description>
			<content:encoded><![CDATA[<p>If your post in WordPress contains of so many words or sentences or even paragraphs, and you want to display only the first paragraph or even the certain first amount of characters, plus you want to display &#8220;<strong>Read More&#8230;</strong>&#8221; link, what will you do? Honestly, I have no idea at all how to implement this, until I found the information regarding this from <a href="http://codex.wordpress.org/Customizing_the_Read_More" target="_blank">http://codex.wordpress.org/Customizing_the_Read_More</a>. Thanks to WordPress has provided the easiest feature for this. <span id="more-66"></span></p>
<p>There are some methods that you can use to implement this. But, I think the easiest way is to add this tag:</p>
<pre>&lt;!--more--&gt;</pre>
<p>after the last word or character you want to display.</p>
<p>Let&#8217;s say you have these 3 paragraphs below, and you want to display the &#8220;<strong>Read More&#8230;</strong>&#8221; link after the first paragraph:</p>
<blockquote><p><em>Bahwa sesungguhnya kemerdekaan itu ialah hak segala bangsa. Oleh karena itu maka penjajahan di atas dunia harus dihapuskan karena tidak sesuai dengan perikemanusiaan dan perikeadilan.</p>
<p>Dan perjuangan pergerakan kemerdekaan Indonesia telah sampailah kepada saat yang berbahagia, dengan selamat sentausa, mengantarkan rakyat Indonesia ke depan pintu gerbang kemerdekaan Indonesia, yang merdeka, bersatu, berdaulat, adil dan makmur.</p>
<p>Atas berkat rakhmat Tuhan yang Mahakuasa, dan dengan didorong oleh keinginan luhur, maka rakyat Indonesia dengan ini menyatakan kemerdekaannya. Kemudian daripada itu, untuk membentuk pemerintahan negara Indonesia yang melindungi segenap bangsa Indonesia, dan seterusnya.</em></p></blockquote>
<p>then you just simply add the</p>
<pre>&lt;!--more--&gt;</pre>
<p>after the <strong>perikeadilan</strong> word while you edit the post in <strong>HTML</strong> mode, so it is something like this:</p>
<blockquote><p><em>Bahwa sesungguhnya kemerdekaan itu ialah hak segala bangsa. Oleh karena itu maka penjajahan di atas dunia harus dihapuskan karena tidak sesuai dengan perikemanusiaan dan perikeadilan.</em></p>
<pre>&lt;!--more--&gt;</pre>
<p><em>Dan perjuangan pergerakan kemerdekaan Indonesia telah sampailah kepada saat yang berbahagia, dengan selamat sentausa, mengantarkan rakyat Indonesia ke depan pintu gerbang kemerdekaan Indonesia, yang merdeka, bersatu, berdaulat, adil dan makmur.</p>
<p>Atas berkat rakhmat Tuhan yang Mahakuasa, dan dengan didorong oleh keinginan luhur, maka rakyat Indonesia dengan ini menyatakan kemerdekaannya. Kemudian daripada itu, untuk membentuk pemerintahan negara Indonesia yang melindungi segenap bangsa Indonesia, dan seterusnya.</em></p></blockquote>
<p>By using this technique, then only the first paragraph you specified above will be displayed in the front page of your website.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.openscriptsolution.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.openscriptsolution.com/2009/08/24/add-read-more-link-in-the-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
