<?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>indexu.com</title>
	<atom:link href="http://www.indexu.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.indexu.com</link>
	<description>developer blog</description>
	<lastBuildDate>Wed, 30 Jun 2010 05:06:39 +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>SMTP mail doesn&#8217;t work</title>
		<link>http://www.indexu.com/smtp-mail-doesnt-work/</link>
		<comments>http://www.indexu.com/smtp-mail-doesnt-work/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 05:06:39 +0000</pubDate>
		<dc:creator>dody</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[fsockopen]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[phpmailer]]></category>

		<guid isPermaLink="false">http://www.indexu.com/?p=55</guid>
		<description><![CDATA[Indexu use phpmailer class to send email. By default it use mail() function. Inside admin panel, there is an option to switch to use SMTP instead if mail().
Phpmailer use socket connection to connect to SMTP mail server. So before you use it, make sure your webhost allow fsockopen() function. It this function is disabled, then [...]]]></description>
			<content:encoded><![CDATA[<p>Indexu use phpmailer class to send email. By default it use mail() function. Inside admin panel, there is an option to switch to use SMTP instead if mail().</p>
<p>Phpmailer use socket connection to connect to SMTP mail server. So before you use it, make sure your webhost allow <code>fsockopen()</code> function. It this function is disabled, then email won&#8217;t be sent.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.indexu.com/smtp-mail-doesnt-work/&amp;n=SMTP+mail+doesn%27t+work&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.indexu.com/smtp-mail-doesnt-work/&amp;title=SMTP+mail+doesn%27t+work" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.indexu.com/smtp-mail-doesnt-work/&amp;t=SMTP+mail+doesn%27t+work" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.indexu.com/smtp-mail-doesnt-work/&amp;title=SMTP+mail+doesn%27t+work" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-squidoo">
			<a href="http://www.squidoo.com/lensmaster/bookmark?http://www.indexu.com/smtp-mail-doesnt-work/" rel="nofollow" class="external" title="Add to a lense on Squidoo">Add to a lense on Squidoo</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=SMTP+mail+doesn%27t+work+-+http://b2l.me/7p6wf&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.indexu.com/smtp-mail-doesnt-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom category listing in browse.html</title>
		<link>http://www.indexu.com/custom-category-listing-in-browse-html/</link>
		<comments>http://www.indexu.com/custom-category-listing-in-browse-html/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 00:13:02 +0000</pubDate>
		<dc:creator>dody</dc:creator>
				<category><![CDATA[Templates]]></category>
		<category><![CDATA[category list]]></category>

		<guid isPermaLink="false">http://www.indexu.com/?p=52</guid>
		<description><![CDATA[In earlier post, I show you how to create custom category listing in front page. Now will show you how to create custom category listing in category pages (browse.html). The real challenge here is to construct the category path as we are deep inside category level.
First, you need to remove this tag from browse.html

&#60;%$category%&#62;

Then replace [...]]]></description>
			<content:encoded><![CDATA[<p>In earlier post, I show you how to create custom category listing in front page. Now will show you how to create custom category listing in category pages (browse.html). The real challenge here is to construct the category path as we are deep inside category level.</p>
<p>First, you need to remove this tag from browse.html</p>

<div class="wp_codebox"><table><tr id="p523"><td class="code" id="p52code3"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;%$category%&gt;</span></pre></td></tr></table></div>

<p>Then replace with the following codes</p>

<div class="wp_codebox"><table><tr id="p524"><td class="code" id="p52code4"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;%php%&gt;</span>
  global $dbConn, $indexu, $cat;
&nbsp;
  $img_path = $indexu-&gt;config['site_url'].'/themes/'.$indexu-&gt;config['active_theme'].'/cat';
&nbsp;
  $query = &quot;select category_id, name, image
            from idx_category
            where parent_id = '$cat'&quot;;
  $result = $dbConn-&gt;Execute($query);
&nbsp;
  $limit = $result-&gt;RecordCount();
  $i=0;
&nbsp;
  while ($row = $result-&gt;FetchRow()) {
    $i++;
&nbsp;
    // here we construct the category url, need to fetch the parents
&nbsp;
    $parents = $dbConn-&gt;Lookup('parents', 'idx_category_path', &quot;category_id = '{$row['category_id']}'&quot;);
    $arr = explode(';',$parents);
    array_pop($arr);
    array_pop($arr);
    array_shift($arr);
    array_reverse($arr);
&nbsp;
    unset($path);
&nbsp;
    foreach ($arr as $k =&gt; $v) {
      $name = $dbConn-&gt;Lookup('name', 'idx_category', &quot;category_id = '$v'&quot;);
      $path .= SEOReplace($name).'/';
    }
&nbsp;
    $url = $path.SEOReplace($row['name']).'/';
    print &quot;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'subList'</span>&gt;&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'$url'</span>&gt;</span>{$row['name']}<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span> \n&quot;;
  }
<span style="color: #009900;">&lt;%<span style="color: #66cc66;">/</span>php%&gt;</span></pre></td></tr></table></div>



<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.indexu.com/custom-category-listing-in-browse-html/&amp;n=Custom+category+listing+in+browse.html&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.indexu.com/custom-category-listing-in-browse-html/&amp;title=Custom+category+listing+in+browse.html" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.indexu.com/custom-category-listing-in-browse-html/&amp;t=Custom+category+listing+in+browse.html" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.indexu.com/custom-category-listing-in-browse-html/&amp;title=Custom+category+listing+in+browse.html" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-squidoo">
			<a href="http://www.squidoo.com/lensmaster/bookmark?http://www.indexu.com/custom-category-listing-in-browse-html/" rel="nofollow" class="external" title="Add to a lense on Squidoo">Add to a lense on Squidoo</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Custom+category+listing+in+browse.html+-+http://b2l.me/425pu&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.indexu.com/custom-category-listing-in-browse-html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Language code, add .utf8 if it doesn&#8217;t work</title>
		<link>http://www.indexu.com/language-code-add-utf8-if-it-doesnt-work/</link>
		<comments>http://www.indexu.com/language-code-add-utf8-if-it-doesnt-work/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 09:26:04 +0000</pubDate>
		<dc:creator>dody</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[gettext]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[locale]]></category>
		<category><![CDATA[mo]]></category>
		<category><![CDATA[po]]></category>
		<category><![CDATA[utf8]]></category>

		<guid isPermaLink="false">http://www.indexu.com/?p=49</guid>
		<description><![CDATA[Usually language code is constructed like es_ES or fr_FR. However in some servers, usually on linux box, the server locale code need explicitly add .utf8. So if you have problem with strange characters where utf8 doesn&#8217;t work. Do the following steps:
1) rename the language folder, add .utf8.

/lang/es_ES.utf8
/lang/fr_FR.utf8

2) language switching also need to be modified to:


http://www.nicecoder.com/testrial/upload/set_language.php?lang_id=es_ES.utf8&#038;back=/testrial/upload/

Notice [...]]]></description>
			<content:encoded><![CDATA[<p>Usually language code is constructed like <code>es_ES</code> <code>or fr_FR</code>. However in some servers, usually on linux box, the server <code>locale</code> code need explicitly add <code>.utf8</code>. So if you have problem with strange characters where utf8 doesn&#8217;t work. Do the following steps:</p>
<p>1) rename the language folder, add <code>.utf8</code>.</p>
<pre>
/lang/es_ES.utf8
/lang/fr_FR.utf8
</pre>
<p>2) language switching also need to be modified to:</p>
<pre>

http://www.nicecoder.com/testrial/upload/set_language.php?lang_id=es_ES.utf8&#038;back=/testrial/upload/
</pre>
<p>Notice that it is now become <code>lang_id=es_ES.utf8</code>.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.indexu.com/language-code-add-utf8-if-it-doesnt-work/&amp;n=Language+code%2C+add+.utf8+if+it+doesn%27t+work&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.indexu.com/language-code-add-utf8-if-it-doesnt-work/&amp;title=Language+code%2C+add+.utf8+if+it+doesn%27t+work" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.indexu.com/language-code-add-utf8-if-it-doesnt-work/&amp;t=Language+code%2C+add+.utf8+if+it+doesn%27t+work" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.indexu.com/language-code-add-utf8-if-it-doesnt-work/&amp;title=Language+code%2C+add+.utf8+if+it+doesn%27t+work" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-squidoo">
			<a href="http://www.squidoo.com/lensmaster/bookmark?http://www.indexu.com/language-code-add-utf8-if-it-doesnt-work/" rel="nofollow" class="external" title="Add to a lense on Squidoo">Add to a lense on Squidoo</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Language+code%2C+add+.utf8+if+it+doesn%27t+work+-+http://b2l.me/4mmG7&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.indexu.com/language-code-add-utf8-if-it-doesnt-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up new mysql database with cpanel</title>
		<link>http://www.indexu.com/setting-up-new-mysql-database-with-cpanel/</link>
		<comments>http://www.indexu.com/setting-up-new-mysql-database-with-cpanel/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 22:06:24 +0000</pubDate>
		<dc:creator>dody</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.indexu.com/?p=46</guid>
		<description><![CDATA[Today I will show you a basic instruction how to setup a new mysql database for your indexu directory by using cpanel. 
1) Open cpanel page, usually something like www.domain.com:2082, then enter your username and password that are provided by your hosting account.
2) Click on manage mysql database

3) Create a new mysql database

