<?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</title>
	<atom:link href="http://www.openscriptsolution.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.openscriptsolution.com</link>
	<description>... where solutions for script programming are found ...</description>
	<lastBuildDate>Sun, 29 Aug 2010 10:35:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to Make SEO SearchTerms Tagging 2 Plugin Supports Multi Language</title>
		<link>http://www.openscriptsolution.com/2010/08/29/how-to-make-seo-searchterms-tagging-2-plugin-supports-multi-language/</link>
		<comments>http://www.openscriptsolution.com/2010/08/29/how-to-make-seo-searchterms-tagging-2-plugin-supports-multi-language/#comments</comments>
		<pubDate>Sun, 29 Aug 2010 10:34:45 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=1277</guid>
		<description><![CDATA[I have been playing around and using SEO SearchTerms Tagging 2 plugin for about the last 2 months, and I think this plugin is one of the best plugins in WordPress, especially if you want to increase your website traffic based on the visitors that came from the search engines. Unfortunately, this plugin has not [...]]]></description>
			<content:encoded><![CDATA[<p>I have been playing around and using <a href="http://wordpress.org/extend/plugins/searchterms-tagging-2/" target="_blank" title="SEO SearchTerms Tagging 2">SEO SearchTerms Tagging 2</a> plugin for about the last 2 months, and I think this plugin is one of the best plugins in WordPress, especially if you want to increase your website traffic based on the visitors that came from the search engines. Unfortunately, this plugin has not supported for multi language, yet, whereas I have several websites that support for multi language, and I want to translate the widget title that being displayed on the front side of the websites. So I decided to modify this plugin in order to support for multi language, by changing all texts or strings that has not used gettext function, including in the admin panel section. I also created a translation into Indonesian in .po and .mo file. You can translate into another language based on the .po file. If your website in Indonesian language, then you can simply using this existing translation that I created. Just for your information, the modification I made was being applied into the 1.35 version (the last version when I wrote this article). Actually, I have contacted the <a href="http://exclusivewordpress.com/contact" title="Purwedi Kurniawan" target="_blank">author</a> of this plugin, but there is no response until now. I hope he has not updated or modified the 1.35 version, so he can continue the development into the next release based on this modification I created. Hopefully this will be helpful for all of you. <span id="more-1277"></span></p>
<p>And&#8230; ouw. Did I forget to mention about the URL of the download? Okay then. Get the multi language version <a href="http://www.ziddu.com/download/11428271/searchterms-tagging-2-1.3.5_multi-language.zip.html" target="_blank" title="SEO SearchTerms Tagging 2 Multi Language">by clicking this link</a>.</p>
<p>After you finished download that file, simply extract and replace the existing one with the multi languages version. Don&#8217;t worry, I have tested this version, and everything seems work fine. Of course, you can see the demo from some of my websites that support for multi languages:<br />
- <a href="http://www.wilayahindonesia.com" target="_blank" title="Indonesia Region">Wilayah Indonesia</a><br />
- <a href="http://www.masinosinaga.com" target="_blank" title="Masino Sinaga">Masino Sinaga</a></p>
<p>Anothe information, if you install this plugin for the very first time (fresh installatiion) using 1.35 (not by updating it from the older version), then the value of the <strong>Text and code for list header:</strong> in admin panel is:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;h4&gt;Incoming search terms:&lt;/h4&gt;</pre></div></div>

<p>whereas if you update this plugin from the older version into 1.35, then the value of that setting will be different with that value above. In order this text translated properly, then this setting must have the same value with that one above:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;h4&gt;Incoming search terms:&lt;/h4&gt;</pre></div></div>

<p>because I translated it based on the original string that using since version 1.35.</p>
<p>If you have any questions, feel free to leave your comment here. Hopefully it is useful.</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/08/29/how-to-make-seo-searchterms-tagging-2-plugin-supports-multi-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Calculate The Sum and Duration of Two Different Time Using PHP</title>
		<link>http://www.openscriptsolution.com/2010/08/23/how-to-calculate-the-sum-and-duration-of-two-different-time-using-php/</link>
		<comments>http://www.openscriptsolution.com/2010/08/23/how-to-calculate-the-sum-and-duration-of-two-different-time-using-php/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 09:28:20 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[duration]]></category>
		<category><![CDATA[jumlah waktu]]></category>
		<category><![CDATA[menghitung]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[selisih waktu]]></category>
		<category><![CDATA[sum]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=1272</guid>
		<description><![CDATA[There was a question that asked to me about how to sum and find out the duration of the two different time using PHP code regarding this my article. So, this following code will answer the question. You will be able to know how to calculate the sum and duration between two different time. Here [...]]]></description>
			<content:encoded><![CDATA[<p>There was a question that asked to me about how to sum and find out the duration of the two different time using PHP code regarding <a href="http://www.openscriptsolution.com/2009/10/14/sum-time-with-format-hh-mm-ss-by-using-php/" target="_blank" title="Sum Time with Format hh:mm:ss by Using PHP">this my article</a>. So, this following code will answer the question. You will be able to know how to calculate the sum and duration between two different time. <span id="more-1272"></span></p>
<p>Here is the answer!</p>

<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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
</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: #009933; font-style: italic;">/**
 * @author Masino Sinaga, http://www.openscriptsolution.com
 * @copyright August 23, 2009
 */</span>
&nbsp;
<span style="color: #000088;">$time1</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'12:12:20'</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$time2</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'13:14:29'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Begin of Time: '</span><span style="color: #339933;">.</span><span style="color: #000088;">$time1</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;br /&gt;End of Time: '</span><span style="color: #339933;">.</span><span style="color: #000088;">$time2</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;br /&gt;The Sum of Time: '</span><span style="color: #339933;">.</span> sum_the_time<span style="color: #009900;">&#40;</span><span style="color: #000088;">$time1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$time2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #666666; font-style: italic;">// this will give you a result: 19:12:25</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;br /&gt;Duration: '</span><span style="color: #339933;">.</span> duration_time<span style="color: #009900;">&#40;</span><span style="color: #000088;">$time1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$time2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// this will give you a result: 0 Day(s), 1 Hour(s), 2 Minute(s), 9 Second(s).</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> sum_the_time<span style="color: #009900;">&#40;</span><span style="color: #000088;">$time1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$time2</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000088;">$times</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$time1</span><span style="color: #339933;">,</span> <span style="color: #000088;">$time2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$seconds</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$times</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$time</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">list</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$hour</span><span style="color: #339933;">,</span><span style="color: #000088;">$minute</span><span style="color: #339933;">,</span><span style="color: #000088;">$second</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">':'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$time</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$seconds</span> <span style="color: #339933;">+=</span> <span style="color: #000088;">$hour</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">3600</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$seconds</span> <span style="color: #339933;">+=</span> <span style="color: #000088;">$minute</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$seconds</span> <span style="color: #339933;">+=</span> <span style="color: #000088;">$second</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000088;">$hours</span> <span style="color: #339933;">=</span> <span style="color: #990000;">floor</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$seconds</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">3600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$seconds</span> <span style="color: #339933;">-=</span> <span style="color: #000088;">$hours</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">3600</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$minutes</span>  <span style="color: #339933;">=</span> <span style="color: #990000;">floor</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$seconds</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$seconds</span> <span style="color: #339933;">-=</span> <span style="color: #000088;">$minutes</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">{$hours}</span>:<span style="color: #006699; font-weight: bold;">{$minutes}</span>:<span style="color: #006699; font-weight: bold;">{$seconds}</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> duration_time<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;">$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;">$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;">$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;">$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>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>If you run that code, then it will output to your browser as following:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Begin of Time: 12:12:20
End of Time: 13:14:29
The Sum of Time: 25:26:49
Duration: 0 Day(s), 1 Hour(s), 2 Minute(s), 9 Second(s).</pre></div></div>

<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/08/23/how-to-calculate-the-sum-and-duration-of-two-different-time-using-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Make Header Menu of osTicket Become Left-Align</title>
		<link>http://www.openscriptsolution.com/2010/08/16/how-to-make-header-menu-of-osticket-become-left-align/</link>
		<comments>http://www.openscriptsolution.com/2010/08/16/how-to-make-header-menu-of-osticket-become-left-align/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 10:07:36 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[osTicket]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[header]]></category>
		<category><![CDATA[left-align]]></category>
		<category><![CDATA[rata-kanan]]></category>
		<category><![CDATA[rata-kiri]]></category>
		<category><![CDATA[right-align]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=1267</guid>
		<description><![CDATA[This following modification will make the header links menu of your osTicket become left-align. As we know, the menu in the menu header of osTicket which has three links with the right-align style. They are: &#8220;&#8221;Home, New Ticket, Ticket Status&#8221;. Now you can make those three links menu become left-align. I have successfully changed it [...]]]></description>
			<content:encoded><![CDATA[<p>This following modification will make the header links menu of your osTicket become left-align. As we know, the menu in the menu header of osTicket which has three links with the right-align style. They are: &#8220;&#8221;Home, New Ticket, Ticket Status&#8221;. Now you can make those three links menu become left-align. I have successfully changed it by modifying two files. They are: <strong>/styles/main.css</strong> and <strong>/include/client/header.inc.php</strong>. <span id="more-1267"></span></p>
<ol>
<li>
Open your <strong>/styles/main.css</strong> file, and find this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>111
112
113
114
115
116
117
118
119
120
121
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #666666; font-style: italic;">#nav li a {
</span>      height<span style="color: #339933;">:</span>24px<span style="color: #339933;">;</span>
      line<span style="color: #339933;">-</span>height<span style="color: #339933;">:</span>24px<span style="color: #339933;">;</span>
      display<span style="color: #339933;">:</span>block<span style="color: #339933;">;</span>
      float<span style="color: #339933;">:</span>left<span style="color: #339933;">;</span>
      padding<span style="color: #339933;">-</span>left<span style="color: #339933;">:</span>25px<span style="color: #339933;">;</span>
      margin<span style="color: #339933;">:</span><span style="color: #cc66cc;">0</span> 10px <span style="color: #cc66cc;">0</span> 10px<span style="color: #339933;">;</span>
      text<span style="color: #339933;">-</span>decoration<span style="color: #339933;">:</span>none<span style="color: #339933;">;</span>
      font<span style="color: #339933;">-</span>weight<span style="color: #339933;">:</span>bold<span style="color: #339933;">;</span>
      float<span style="color: #339933;">:</span>right<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</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>111
112
113
114
115
116
117
118
119
120
121
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #666666; font-style: italic;">#nav li a {
</span>      height<span style="color: #339933;">:</span>24px<span style="color: #339933;">;</span>
      line<span style="color: #339933;">-</span>height<span style="color: #339933;">:</span>24px<span style="color: #339933;">;</span>
      display<span style="color: #339933;">:</span>block<span style="color: #339933;">;</span>
      float<span style="color: #339933;">:</span>left<span style="color: #339933;">;</span>
      padding<span style="color: #339933;">-</span>left<span style="color: #339933;">:</span>25px<span style="color: #339933;">;</span>
      margin<span style="color: #339933;">:</span><span style="color: #cc66cc;">0</span> 10px <span style="color: #cc66cc;">0</span> 10px<span style="color: #339933;">;</span>
      text<span style="color: #339933;">-</span>decoration<span style="color: #339933;">:</span>none<span style="color: #339933;">;</span>
      font<span style="color: #339933;">-</span>weight<span style="color: #339933;">:</span>bold<span style="color: #339933;">;</span>
      float<span style="color: #339933;">:</span>left<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

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

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>19
20
21
22
23
24
25
26
27
28
29
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">     &lt;ul id=&quot;nav&quot;&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;">$thisclient</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">is_object</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$thisclient</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$thisclient</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isValid</span><span style="color: #009900;">&#40;</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>
         &lt;li&gt;&lt;a class=&quot;log_out&quot; href=&quot;logout.php&quot;&gt;Log Out&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a class=&quot;my_tickets&quot; href=&quot;tickets.php&quot;&gt;My Tickets&lt;/a&gt;&lt;/li&gt;
         <span style="color: #000000; font-weight: bold;">&lt;?</span><span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
         &lt;li&gt;&lt;a class=&quot;ticket_status&quot; href=&quot;tickets.php&quot;&gt;Ticket Status&lt;/a&gt;&lt;/li&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;li&gt;&lt;a class=&quot;new_ticket&quot; href=&quot;open.php&quot;&gt;New Ticket&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a class=&quot;home&quot; href=&quot;index.php&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;</pre></td></tr></table></div>

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

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>19
20
21
22
23
24
25
26
27
28
29
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">     &lt;ul id=&quot;nav&quot;&gt;
         &lt;li&gt;&lt;a class=&quot;home&quot; href=&quot;index.php&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a class=&quot;new_ticket&quot; href=&quot;open.php&quot;&gt;New Ticket&lt;/a&gt;&lt;/li&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;">$thisclient</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #990000;">is_object</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$thisclient</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$thisclient</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">isValid</span><span style="color: #009900;">&#40;</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>
         &lt;li&gt;&lt;a class=&quot;my_tickets&quot; href=&quot;tickets.php&quot;&gt;My Tickets&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a class=&quot;log_out&quot; href=&quot;logout.php&quot;&gt;Log Out&lt;/a&gt;&lt;/li&gt;
         <span style="color: #000000; font-weight: bold;">&lt;?</span><span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
         &lt;li&gt;&lt;a class=&quot;ticket_status&quot; href=&quot;tickets.php&quot;&gt;Ticket Status&lt;/a&gt;&lt;/li&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;/ul&gt;</pre></td></tr></table></div>

</li>
</ol>
<p>That&#8217;s all. Enjoy the code!</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/08/16/how-to-make-header-menu-of-osticket-become-left-align/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Remove a Trailing Slash from Home&#8217;s URL in Atahualpa 3.5.3 Theme of WordPress</title>
		<link>http://www.openscriptsolution.com/2010/08/10/how-to-remove-a-trailing-slash-from-homes-url-in-atahualpa-353-theme-of-wordpress/</link>
		<comments>http://www.openscriptsolution.com/2010/08/10/how-to-remove-a-trailing-slash-from-homes-url-in-atahualpa-353-theme-of-wordpress/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 03:12:23 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Atahualpa]]></category>
		<category><![CDATA[beranda]]></category>
		<category><![CDATA[Home]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[trailing slash]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[WPML]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=1259</guid>
		<description><![CDATA[Believe it or not, if you are running a multilingual site using Atahualpa theme and WPML plugin, you will find that there is a double trailing slash in the Home&#8217;s URL that generated by WPML, especially for Home&#8217;s URL belongs to the languages other than the default one and you are using the &#8220;directory per [...]]]></description>
			<content:encoded><![CDATA[<p>Believe it or not, if you are running a multilingual site using <a href="http://wordpress.bytesforall.com/" title="Atahualpa" target="_blank">Atahualpa</a> theme and <a href="http://wpml.org" title="WPML" target="_blank">WPML</a> plugin, you will find that there is a double trailing slash in the Home&#8217;s URL that generated by WPML, especially for Home&#8217;s URL belongs to the languages other than the default one and you are using the &#8220;directory per language&#8221; setting in WPML. This can be happened since Atahualpa add a trailing slash in every Home&#8217;s URL when the home page is being displayed, whereas WPML also added another trailing slash after the language code in the URL. So, this will make a double trailing slash in the Home&#8217;s URL. In order to remove one of these trailing slash, you can use this following modification. As time goes by, this modification being applied into Atahualpa version 3.5.3 (the last version while I was writing this article) and WordPress version 3.0.1. I am not sure whether this modification can be applied into the older versions. <span id="more-1259"></span></p>
<ol>
<li>
Open your <strong>/wp-content/themes/{youratahualpathemename}/bfa_header_config.php</strong> file, and find this code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">   bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'/&quot;</span></pre></div></div>

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

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">   bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&quot;</span></pre></div></div>

<p>Please note that part of code located in six different location at that file, so you have to replace it six times.
</li>
<li>
Open your <strong>/wp-content/themes/{youratahualpathemename}/bfa_footer.php</strong> file, and find this code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">   bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'/&quot;</span></pre></div></div>

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

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">   bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&quot;</span></pre></div></div>

</li>
<li>
Open your <strong>/wp-content/themes/{youratahualpathemename}/bfa_next_previous_links.php</strong> file, and find this code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">   bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'/&quot;</span></pre></div></div>

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

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">   bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&quot;</span></pre></div></div>

<p>Please note that part of code located in three different location at that file, so you have to replace it three times.
</li>
</ol>
<p>That&#8217;s all. Now you should have the proper Home&#8217;s URL according to their own languages.</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/08/10/how-to-remove-a-trailing-slash-from-homes-url-in-atahualpa-353-theme-of-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Replace the Certain Character in a MySQL Table</title>
		<link>http://www.openscriptsolution.com/2010/08/09/how-to-replace-the-certain-character-in-a-mysql-table/</link>
		<comments>http://www.openscriptsolution.com/2010/08/09/how-to-replace-the-certain-character-in-a-mysql-table/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 07:08:08 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[delete]]></category>
		<category><![CDATA[hapus]]></category>
		<category><![CDATA[REPLACE]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[syntax]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=1255</guid>
		<description><![CDATA[Have you ever encountered the strange behavior while you were deleting the certain records from a table in MySQL database using an application you build, which those records cannot be deleted? Well, I have! Today, I encountered this problem. This is so weird, since I have never faced this situation before. Well, after doing some [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever encountered the strange behavior while you were deleting the certain records from a table in MySQL database using an application you build, which those records cannot be deleted? Well, I have! Today, I encountered this problem. This is so weird, since I have never faced this situation before. Well, after doing some investigations, this problem obviously caused by one of the primary key fields contains the comma (,) character. Why I am sure about this, because when I replace the comma character for one record, then I re-try to delete that record from that application, voila&#8230;. that record gets successfully deleted. But the main problem is not stop until that. The next question is: How then can I replace all comma characters from the rest of the other records immediately? Just for your information, there are thousand records that contain the comma character. It is impossible to update all the records one by one, even as a matter of fact, you can create a little program/tool in order to implement it using loop method throught the recordset? Well, here is the quick-solution to overcome it. <span id="more-1255"></span></p>
<p>MySQL has provided the great UPDATE SQL syntax for this. You can use this SQL (for instance, I want to replace the comma character inside the <strong>tablename</strong> table with the minus character that located in a field named <strong>thefield</strong>):</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">UPDATE tablename SET `thefield` = REPLACE(`thefield`, ',', '-');</pre></div></div>

<p>Isn&#8217;t easy, huh? <img src='http://www.openscriptsolution.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </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/08/09/how-to-replace-the-certain-character-in-a-mysql-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Set Autofocus on Username TextBox in Login Page that Generated by PHPMaker</title>
		<link>http://www.openscriptsolution.com/2010/07/29/how-to-set-autofocus-on-username-textbox-in-login-page-that-generated-by-phpmaker/</link>
		<comments>http://www.openscriptsolution.com/2010/07/29/how-to-set-autofocus-on-username-textbox-in-login-page-that-generated-by-phpmaker/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 07:48:51 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[PHPMaker]]></category>
		<category><![CDATA[autofocus]]></category>
		<category><![CDATA[focus]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[PHP Maker]]></category>
		<category><![CDATA[username]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=1250</guid>
		<description><![CDATA[This following modification is a trick how you can set the user&#8217;s cursor automatically focus on Username textbox in Login page that generated by PHPMaker. As we know, by default, each time PHPMaker generate the Login page, user have to click on the Username textbox on that login form in order to start entering the [...]]]></description>
			<content:encoded><![CDATA[<p>This following modification is a trick how you can set the user&#8217;s cursor automatically focus on Username textbox in Login page that generated by <a href="http://www.hkvstore.com/phpmaker/" title="PHP Maker" target="_blank">PHPMaker</a>. As we know, by default, each time PHPMaker generate the Login page, user have to click on the Username textbox on that login form in order to start entering the login information. In order to make it automatically focus after PHPMaker successfully generated your login script page, then we have to modify the <strong>login.php</strong> file that located inside the template belongs to PHPMaker. This modification applied to PHPMaker version 7, as you can see from this following location of the template files. <span id="more-1250"></span> </p>
<ol>
<li>
Open your <strong>C:\Documents and Settings\{Your Computer Username}\My Documents\PHPMaker\Templates\phpv70.zip\Script\login.php</strong> file, and find this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>224
225
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;!--##include phpcommon.php/phpcommon-message##--&gt;
&lt;form action=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> ew_CurrentPage<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; method=&quot;post&quot; onsubmit=&quot;return &lt;!--##=sPageObj##--&gt;.ValidateForm(this);&quot;&gt;</pre></td></tr></table></div>

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

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>224
225
226
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">&lt;!--##include phpcommon.php/phpcommon-message##--&gt;
&lt;body onload=&quot;document.frmLogin.username.focus()&quot;&gt;
&lt;form name=&quot;frmLogin&quot; action=&quot;<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> ew_CurrentPage<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&quot; method=&quot;post&quot; onsubmit=&quot;return &lt;!--##=sPageObj##--&gt;.ValidateForm(this);&quot;&gt;</pre></td></tr></table></div>

</li>
<li>
Still in the same file, find again this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>265
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;/</span>form<span style="color: #339933;">&gt;</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>265
266
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;/</span>form<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>body<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

</li>
</ol>
<p>That&#8217;s all. Now each time you have generated your .php files by using PHPMaker, then when you load the login page, the cursor will automatically focus on the Username textbox.</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/07/29/how-to-set-autofocus-on-username-textbox-in-login-page-that-generated-by-phpmaker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Adjust Home URL Properly in Breadcrumb NavXT Plugin If You Are Running Multilingual Site</title>
		<link>http://www.openscriptsolution.com/2010/07/28/how-to-adjust-home-url-properly-in-breadcrumb-navxt-plugin-if-you-are-running-multilingual-site/</link>
		<comments>http://www.openscriptsolution.com/2010/07/28/how-to-adjust-home-url-properly-in-breadcrumb-navxt-plugin-if-you-are-running-multilingual-site/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 10:07:47 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[beranda]]></category>
		<category><![CDATA[Breadcrumb NavXT]]></category>
		<category><![CDATA[Home]]></category>
		<category><![CDATA[multibahasa]]></category>
		<category><![CDATA[multilingual]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=1246</guid>
		<description><![CDATA[The modification I made in the article with titled: How To Make Breadcrumb NavXT Plugin Support for Multi Language will make that plugin will support for multilingual site. Unfortunately, the Home link in the breadcrumb (if you display it in the breadcrumb) will give you a result always pointing to the default URL&#8217;s home, and [...]]]></description>
			<content:encoded><![CDATA[<p>The modification I made in the article with titled: <a href="http://www.openscriptsolution.com/2010/04/25/how-to-make-breadcrumb-navxt-plugin-support-for-multi-language/" target="_blank" title="How To Make Breadcrumb NavXT Plugin Support for Multi Language">How To Make Breadcrumb NavXT Plugin Support for Multi Language</a> will make that plugin will support for multilingual site. Unfortunately, the <strong>Home</strong> link in the breadcrumb (if you display it in the breadcrumb) will give you a result always pointing to the default URL&#8217;s home, and not to the home of the selected language. For example, you have a multilingual site which <strong>English</strong> as default language and <strong>Indonesian</strong> as the second language. So, the default of URL&#8217;s home in English is http://www.example.com, and unfortunately the URL&#8217;s home in Indonesian does not change, and still using: http://www.example.com instead of http://www.example.com/id/. In order to overcome this little issue but still annoying me, then this following modification will help you by replacing only two lines of code in the <strong>breadcrumb_navxt_class.php</strong> file belongs to Breadcrumb NavXT plugin. <span id="more-1246"></span></p>
<ol>
<li>
Open your <strong>breadcrumb_navxt_class.php</strong> file, and find this code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #666666; font-style: italic;">//Figure out the anchor for home page</span>
	<span style="color: #000088;">$breadcrumb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set_anchor</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">opt</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_anchor'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'home'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

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

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #666666; font-style: italic;">//Figure out the anchor for home page</span>
	<span style="color: #000088;">$breadcrumb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set_anchor</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">opt</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_anchor'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
<li>
Still in the same file, find again this code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #666666; font-style: italic;">//Deal with the anchor</span>
	<span style="color: #000088;">$breadcrumb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set_anchor</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">opt</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_anchor'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> get_option<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'home'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

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

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #666666; font-style: italic;">//Deal with the anchor</span>
	<span style="color: #000088;">$breadcrumb</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set_anchor</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">opt</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'home_anchor'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

</li>
</ol>
<p>Please note that this modification has been successfully applied on WordPress version 3 or above. Not tested in the older version than that.</p>
<p>Demo:<br />
- <a href="http://www.ilovewordpress.org/category/general/" target="_blank">http://www.ilovewordpress.org/category/general/</a> (English version)<br />
- <a href="http://www.ilovewordpress.org/id/category/umum/" target="_blank">http://www.ilovewordpress.org/id/category/umum/</a> (Indonesian version)</p>
<p>Hope this helps someone out there!</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/07/28/how-to-adjust-home-url-properly-in-breadcrumb-navxt-plugin-if-you-are-running-multilingual-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Overcome The Missing Posts/Pages After Upgrading to WPML plugin version 1.8.0 of WordPress</title>
		<link>http://www.openscriptsolution.com/2010/07/25/how-to-overcome-the-missing-postspages-after-upgrading-to-wpml-plugin-version-1-8-0-of-wordpress/</link>
		<comments>http://www.openscriptsolution.com/2010/07/25/how-to-overcome-the-missing-postspages-after-upgrading-to-wpml-plugin-version-1-8-0-of-wordpress/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 05:34:37 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Pages]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[posts]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[WPML]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=1244</guid>
		<description><![CDATA[For those of you who encountered the missing posts/pages after upgrading your WPML plugin to 1.8.0 version, then this following solutin might be help you. Since WPML changed the element_type value of post and page in the icl_translations table, ie each into post_post and post_page, then you have to adjust this value at the element_type [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you who encountered the missing posts/pages after upgrading your <a href="http://wpml.org" title="WPML" target="_blank">WPML</a> plugin to 1.8.0 version, then this following solutin might be help you. Since WPML changed the <strong>element_type</strong> value of <strong>post</strong> and <strong>page</strong> in the <strong>icl_translations</strong> table, ie each into <strong>post_post</strong> and <strong>post_page</strong>, then you have to adjust this value at the element_type field. After doing comparison to several version of WMPL, I found out that this changes happened since WPML version above 1.7.7. In version 1.7.7, this field was still using <strong>post</strong> and <strong>page</strong> instead of <strong>post_post</strong> and <strong>post_page</strong>. Actually, when you upgrade your WPML to 1.8.0, this value will be automatically adjusted to the new value. But, in some cases, there are some websites that do not automatically turn to the new value, especially if they deactivate and activate the plugin manually (because they upgrade by replacing the files manually, and not using the auto-update feature). <span id="more-1244"></span></p>
<ol>
<li>
Go to your <strong>cPanel</strong> of your website, then choose <strong>phpMyAdmin</strong>.
</li>
<li>
Choose your WordPress database, and backup your database (as we will modify one of the tables of this database).
</li>
<li>
Click on the <strong>SQL</strong> tab, and then copy and paste this following SQL update:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">UPDATE wp_icl_translations t, wp_posts p
SET t.element_type = 'post_page'
WHERE p.ID = t.element_id
AND p.post_type = 'page';
&nbsp;
UPDATE wp_icl_translations t, wp_posts p
SET t.element_type = 'post_post'
WHERE p.ID = t.element_id
AND t.element_type = 'post';</pre></div></div>

<p>Assuming that the prefix of your table is <strong>wp_</strong>.<br />
Those 2 statement will update your <strong>wp_icl_translations</strong> table by replacing &#8220;post&#8221; become &#8220;post_post&#8221; for the posts you have already had, and then also replacing &#8220;post&#8221; become &#8220;post_page&#8221; for the pages you have already had.
</li>
<li>
Check again your site, and now the posts or your pages will appear properly.
</li>
<li>
If the problem still remains, then it usuallay caused by the older version of WordPress does not support to use WPML version 1.8.0. I have contacted WPML guru about this problem, and still waiting for the solution. Meanwhile, you can try those solutions above.
</li>
</ol>
<p>Hope it helps!</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/07/25/how-to-overcome-the-missing-postspages-after-upgrading-to-wpml-plugin-version-1-8-0-of-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Display Pods Data Properly Using Atahualpa Theme of WordPress</title>
		<link>http://www.openscriptsolution.com/2010/07/23/how-to-display-pods-data-properly-using-atahualpa-theme-of-wordpress/</link>
		<comments>http://www.openscriptsolution.com/2010/07/23/how-to-display-pods-data-properly-using-atahualpa-theme-of-wordpress/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 04:34:40 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Atahualpa]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[Pods CMS]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=1239</guid>
		<description><![CDATA[If you use Pods CMS plugin with Atahualpa theme for your WordPress-based site, then this following modification is for you, indeed. It will show you how to display the Pods data properly by using Atahualpa theme in WordPress site. Atahualpa is one of the best WordPress theme that I have been using for this last [...]]]></description>
			<content:encoded><![CDATA[<p>If you use <a href="http://podscms.org" title="Pods CMS" target="_blank">Pods CMS</a> plugin with <a href="http://wordpress.bytesforall.com/" title="Atahulpa theme" target="_blank">Atahualpa</a> theme for your <a href="http://wordpress.org" title="WordPress" target="_blank">WordPress</a>-based site, then this following modification is for you, indeed. It will show you how to display the Pods data properly by using Atahualpa theme in WordPress site. Atahualpa is one of the best WordPress theme that I have been using for this last one year. It is a very powerful theme. However, for some beginners, this theme looks too complicated, especially if you want to hard-code the source in order to put your own content into its sidebar. For example, in this case that we are talking about, when you add your own Pods data into the middle-area of your site, the sidebars are messed-up. Then, after for several hours exploring this theme, I found the trick how you can add your Pods data easily by modifying one of the theme&#8217;s files, afterwards adding your own template files and put them inside the Atahualpa theme directory. Yay! That&#8217;s so simple, huh? <span id="more-1239"></span></p>
<ol>
<li>
Open your <strong>wp-content/themes/{youratahualpathemename}/bfa_get_options.php</strong> file, and find this code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> is_category<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span></pre></div></div>

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

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span> <span style="color: #009900;">&#40;</span> is_category<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> is_pod_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// modified by Masino Sinaga, July 2010</span></pre></div></div>

<p>That modification means that the Pods page will be treated with the same way when WordPress display the posts based on their categories.
</li>
<li>
Create your own template file that compatible with the WordPress, for example:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #666666; font-style: italic;">/*
Template Name: YourTemplateName
*/</span>
&nbsp;
<span style="color: #b1b100;">include</span> <span style="color: #009900;">&#40;</span>TEMPLATEPATH <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/functions/bfa_get_options.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
get_header<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// your code to display Pods data goes here ...</span>
&nbsp;
get_footer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>then save it as (for example): <strong>my-first-template.php</strong> file, and put this file inside your Atahualpa theme directory.</p>
<p>Please note that you have to always put the include statement just like above in order to include the <strong>bfa_get_options.php</strong> file, in order to tell the theme to always check whether the current page is a pod page or not as shown in the first step above.
</li>
</ol>
<p>Have a nice code!</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/07/23/how-to-display-pods-data-properly-using-atahualpa-theme-of-wordpress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Add Your Own Translation Link to Language Switcher by Using WPML Plugin of WordPress</title>
		<link>http://www.openscriptsolution.com/2010/07/14/how-to-add-your-own-translation-link-to-language-switcher-by-using-wpml-plugin-of-wordpress/</link>
		<comments>http://www.openscriptsolution.com/2010/07/14/how-to-add-your-own-translation-link-to-language-switcher-by-using-wpml-plugin-of-wordpress/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 13:54:28 +0000</pubDate>
		<dc:creator>Masino Sinaga</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[language switcher]]></category>
		<category><![CDATA[penukar bahasa]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[tautan]]></category>
		<category><![CDATA[WPML]]></category>

		<guid isPermaLink="false">http://www.openscriptsolution.com/?p=1235</guid>
		<description><![CDATA[WPML is a plugin which has the ability to turn your WordPress site into complete multilingual content management systems. Unfortunately, until now I meant, at least until the time before I found this following solution, WPML only supports for the translation of the WordPress original content, such as: posts, pages, categories, tags, and menus (since [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://wpml.org" title="WordPress Multi Lingual" target="_blank">WPML</a> is a plugin which has the ability to turn your WordPress site into complete multilingual content management systems. Unfortunately, until now I meant, at least until the time before I found this following solution, WPML only supports for the translation of the WordPress original content, such as: posts, pages, categories, tags, and menus (since WordPress version 3.0). I can understand about this, since there are so many possibilities about the content you may have in Pods CMS! That is why WPML has not supported for <a href="http://podscms.org" title="Pods CMS">Pods CMS</a> plugin, yet, whereas this feature I have been looking for that could be implemented in WPML too. I have been waiting for such long time, and&#8230; today&#8230; God bless the day I found this following solution, indeed! Although the following modification I made sounds like a little tricky or hackish into the WPML&#8217;s code, but it works very fine at mine. So, if you are using Pods CMS and WPML for your WordPress site, and you want to add your own translation link that came from your own content in Pods CMS into the language switcher that belongs to WPML, then you came to the right place, because this modification is only for you! <span id="more-1235"></span></p>
<p>Another information that you need to know is my site uses two languages: English and Indonesian (default language = Indonesian). </p>
<p>So, this is what I did on my WPML 1.8.0:</p>
<ol>
<li>
Open <strong>/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php</strong> file, and I find this code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>3399
3400
3401
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">                <span style="color: #009900;">&#125;</span><span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span>is_search<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>                    
                    <span style="color: #000088;">$url_glue</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">language_url</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$lang</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'code'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'?'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">===</span><span style="color: #009900; font-weight: bold;">false</span> ? <span style="color: #0000ff;">'?'</span> <span style="color: #339933;">:</span> <span style="color: #0000ff;">'&amp;'</span><span style="color: #339933;">;</span>
                    <span style="color: #000088;">$lang</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'translated_url'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">language_url</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$lang</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'code'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$url_glue</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'s='</span> <span style="color: #339933;">.</span> <span style="color: #990000;">htmlspecialchars</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'s'</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 after the last line of that code, I added this following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>3403
3404
3405
3406
3407
3408
3409
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span>is_pod_page<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// Modified by Masino Sinaga, July 14, 2010</span>
		  <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$slug_en</span><span style="color: #339933;">,</span> <span style="color: #000088;">$slug_id</span><span style="color: #339933;">;</span>
		  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$lang</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'code'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">==</span><span style="color: #0000ff;">'en'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		      <span style="color: #000088;">$lang</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'translated_url'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$slug_en</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: #000088;">$lang</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'translated_url'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$slug_id</span><span style="color: #339933;">;</span>
                  <span style="color: #009900;">&#125;</span> <span style="color: #666666; font-style: italic;">// Modified by Masino Sinaga, July 14, 2010</span></pre></td></tr></table></div>

</li>
<li>
Open <strong>functions.php</strong> file that located in my theme that I currently using, and then I added this following code at the top/declaration section of the file:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$slug_id</span><span style="color: #339933;">,</span> <span style="color: #000088;">$slug_en</span><span style="color: #339933;">;</span></pre></div></div>

<p>those variables important in order to tell WPML that in my Pods template, I use them to get the link from my Pods&#8217; content.
</li>
<li>
In my Pods&#8217; template that I created inside my theme directory, I added this following code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$slug_id</span><span style="color: #339933;">,</span> <span style="color: #000088;">$slug_en</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$slug_id</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;">'/propinsi/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$Record</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_field</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'slug_id'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$slug_en</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;">'/en/province/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$Record</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_field</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'slug_en'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This is only one of the examples how I assign those two variables that mentioned above, so this Pods&#8217; template will hold the values, and then the functions.php file will act as the <strong>bridge</strong> between Pods and WPML. In other words, the value of variables will be known by WPML that derived from the Pods.
</li>
</ol>
<p>You can see the demo from this following link:<br />
<a href="http://www.wilayahindonesia.com/propinsi/kode-wilayah-propinsi-nanggroe-aceh-darussalam" title="Region Code of Nanggroe Aceh Darussalam Province" target="_blank">One of the Indonesia Regions</a>. As you can see now, the language switcher (at the right sidebar, also at the bottom of the site) automatically adds the links that came from Pods CMS, either for English or Indonesian. </p>
<p>You will see that those links suddenly just like the links that came from Posts or Pages in WordPress, but they are not. They came from my Pods content, everyone! </p>
<p>Isn&#8217;t that great? Oh, how much I love this! <img src='http://www.openscriptsolution.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </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/07/14/how-to-add-your-own-translation-link-to-language-switcher-by-using-wpml-plugin-of-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
