<?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 &#187; Templates</title>
	<atom:link href="http://www.indexu.com/category/templates/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>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<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 [...]]]></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>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 [...]]]></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 [...]]]></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 [...]]]></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>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 [...]]]></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="p1226"><td class="code" id="p12code26"><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="p1227"><td class="code" id="p12code27"><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="p1228"><td class="code" id="p12code28"><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="p1229"><td class="code" id="p12code29"><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="p1230"><td class="code" id="p12code30"><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. [...]]]></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="p932"><td class="code" id="p9code32"><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>
		<item>
		<title>Failed to load trackclick.js.php</title>
		<link>http://www.indexu.com/failed-to-load-trackclick-js-php/</link>
		<comments>http://www.indexu.com/failed-to-load-trackclick-js-php/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 17:56:31 +0000</pubDate>
		<dc:creator>dody</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Templates]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://www.indexu.com/?p=3</guid>
		<description><![CDATA[Today a user report that the outgoing hits doesn&#8217;t work on portal_dir template. A quick check: 1) footer.html 11 &#60;script language=&#34;javascript&#34; type=&#34;text/javascript&#34; src=&#34;&#60;%$tpl_base%&#62;/trackclick.js.php&#34;&#62;&#60;/script&#62; 2) check whenever trackclick.js.php file exist in template folder. 3) check the link that count has proper &#8220;name&#8221; attribute If everything look good, then it should work well. However in this user [...]]]></description>
			<content:encoded><![CDATA[<p>Today a user report that the outgoing hits doesn&#8217;t work on <code>portal_dir</code> template.</p>
<p>A quick check:<br />
1) <code>footer.html</code></p>

<div class="wp_codebox"><table><tr id="p336"><td class="line_numbers"><pre>11
</pre></td><td class="code" id="p3code36"><pre class="html4strict" style="font-family:monospace;"><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;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;javascript&quot;</span> <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>/trackclick.js.php&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></pre></td></tr></table></div>

<p>2) check whenever <code>trackclick.js.php</code> file exist in template folder.<br />
3) check the link that count has proper &#8220;<code>name</code>&#8221; attribute</p>
<p>If everything look good, then it should work well.</p>
<p>However in this user case it doesn&#8217;t work well. Somehow trackclick.js.php never been loaded. When I rename to .js file, it work well. When I try to load from other template folder (komet or kosmos), then it work well. So it should be the file access permission, the <code>.htaccess</code> file. For me, <code>.htaccess</code> file seems good too. So I decide to do a quick fix for this installation.</p>
<p>1) edit <code>footer.html</code> to load <code>trackclick.js</code> (instead of .php file)</p>

<div class="wp_codebox"><table><tr id="p337"><td class="line_numbers"><pre>11
</pre></td><td class="code" id="p3code37"><pre class="html4strict" style="font-family:monospace;"><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;">language</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;javascript&quot;</span> <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>/trackclick.js.php&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></pre></td></tr></table></div>

<p>2) rename <code>trackclick.js.php</code> to <code>trackclick.js</code><br />
3) edit <code>trackclick.js</code></p>

<div class="wp_codebox"><table><tr id="p338"><td class="line_numbers"><pre>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
</pre></td><td class="code" id="p3code38"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> base <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://www.domainname.com&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> indexulinks <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;a&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> indexulinks.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>indexulinks<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #000066;">name</span> <span style="color: #339933;">!=</span> <span style="color: #3366CC;">''</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>indexulinks<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #000066;">name</span>.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;link&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span> <span style="color: #339933;">||</span> indexulinks<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #000066;">name</span>.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;cat&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!=</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		indexulinks<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">onclick</span> <span style="color: #339933;">=</span> indexu_click<span style="color: #339933;">;</span>
    indexulinks<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">oncontextmenu</span> <span style="color: #339933;">=</span> indexu_click<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">function</span> indexu_click<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">images</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    img <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Image<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    img.<span style="color: #660066;">src</span> <span style="color: #339933;">=</span> base<span style="color: #339933;">+</span><span style="color: #3366CC;">&quot;/trackclick.php?id=&quot;</span> <span style="color: #339933;">+</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #000066;">name</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #003366; font-weight: bold;">var</span> date <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">do</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #003366; font-weight: bold;">var</span> curDate <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
      curDate <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Date<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: #000066; font-weight: bold;">while</span><span style="color: #009900;">&#40;</span>curDate<span style="color: #339933;">-</span>date <span style="color: #339933;">&lt;</span> <span style="color: #CC0000;">300</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    date <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
    curDate <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
  <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#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/failed-to-load-trackclick-js-php/&amp;n=Failed+to+load+trackclick.js.php&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/failed-to-load-trackclick-js-php/&amp;title=Failed+to+load+trackclick.js.php" 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/failed-to-load-trackclick-js-php/&amp;t=Failed+to+load+trackclick.js.php" 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/failed-to-load-trackclick-js-php/&amp;title=Failed+to+load+trackclick.js.php" 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/failed-to-load-trackclick-js-php/" 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=Failed+to+load+trackclick.js.php+-+http://b2l.me/ynwpk&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/failed-to-load-trackclick-js-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