4) Create a [...]]]></description>
			<content:encoded><![CDATA[<p>Today I will show you a basic instruction how to setup a new mysql database for your indexu directory by using cpanel. </p>
<p>1) Open cpanel page, usually something like www.domain.com:2082, then enter your username and password that are provided by your hosting account.</p>
<p>2) Click on manage mysql database</p>
<p><img src="http://www.indexu.com/up/mysql1.png" alt="" /></p>
<p>3) Create a new mysql database</p>
<p><img src="http://www.indexu.com/up/mysql2.png" alt="" /></p>
<p>4) Create a new user name. Enter username and password.</p>
<p><img src="http://www.indexu.com/up/mysql3.png" alt="" /></p>
<p>5) Before you can use the database, you need to assign user to get access the database</p>
<p><img src="http://www.indexu.com/up/mysql4.png" alt="" /></p>
<p>6) Give the user all privilege</p>
<p><img src="http://www.indexu.com/up/mysql5.png" alt="" /></p>
<p>That&#8217;s it. Now you have mysql ready to use with indexu. Form this example it will be:<br />
MYSQL username: indexute_dody<br />
MYSQL password: poi0982<br />
MYSQL host: localhost<br />
MYSQL database name: indexute_indexudir</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.indexu.com/setting-up-new-mysql-database-with-cpanel/&amp;n=Setting+up+new+mysql+database+with+cpanel&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.indexu.com/setting-up-new-mysql-database-with-cpanel/&amp;title=Setting+up+new+mysql+database+with+cpanel" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.indexu.com/setting-up-new-mysql-database-with-cpanel/&amp;t=Setting+up+new+mysql+database+with+cpanel" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.indexu.com/setting-up-new-mysql-database-with-cpanel/&amp;title=Setting+up+new+mysql+database+with+cpanel" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-squidoo">
			<a href="http://www.squidoo.com/lensmaster/bookmark?http://www.indexu.com/setting-up-new-mysql-database-with-cpanel/" rel="nofollow" class="external" title="Add to a lense on Squidoo">Add to a lense on Squidoo</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Setting+up+new+mysql+database+with+cpanel+-+http://b2l.me/3zhzm&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.indexu.com/setting-up-new-mysql-database-with-cpanel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Show listing in two columns or more</title>
		<link>http://www.indexu.com/show-listing-in-two-columns-or-more/</link>
		<comments>http://www.indexu.com/show-listing-in-two-columns-or-more/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 02:15:38 +0000</pubDate>
		<dc:creator>dody</dc:creator>
				<category><![CDATA[Templates]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[listing]]></category>
		<category><![CDATA[multi columns]]></category>
		<category><![CDATA[two columns]]></category>

		<guid isPermaLink="false">http://www.indexu.com/?p=43</guid>
		<description><![CDATA[
Bored to have listing in single column? I will show you how to make listing in multiple columns.
Edit rows.html, clean the codes and replace with:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  &#60;%if $number % 2 eq 1%&#62;
    &#60;div class=&#34;row_nl&#34;&#62;
  &#60;%/if%&#62;
&#160;
  &#60;div class=&#34;row_item myrow&#34;&#62;
    &#60;img src=&#34;http://open.thumbshots.org/image.aspx?url=&#60;%$url%&#62;&#34; alt=&#34;&#60;%$title%&#62;&#34; style=&#34;border:1px solid #777;&#34;&#62;
    [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.indexu.com/up/2colrow.png" alt="two columns rows.html" /></p>
<p>Bored to have listing in single column? I will show you how to make listing in multiple columns.</p>
<p>Edit <code>rows.html</code>, clean the codes and replace with:</p>

<div class="wp_codebox"><table><tr id="p437"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code" id="p43code7"><pre class="html4strict" style="font-family:monospace;">  <span style="color: #009900;">&lt;%if $number % <span style="color: #cc66cc;">2</span> eq <span style="color: #cc66cc;">1</span>%&gt;</span>
    <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;row_nl&quot;</span>&gt;</span>
  <span style="color: #009900;">&lt;%<span style="color: #66cc66;">/</span>if%&gt;</span>
&nbsp;
  <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;row_item myrow&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/img.html"><span style="color: #000000; font-weight: bold;">img</span></a> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://open.thumbshots.org/image.aspx?url=&lt;%$url%&gt;</span></span>&quot; alt=&quot;<span style="color: #009900;">&lt;%$title%&gt;</span>&quot; style=&quot;border:1px solid #777;&quot;&gt;
    <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/h3.html"><span style="color: #000000; font-weight: bold;">h3</span></a>&gt;&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;%$url%&gt;</span></span>&quot; name=&quot;link_<span style="color: #009900;">&lt;%$link_id%&gt;</span>&quot;&gt;<span style="color: #009900;">&lt;%$title%&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/h3.html"><span style="color: #000000; font-weight: bold;">h3</span></a>&gt;</span>
    <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;&lt;%$description%&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span>
    <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;%$url%&gt;</span></span>&quot; name=&quot;link_<span style="color: #009900;">&lt;%$link_id%&gt;</span>&quot;&gt;<span style="color: #009900;">&lt;%$url%&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;</span> - <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;%$site_url%&gt;</span></span>/<span style="color: #009900;">&lt;%$detail_page_url%&gt;</span>&quot;&gt;<span style="color: #009900;">&lt;%t%&gt;</span>details<span style="color: #009900;">&lt;%<span style="color: #66cc66;">/</span>t%&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span>
    <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span>Google PR <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/img.html"><span style="color: #000000; font-weight: bold;">img</span></a> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;%$site_url%&gt;</span></span>/googlepr.php?link_id=<span style="color: #009900;">&lt;%$link_id%&gt;</span>&quot; alt=&quot;&quot; /&gt;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/p.html"><span style="color: #000000; font-weight: bold;">p</span></a>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span>
&nbsp;
  <span style="color: #009900;">&lt;%if $number % <span style="color: #cc66cc;">2</span> eq <span style="color: #cc66cc;">0</span>%&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span>
  <span style="color: #009900;">&lt;%<span style="color: #66cc66;">/</span>if%&gt;</span></pre></td></tr></table></div>

<p>Then add these 2 css classes to construct the layout.</p>

<div class="wp_codebox"><table><tr id="p438"><td class="code" id="p43code8"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.row_nl</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span><span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.row_item</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">285px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>



<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.indexu.com/show-listing-in-two-columns-or-more/&amp;n=Show+listing+in+two+columns+or+more&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.indexu.com/show-listing-in-two-columns-or-more/&amp;title=Show+listing+in+two+columns+or+more" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.indexu.com/show-listing-in-two-columns-or-more/&amp;t=Show+listing+in+two+columns+or+more" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.indexu.com/show-listing-in-two-columns-or-more/&amp;title=Show+listing+in+two+columns+or+more" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-squidoo">
			<a href="http://www.squidoo.com/lensmaster/bookmark?http://www.indexu.com/show-listing-in-two-columns-or-more/" rel="nofollow" class="external" title="Add to a lense on Squidoo">Add to a lense on Squidoo</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Show+listing+in+two+columns+or+more+-+http://b2l.me/3te9d&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.indexu.com/show-listing-in-two-columns-or-more/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Show category listing as list of images</title>
		<link>http://www.indexu.com/show-category-listing-as-list-of-images/</link>
		<comments>http://www.indexu.com/show-category-listing-as-list-of-images/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 07:47:48 +0000</pubDate>
		<dc:creator>dody</dc:creator>
				<category><![CDATA[Templates]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[category listing]]></category>

		<guid isPermaLink="false">http://www.indexu.com/?p=38</guid>
		<description><![CDATA[
In this tutorial I will show you how to create an alternative category listing in front page where the categories will be listed as a series of images. 
1) Prepare the image files. Create a folder called &#8216;cat&#8216; in template folder. Then put the images files here.
2) Edit category image file for each categories with [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.indexu.com/up/catlistingimage.png" alt="alternative category listing" /></p>
<p>In this tutorial I will show you how to create an alternative category listing in front page where the categories will be listed as a series of images. </p>
<p>1) Prepare the image files. Create a folder called &#8216;<code>cat</code>&#8216; in template folder. Then put the images files here.</p>
<p>2) Edit category image file for each categories with admin panel or phpmyadmin. Put the filename of image file you have prepared for each categories.</p>
<p><img src="http://www.indexu.com/up/catlistingimage2.png" alt="edit category image file" /></p>
<p>3) Edit <code>index.html</code>, add the following code where you want to put this category list.<br />
You can change <code>$item_per_row</code> value as you desire.</p>

<div class="wp_codebox"><table><tr id="p3811"><td class="code" id="p38code11"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;%</span>php<span style="color: #000000; font-weight: bold;">%&gt;</span>
  <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$dbConn</span><span style="color: #339933;">,</span> <span style="color: #000088;">$indexu</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000088;">$item_per_row</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000088;">$img_path</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$indexu</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'site_url'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/themes/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$indexu</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">config</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'active_theme'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'/cat'</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000088;">$query</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;select name, image
            from idx_category
            where parent_id = '0'&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dbConn</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Execute</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000088;">$limit</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$result</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">RecordCount</span><span style="color: #009900;">&#40;</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;">0</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$result</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">FetchRow</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: #000088;">$i</span><span style="color: #339933;">++;</span>
&nbsp;
    <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: #000088;">$item_per_row</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: #b1b100;">print</span> <span style="color: #0000ff;">&quot;&lt;div class='cat_nl'&gt;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> SEOReplace<span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'name'</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: #339933;">;</span>
    <span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;&lt;div class='cat_item'&gt;&lt;a href='<span style="color: #006699; font-weight: bold;">$url</span>'&gt;
           &lt;img src='<span style="color: #006699; font-weight: bold;">$img_path</span>/<span style="color: #006699; font-weight: bold;">{$row['image']}</span>' title='<span style="color: #006699; font-weight: bold;">{$row['name']}</span>' alt='<span style="color: #006699; font-weight: bold;">{$row['name']}</span>' /&gt;&lt;/a&gt;&lt;/div&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <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: #000088;">$item_per_row</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$i</span><span style="color: #339933;">==</span><span style="color: #000088;">$limit</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;&lt;/div&gt;&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;">&lt;%</span><span style="color: #339933;">/</span>php<span style="color: #000000; font-weight: bold;">%&gt;</span></pre></td></tr></table></div>

<p>4) Add the following css classes into css file, usually <code>style.css</code></p>

<div class="wp_codebox"><table><tr id="p3812"><td class="code" id="p38code12"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.cat_nl</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">clear</span><span style="color: #00AA00;">:</span><span style="color: #993333;">both</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">100%</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.cat_item</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span><span style="color: #993333;">inline</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>



<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.indexu.com/show-category-listing-as-list-of-images/&amp;n=Show+category+listing+as+list+of+images&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.indexu.com/show-category-listing-as-list-of-images/&amp;title=Show+category+listing+as+list+of+images" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.indexu.com/show-category-listing-as-list-of-images/&amp;t=Show+category+listing+as+list+of+images" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.indexu.com/show-category-listing-as-list-of-images/&amp;title=Show+category+listing+as+list+of+images" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-squidoo">
			<a href="http://www.squidoo.com/lensmaster/bookmark?http://www.indexu.com/show-category-listing-as-list-of-images/" rel="nofollow" class="external" title="Add to a lense on Squidoo">Add to a lense on Squidoo</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Show+category+listing+as+list+of+images+-+http://b2l.me/3mqnf&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.indexu.com/show-category-listing-as-list-of-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding dynamic gmap with navigation and zooming</title>
		<link>http://www.indexu.com/adding-dynamic-gmap-with-navigation-and-zooming/</link>
		<comments>http://www.indexu.com/adding-dynamic-gmap-with-navigation-and-zooming/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 00:34:12 +0000</pubDate>
		<dc:creator>dody</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Templates]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[google map]]></category>

		<guid isPermaLink="false">http://www.indexu.com/?p=26</guid>
		<description><![CDATA[
As many of you request how to replace the static gmap image with dynamic gmap which allow navigation and zooming, I made some test how to do this for the easiest way.
Ok. This is the easiest way. We only need to change the template files. Actually only 2 files.
Edit header.html, usually we use

&#60;body&#62;

 but now [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.indexu.com/up/gmap1.png" alt="google map with navigation" title="google map with navigation" /></p>
<p>As many of you request how to replace the static gmap image with dynamic gmap which allow navigation and zooming, I made some test how to do this for the easiest way.</p>
<p>Ok. This is the easiest way. We only need to change the template files. Actually only 2 files.</p>
<p>Edit <code>header.html</code>, usually we use</p>

<div class="wp_codebox"><table><tr id="p2617"><td class="code" id="p26code17"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/body.html"><span style="color: #000000; font-weight: bold;">body</span></a>&gt;</span></pre></td></tr></table></div>

<p> but now we need to add <code>onload</code> call to js to load gmap only when detail page is accessed.</p>

<div class="wp_codebox"><table><tr id="p2618"><td class="code" id="p26code18"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;%</span>php<span style="color: #000000; font-weight: bold;">%&gt;</span>
<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$page_identifier</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$page_identifier</span><span style="color: #339933;">==</span><span style="color: #0000ff;">'detail.php'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #b1b100;">print</span> <span style="color: #0000ff;">'&lt;body onload=&quot;initialize()&quot; onunload=&quot;GUnload()&quot;&gt;'</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;">print</span> <span style="color: #0000ff;">&quot;&lt;body&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">&lt;%</span><span style="color: #339933;">/</span>php<span style="color: #000000; font-weight: bold;">%&gt;</span></pre></td></tr></table></div>

<p>Edit <code>detail_link.html</code>, add the <code>div</code> container to show the map, it must have id <code>gmapnav_canvas</code>.</p>

<div class="wp_codebox"><table><tr id="p2619"><td class="code" id="p26code19"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/h3.html"><span style="color: #000000; font-weight: bold;">h3</span></a>&gt;</span>Location Map<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/h3.html"><span style="color: #000000; font-weight: bold;">h3</span></a>&gt;</span>
<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;gmapnav_canvas&quot;</span> <span style="color: #000066;">style</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;width: 640px; height: 400px;text-align:center;margin: 20px;&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span></pre></td></tr></table></div>

<p>Next, the last step is to construct the js code for google map. Edit <code>detail_link.html</code>, you can put the code at the of this file.</p>

<div class="wp_codebox"><table><tr id="p2620"><td class="code" id="p26code20"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;%</span>php<span style="color: #000000; font-weight: bold;">%&gt;</span>
&nbsp;
  <span style="color: #000088;">$api_key</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$dbConn</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$query</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;select * from idx_link where link_id = '<span style="color: #006699; font-weight: bold;">{$_REQUEST['linkid']}</span>' limit 1&quot;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dbConn</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Execute</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000088;">$address</span>  <span style="color: #339933;">=</span> <span style="color: #000088;">$result</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Fields</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;address&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$city</span>  <span style="color: #339933;">=</span> <span style="color: #000088;">$result</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Fields</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;city&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$zip</span>  <span style="color: #339933;">=</span> <span style="color: #000088;">$result</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Fields</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;zip&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$state</span>  <span style="color: #339933;">=</span> <span style="color: #000088;">$result</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Fields</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;state&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$country</span>  <span style="color: #339933;">=</span> <span style="color: #000088;">$result</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Fields</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;country&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000088;">$loc</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/urlencode"><span style="color: #990000;">urlencode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$address</span>, <span style="color: #006699; font-weight: bold;">$city</span>, <span style="color: #006699; font-weight: bold;">$state</span>, <span style="color: #006699; font-weight: bold;">$zip</span>, <span style="color: #006699; font-weight: bold;">$country</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000088;">$api_req</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'http://maps.google.com/maps/geo?q='</span><span style="color: #339933;">.</span><span style="color: #000088;">$loc</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;key='</span><span style="color: #339933;">.</span><span style="color: #000088;">$api_key</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;sensor=false&amp;output=csv'</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000088;">$api_result</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/file_get_contents"><span style="color: #990000;">file_get_contents</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$api_req</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #000088;">$arr</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/explode"><span style="color: #990000;">explode</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">','</span><span style="color: #339933;">,</span><span style="color: #000088;">$api_result</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$arr</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">==</span><span style="color: #0000ff;">'200'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$latlng</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$arr</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">','</span><span style="color: #339933;">.</span><span style="color: #000088;">$arr</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$gmap_js</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;
    &lt;script src=<span style="color: #000099; font-weight: bold;">\&quot;</span>http://maps.google.com/maps?file=api&amp;amp;v=2&amp;amp;key=<span style="color: #006699; font-weight: bold;">{$api_key}</span><span style="color: #000099; font-weight: bold;">\&quot;</span> type=<span style="color: #000099; font-weight: bold;">\&quot;</span>text/javascript<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;&lt;/script&gt;
    &lt;script type=<span style="color: #000099; font-weight: bold;">\&quot;</span>text/javascript<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;
    function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById(<span style="color: #000099; font-weight: bold;">\&quot;</span>gmapnav_canvas<span style="color: #000099; font-weight: bold;">\&quot;</span>));
        map.setCenter(new GLatLng(<span style="color: #006699; font-weight: bold;">{$latlng}</span>), 10);
&nbsp;
        var latlng = new GLatLng(<span style="color: #006699; font-weight: bold;">{$latlng}</span>);
        map.addOverlay(new GMarker(latlng));
&nbsp;
        map.addControl(new GSmallMapControl());
      }
    }
   &lt;/script&gt;
    &quot;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #b1b100;">print</span> <span style="color: #000088;">$gmap_js</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">&lt;%</span><span style="color: #339933;">/</span>php<span style="color: #000000; font-weight: bold;">%&gt;</span></pre></td></tr></table></div>



<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.indexu.com/adding-dynamic-gmap-with-navigation-and-zooming/&amp;n=Adding+dynamic+gmap+with+navigation+and+zooming&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.indexu.com/adding-dynamic-gmap-with-navigation-and-zooming/&amp;title=Adding+dynamic+gmap+with+navigation+and+zooming" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.indexu.com/adding-dynamic-gmap-with-navigation-and-zooming/&amp;t=Adding+dynamic+gmap+with+navigation+and+zooming" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.indexu.com/adding-dynamic-gmap-with-navigation-and-zooming/&amp;title=Adding+dynamic+gmap+with+navigation+and+zooming" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-squidoo">
			<a href="http://www.squidoo.com/lensmaster/bookmark?http://www.indexu.com/adding-dynamic-gmap-with-navigation-and-zooming/" rel="nofollow" class="external" title="Add to a lense on Squidoo">Add to a lense on Squidoo</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Adding+dynamic+gmap+with+navigation+and+zooming+-+http://b2l.me/3jf2y&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.indexu.com/adding-dynamic-gmap-with-navigation-and-zooming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert md5 password</title>
		<link>http://www.indexu.com/convert-md5-password/</link>
		<comments>http://www.indexu.com/convert-md5-password/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 23:33:35 +0000</pubDate>
		<dc:creator>dody</dc:creator>
				<category><![CDATA[Installation]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[md5 password]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.indexu.com/?p=22</guid>
		<description><![CDATA[In indexu 5.x the password is stored in plain text.
If you upgrade from indexu 5.x to indexu deluxe, the installer will convert it automatically to md5.
If you experience user can not login after upgrade, then it could be that the conversion process fail.
If you have this problem, here is a solution.
Create a file called convertmd5.php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
&#60;?php
include [...]]]></description>
			<content:encoded><![CDATA[<p>In indexu 5.x the password is stored in plain text.<br />
If you upgrade from indexu 5.x to indexu deluxe, the installer will convert it automatically to md5.</p>
<p>If you experience user can not login after upgrade, then it could be that the conversion process fail.<br />
If you have this problem, here is a solution.</p>
<p>Create a file called <code>convertmd5.php</code></p>

<div class="wp_codebox"><table><tr id="p2222"><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
</pre></td><td class="code" id="p22code22"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">include</span> <span style="color: #0000ff;">&quot;application.php&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'c'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  ConvertMD5password<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</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;">print</span> <span style="color: #0000ff;">&quot;&lt;p&gt;Do you want to convert user password to MD5? &lt;br&gt;
         Make sure that the password is not in MD5&lt;/p&gt;
         &lt;p&gt;&lt;a href='convertmd5.php?c=yes'&gt;Convert now&lt;/a&gt;&lt;/p&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> ConvertMD5password<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$dbConn</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dbConn</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Execute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;select * from `idx_users` where length(password) &lt;30&quot;</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: #339933;">!</span><span style="color: #000088;">$result</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">EOF</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$dbConn</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Execute</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;UPDATE `idx_users` SET `password` = '&quot;</span><span style="color: #339933;">.</span><a href="http://www.php.net/md5"><span style="color: #990000;">md5</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Fields</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;password&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;' WHERE `username` = '&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$result</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">Fields</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;username&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$result</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">MoveNext</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</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>

<p>Upload this file to indexu root folder, then run with browser.<br />
After it is done, you need to delete this file for security.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.indexu.com/convert-md5-password/&amp;n=Convert+md5+password&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.indexu.com/convert-md5-password/&amp;title=Convert+md5+password" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.indexu.com/convert-md5-password/&amp;t=Convert+md5+password" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.indexu.com/convert-md5-password/&amp;title=Convert+md5+password" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-squidoo">
			<a href="http://www.squidoo.com/lensmaster/bookmark?http://www.indexu.com/convert-md5-password/" rel="nofollow" class="external" title="Add to a lense on Squidoo">Add to a lense on Squidoo</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Convert+md5+password+-+File: /data/app/webapp/functions.php<br />Line: 7<br />Message: Too many connections&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.indexu.com/convert-md5-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to make slider work for your template</title>
		<link>http://www.indexu.com/how-to-make-slider-work-for-your-template/</link>
		<comments>http://www.indexu.com/how-to-make-slider-work-for-your-template/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 07:07:20 +0000</pubDate>
		<dc:creator>dody</dc:creator>
				<category><![CDATA[Css]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Templates]]></category>
		<category><![CDATA[slider]]></category>

		<guid isPermaLink="false">http://www.indexu.com/?p=12</guid>
		<description><![CDATA[Indexu use stepcarousel.js for image slider. I realize that the slider need to be customized for each template.
Here is some direction how to make it work for any templates you want.
1) Check your header.html file, make sure you have base tag and jquery loaded. Here is my html head section to start:

  &#60;link href=&#34;&#60;%$tpl_base%&#62;/jquery.autocomplete.css&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>Indexu use <code>stepcarousel.js</code> for image slider. I realize that the slider need to be customized for each template.<br />
Here is some direction how to make it work for any templates you want.</p>
<p>1) Check your <code>header.html</code> file, make sure you have base tag and jquery loaded. Here is my html head section to start:</p>

<div class="wp_codebox"><table><tr id="p1228"><td class="code" id="p12code28"><pre class="html4strict" style="font-family:monospace;">  <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/link.html"><span style="color: #000000; font-weight: bold;">link</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;%$tpl_base%&gt;</span></span>/jquery.autocomplete.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;screen&quot; charset=&quot;utf-8&quot;&gt;
	<span style="color: #009900;">&lt;%foreach from<span style="color: #66cc66;">=</span>$additional_js key<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;name_js&quot;</span> item<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;file_js&quot;</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;addition_js&quot;</span>%&gt;</span>
    <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;%$file_js%&gt;</span></span>&quot;&gt;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span>
  <span style="color: #009900;">&lt;%<span style="color: #66cc66;">/</span>foreach%&gt;</span>
  <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'text/javascript'</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'&lt;%$tpl_base%&gt;</span></span>/jquery.js'&gt;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span>
  <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'text/javascript'</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'&lt;%$tpl_base%&gt;</span></span>/jquery.autocomplete.min.js'&gt;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span>
&nbsp;
	<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
  jQuery(document).ready(function($){
    $(&quot;#keyword&quot;).autocomplete(&quot;<span style="color: #009900;">&lt;%$site_url%&gt;</span>/autocomplete.php?mode=link&quot;);
  });
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span>
&nbsp;
  <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/base.html"><span style="color: #000000; font-weight: bold;">base</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;%$site_url%&gt;</span></span>/&quot; /&gt;</pre></td></tr></table></div>

<p>2) In <code>index.html</code>, call the slider block.</p>

<div class="wp_codebox"><table><tr id="p1229"><td class="code" id="p12code29"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;%block_slide max_item<span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;20&quot;</span>%&gt;</span></pre></td></tr></table></div>

<p>3) Open <code>/blocks/block.slider.html</code>, notice the slider parameter and there are important html class: <code>slideshow</code> and <code>stepcarousel</code>. Later you will need to set the css width of these class. Also make attention with navigation button (left/right) <code>defaultbuttons</code>, you may want to replace the image and adjust the position.</p>

<div class="wp_codebox"><table><tr id="p1230"><td class="code" id="p12code30"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;%if $link%&gt;</span>
    <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;%$tpl_base%&gt;</span></span>/stepcarousel.js&quot;&gt;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span>
    <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/javascript&quot;</span>&gt;</span>
&nbsp;
    stepcarousel.setup({
      galleryid: 'mygallery', //id of carousel DIV
      beltclass: 'belt', //class of inner &quot;belt&quot; DIV containing all the panel DIVs
      panelclass: 'panel', //class of panel DIVs each holding content
      autostep: {enable:true, moveby:1, pause:2000},
      panelbehavior: {speed:500, wraparound:true, persist:true},
      defaultbuttons: {enable: true, moveby: 1, leftnav: ['<span style="color: #009900;">&lt;%$tpl_base%&gt;</span>/images/play_l.png', -5, 35], rightnav: ['<span style="color: #009900;">&lt;%$tpl_base%&gt;</span>/images/play_r.png', -20, 35]},
      statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
      contenttype: ['inline'] //content setting ['inline'] or ['ajax', 'path_to_external_file']
    })
&nbsp;
    <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span>
<span style="color: #009900;">&lt;%$hook_html_block_slide_begin%&gt;</span>
				<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;content_box_full slideshow&quot;</span>&gt;</span>
        <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;mygallery&quot;</span> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;stepcarousel&quot;</span>&gt;</span>
            <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;belt&quot;</span>&gt;</span>
	<span style="color: #009900;">&lt;%$link%&gt;</span>
            <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span>
          <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span>
					<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;clear&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span>
				<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span>
&nbsp;
&nbsp;
<span style="color: #009900;">&lt;%$hook_html_block_slide_end%&gt;</span>
<span style="color: #009900;">&lt;%<span style="color: #66cc66;">/</span>if%&gt;</span></pre></td></tr></table></div>

<p>4) Open <code>/blocks/block.slider_row.html</code>, you may want to customize something here. In most case, just leave it as it is.</p>

<div class="wp_codebox"><table><tr id="p1231"><td class="code" id="p12code31"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;%$hook_html_block_slide_rows_begin%&gt;</span>
&nbsp;
  <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a> <span style="color: #000066;">class</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;panel&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;%$site_url%&gt;</span></span>/<span style="color: #009900;">&lt;%$detail_page_url%&gt;</span>&quot; name=&quot;link_<span style="color: #009900;">&lt;%$link_id%&gt;</span>&quot;&gt;<span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/img.html"><span style="color: #000000; font-weight: bold;">img</span></a> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://open.thumbshots.org/image.aspx?url=&lt;%$url%&gt;</span></span>&quot; alt=&quot;<span style="color: #009900;">&lt;%$title%&gt;</span>&quot;&gt;<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/a.html"><span style="color: #000000; font-weight: bold;">a</span></a>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">div</span></a>&gt;</span>
&nbsp;
<span style="color: #009900;">&lt;%$hook_html_block_slide_rows_end%&gt;</span></pre></td></tr></table></div>

<p>5) Now you need to customize the css, you can use main.css, add and adjust the following css code to suit your need. Usually you need to change <code>.slideshow width</code> and <code>.stepcarousel width</code>.</p>

<div class="wp_codebox"><table><tr id="p1232"><td class="code" id="p12code32"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.slideshow</span> <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#ddd</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">570px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
.stepcarousel<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/*leave this value alone*/</span>
  <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">scroll</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/*leave this value alone*/</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">555px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/*Width of Carousel Viewer itself*/</span>
  <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">115px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/*Height should enough to fit largest content's height*/</span>
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.stepcarousel</span> .belt<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/*leave this value alone*/</span>
  <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.stepcarousel</span> .panel<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/*leave this value alone*/</span>
  <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/*clip content that go outside dimensions of holding panel DIV*/</span>
  <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/*margin around each panel*/</span>
  <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">120px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/*Width of each panel holding each content. If removed, widths should be individually defined on each content DIV then. */</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #6666ff;">.stepcarousel</span> <span style="color: #6666ff;">.panel</span> img <span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">2px</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#fff</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<p>6) Check your template root folder to have needed js files: <code>jquery.js</code> and <code>stepcarousel.js</code>.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.indexu.com/how-to-make-slider-work-for-your-template/&amp;n=How+to+make+slider+work+for+your+template&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.indexu.com/how-to-make-slider-work-for-your-template/&amp;title=How+to+make+slider+work+for+your+template" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.indexu.com/how-to-make-slider-work-for-your-template/&amp;t=How+to+make+slider+work+for+your+template" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.indexu.com/how-to-make-slider-work-for-your-template/&amp;title=How+to+make+slider+work+for+your+template" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-squidoo">
			<a href="http://www.squidoo.com/lensmaster/bookmark?http://www.indexu.com/how-to-make-slider-work-for-your-template/" rel="nofollow" class="external" title="Add to a lense on Squidoo">Add to a lense on Squidoo</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=How+to+make+slider+work+for+your+template+-+http://b2l.me/y3yD5&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.indexu.com/how-to-make-slider-work-for-your-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Show uploaded image from image custom field</title>
		<link>http://www.indexu.com/show-uploaded-image-from-image-custom-field/</link>
		<comments>http://www.indexu.com/show-uploaded-image-from-image-custom-field/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 06:11:51 +0000</pubDate>
		<dc:creator>dody</dc:creator>
				<category><![CDATA[Custom field]]></category>
		<category><![CDATA[Templates]]></category>
		<category><![CDATA[image upload]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://www.indexu.com/?p=9</guid>
		<description><![CDATA[With custom field, you can have a new data field with image type. In add and modify link form the field will be added automatically.
To show the uploaded image in the listing page and detail page, you need to add the following code in template file: rows.html for listing and detail_link.html for detail page.

&#60;img src=&#34;&#60;%$theimage%&#62;&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>With custom field, you can have a new data field with image type. In add and modify link form the field will be added automatically.</p>
<p>To show the uploaded image in the listing page and detail page, you need to add the following code in template file: <code>rows.html</code> for listing and <code>detail_link.html</code> for detail page.</p>

<div class="wp_codebox"><table><tr id="p934"><td class="code" id="p9code34"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/img.html"><span style="color: #000000; font-weight: bold;">img</span></a> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&lt;%$theimage%&gt;</span></span>&quot; /&gt;</pre></td></tr></table></div>

<p>Change <code><%$theimage%></code> with custom field name you have.</p>


<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center shr-bookmarks-bg-knowledge">
<ul class="socials">
		<li class="shr-blogger">
			<a href="http://www.blogger.com/blog_this.pyra?t&amp;u=http://www.indexu.com/show-uploaded-image-from-image-custom-field/&amp;n=Show+uploaded+image+from+image+custom+field&amp;pli=1" rel="nofollow" class="external" title="Blog this on Blogger">Blog this on Blogger</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://www.indexu.com/show-uploaded-image-from-image-custom-field/&amp;title=Show+uploaded+image+from+image+custom+field" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://www.indexu.com/show-uploaded-image-from-image-custom-field/&amp;t=Show+uploaded+image+from+image+custom+field" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebookmarks">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.indexu.com/show-uploaded-image-from-image-custom-field/&amp;title=Show+uploaded+image+from+image+custom+field" rel="nofollow" class="external" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="shr-squidoo">
			<a href="http://www.squidoo.com/lensmaster/bookmark?http://www.indexu.com/show-uploaded-image-from-image-custom-field/" rel="nofollow" class="external" title="Add to a lense on Squidoo">Add to a lense on Squidoo</a>
		</li>
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=Show+uploaded+image+from+image+custom+field+-+http://b2l.me/y3mjz&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://www.indexu.com/show-uploaded-image-from-image-custom-field/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
