<?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>Public MindWordpress</title>
	<atom:link href="http://publicmind.in/blog/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://publicmind.in/blog</link>
	<description>Simple and Sophisticated</description>
	<lastBuildDate>Fri, 27 May 2011 08:28:30 +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>WordPress: Fixing the broken links from Jetpack top stats</title>
		<link>http://publicmind.in/blog/wordpress-fixing-the-broken-links-from-jetpack/</link>
		<comments>http://publicmind.in/blog/wordpress-fixing-the-broken-links-from-jetpack/#comments</comments>
		<pubDate>Sat, 23 Apr 2011 18:27:38 +0000</pubDate>
		<dc:creator>Nitin</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://publicmind.in/blog/?p=757</guid>
		<description><![CDATA[I use the upgraded awesome plugin Jetpack by WordPress.com to show the &#8216;Top Posts&#8217; is the sidebar. I recently noticed that the links for these post were broken, even though I wasn&#8217;t doing anything wrong at all. I queried the plugin for top 5 posts using: $top_posts = stats_get_csv('postviews', 'days=-1&#38;limit=6&#38;summarize'); echo '&#60;ul class=&#34;most-viewed&#34;&#62;'; &#160; foreach [...]]]></description>
			<content:encoded><![CDATA[<p>I use the upgraded awesome plugin Jetpack by WordPress.com to show the &#8216;Top Posts&#8217; is the sidebar. I recently noticed that the links for these post were broken, even though I wasn&#8217;t doing anything wrong at all. I queried the plugin for top 5 posts using:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$top_posts = stats_get_csv('postviews', 'days=-1&amp;limit=6&amp;summarize');<br />
echo '&lt;ul class=&quot;most-viewed&quot;&gt;';<br />
&nbsp; foreach ( $top_posts as $p ) {<br />
&nbsp; &nbsp; if($p['post_id'])<br />
&nbsp; &nbsp; &nbsp; echo '&lt;li&gt;&lt;a href=&quot;'. $p['post_permalink'] .'&quot; title=&quot;'. <br />
&nbsp; &nbsp; &nbsp; &nbsp; $p['post_title']. '&quot;&gt;'. $p['post_title'] .'&lt;/a&gt; - &lt;strong&gt;'. $p['views'] . '&lt;/strong&gt; views&lt;/li&gt;';<br />
&nbsp; }<br />
echo '&lt;/ul&gt;';</div></div>
<p>But somehow, the value at <em>post_permalink</em> key was wrong. Instead of pulling out my hair, I downloaded the Jetpack plugin&#8217;s source code, opened the file <em>stats.php</em> and copied a few lines and now the following works awesomely well.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">if ( function_exists('stats_get_csv') &amp;&amp; $top_posts = stats_get_csv('postviews', 'days=-1&amp;limit=6&amp;summarize')) {<br />
&nbsp; echo '&lt;ul class=&quot;most-viewed&quot;&gt;';<br />
&nbsp; foreach ( $top_posts as $p ) {<br />
&nbsp; &nbsp; if($p['post_id'] &amp;&amp; get_post($p['post_id']))<br />
&nbsp; &nbsp; &nbsp; echo '&lt;li&gt;&lt;a href=&quot;' . get_permalink( $post['post_id'] ) . '&quot;&gt;' . <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; get_the_title( $post['post_id'] ) . '&lt;/a&gt;', number_format_i18n( $post['views'] ) &lt;/li&gt;';<br />
&nbsp; }<br />
&nbsp; echo '&lt;/ul&gt;';<br />
}</div></div>
<p>I hope this helps people looking for a quick fix to this problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://publicmind.in/blog/wordpress-fixing-the-broken-links-from-jetpack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: WP ShareThisPost</title>
		<link>http://publicmind.in/blog/wordpress-sharethispost/</link>
		<comments>http://publicmind.in/blog/wordpress-sharethispost/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 22:12:31 +0000</pubDate>
		<dc:creator>Nitin</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[bookmarking]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[sharing]]></category>

		<guid isPermaLink="false">http://publicmind.in/blog/?p=386</guid>
		<description><![CDATA[Although the third party bookmarking and sharing tools are quite useful to analyze the sharing trends on your blog, they do slow down the whole process of sharing. Also, as mentioned in my Sharing and Bookmarking Tools post, I was not comfortable with the small icons available with Bookmarkify and Socialable. WP ShareThisPost is a [...]]]></description>
			<content:encoded><![CDATA[<p>Although the third party bookmarking and sharing tools are quite useful to analyze the sharing trends on your blog, they do slow down the whole process of sharing. Also, as mentioned in my <a title="Sharing and Bookmarking Tools" href="http://publicmind.in/blog/share-bookmark-tools/">Sharing and Bookmarking Tools</a> post, I was not comfortable with the small icons available with Bookmarkify and Socialable. <strong>WP ShareThisPost</strong> is a small custom wordpress plugin which provides large icons along with the flexibility to add your favorite sharing and bookmarking sites (if not included by default).</p>
<p><strong>WP ShareThisPost</strong> includes the following sharing and bookmarking sites, by default:</p>
<ul>
<li>del.icio.us</li>
<li>Digg</li>
<li>Google Bookmarks</li>
<li>StumbleUpon</li>
<li>Facebook</li>
<li>Twitter</li>
<li>Technorati</li>
</ul>
<p><span id="more-386"></span><br />
Go through the readme.txt file to know how you can customize <strong>WP ShareThisPost</strong> to include more of your favorite sharing and bookmarking sites.</p>
<p><strong>WP ShareThisPost</strong>, by default, only adds the sharing and bookmarking links at the end of posts. You can see the readme.txt file to see how you can change that to include pages, archives, feeds, etc.</p>
<p><a href='https://sourceforge.net/projects/wpsharethispost/' title='WP ShareThisPost'><img src='http://publicmind.in/blog/wp-content/uploads/downloadbutton.gif' alt='Download' /></a></p>
<h2><strong>Installation</strong></h2>
<p>Upload the unzipped folder into the plugins folder of your wordpress installation (usually /wp-content/plugins), activate it and you are ready to go. You will see the desired links below each of your posts:</p>
<p style="text-align: center;">
<div id="attachment_388" class="wp-caption aligncenter" style="width: 478px"><a href="http://publicmind.in/blog/wp-content/uploads/2010/01/wp_sharethispost.jpg"><img class="size-full wp-image-388 " title="WP ShareThisPost" src="http://publicmind.in/blog/wp-content/uploads/2010/01/wp_sharethispost.jpg" alt="WP ShareThisPost" width="468" height="91" /></a><p class="wp-caption-text">WP ShareThisPost</p></div>
<h2>Styling</h2>
<p>I use this CSS to style my WP ShareThisPost, adapt as you wish of course by changing the wp_sharethispost.css file:</p>
<div class="codecolorer-container css default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:500px;"><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #cc00cc;">#content</span> <span style="color: #6666ff;">.wp_sharethispost</span> ul <span style="color: #00AA00;">&#123;</span><br />
<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><br />
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">12px</span> !important<span style="color: #00AA00;">;</span><br />
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> !important<span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
<span style="color: #cc00cc;">#content</span> <span style="color: #6666ff;">.wp_sharethispost</span> ul li <span style="color: #00AA00;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span><br />
<span style="color: #000000; font-weight: bold;">display</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">inline</span> !important<span style="color: #00AA00;">;</span><br />
<span style="color: #000000; font-weight: bold;">list-style-type</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span><br />
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><br />
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">2px</span> <span style="color: #cc66cc;">0</span> <span style="color: #933;">2px</span> <span style="color: #933;">15px</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
<span style="color: #cc00cc;">#content</span> <span style="color: #6666ff;">.wp_sharethispost</span> li<span style="color: #3333ff;">:before </span><span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">content</span><span style="color: #00AA00;">:</span> <span style="color: #ff0000;">&quot;&quot;</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span><br />
<span style="color: #cc00cc;">#content</span> <span style="color: #6666ff;">.wp_sharethispost</span> img <span style="color: #00AA00;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span><br />
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">48px</span><span style="color: #00AA00;">;</span><br />
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span> <span style="color: #933;">48px</span><span style="color: #00AA00;">;</span><br />
<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><br />
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><br />
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
<span style="color: #cc00cc;">#content</span> <span style="color: #6666ff;">.wp_sharethispost</span> <span style="color: #6666ff;">.wp_sharethispost_tagline</span> <span style="color: #00AA00;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1.5em</span><span style="color: #00AA00;">;</span><br />
<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#486472</span><span style="color: #00AA00;">;</span><br />
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span> <span style="color: #933;">10px</span> <span style="color: #933;">10px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://publicmind.in/blog/wordpress-sharethispost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress: Security check for your Blog</title>
		<link>http://publicmind.in/blog/security-wordpress-blog/</link>
		<comments>http://publicmind.in/blog/security-wordpress-blog/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 22:58:30 +0000</pubDate>
		<dc:creator>Nitin</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://publicmind.in/blog/?p=113</guid>
		<description><![CDATA[Most of the bloggers ignore various security loop-holes in their WordPress installation, thinking that the chances of Crackers intruding their small and unpopular websites are slim. Never even think of this. No one is going to check your page rank or Alexa rank before hacking your site, so better secure it now than to regret [...]]]></description>
			<content:encoded><![CDATA[<p>Most of the bloggers ignore various security loop-holes in their WordPress installation, thinking that the chances of Crackers intruding their small and unpopular websites are slim. Never even think of this. No one is going to check your page rank or Alexa rank before hacking your site, so better secure it now than to regret later. There are a lot of wordpress plugins that will do the job for most users. But if you are a freak like me, keep reading to know how to secure your blog without installing any wordpress plugin.</p>
<p>Here is a list of methods that will enhance the security of your blog:<br />
<span id="more-113"></span></p>
<ol>
<li><strong>Default admin username:</strong><br />
<strong>Problem:</strong> Everyone knows that there exists an <em>admin</em> user in WordPress which has the almighty powers to destroy everything, so they are left with just guessing their passwords. Why not make it a little tough for them, change the username to something else other than <em>admin</em>.<br />
<strong>Standard Solution:</strong> Create a new user with administrative privileges and delete the default admin user. Before you delete a user account, you can transfer all the posts and links to another user.</p>
<div id="attachment_146" class="wp-caption aligncenter" style="width: 484px"><img class="size-full wp-image-146" title="wp-delete" src="http://publicmind.in/blog/wp-content/uploads/2009/04/wp-delete1.png" alt="Before deleting a user, you can attribute all posts and links to another author." width="474" height="200" /><p class="wp-caption-text">Before deleting a user, you can attribute all posts and links to another author.</p></div>
<p><strong>Geeky Solution:</strong> You can perform an SQL query or directly change the username via phpmyadmin. Here is the SQL query:</p>
<div class="codecolorer-container c default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="c codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;UPDATE <span style="color: #ff0000;">'wp_users'</span> SET <span style="color: #ff0000;">'user_login'</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'NEWUSERNAME'</span> WHERE <span style="color: #ff0000;">'wp_users'</span>.<span style="color: #ff0000;">'ID'</span> <span style="color: #339933;">=</span><span style="color: #0000dd;">1</span> <span style="color: #339933;">;</span></div></div>
<p>You can also create another user with only publishing permissions. A second user gives greater security, that name will be displayed in all future published articles and commentaries, and the name of the actual administrator will never be displayed on blog pages and therefore never communicated to the outside world.</li>
<li><strong>Folder and File Permissions: </strong>Make sure that you have given only those permissions to your files that are required by the web applications to work properly. Most famous and safe permissions are 755 for folders and 644 for files.</li>
<li><strong>Folder Public Browsing: </strong>Go to http://YOURBLOGURL/wp-content/plugins. If you don&#8217;t see anything you can safely proceed to the next step but if you are shocked to see the whole list of plugins you are using on your site, then its a sign of danger.<br />
<strong>Standard Solution:</strong> Hide your files by adding an empty index.php file into your critical folders   specially plugins, themes and wp-content.<br />
<strong>Geeky Solution:</strong> You can add the following line into your .htaccess file in order to prevent access to the file list of any folder not having an index file:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Options All -Indexes</div></div>
</li>
<li><strong>Protect wp-admin Directory:</strong><br />
Proceed with this step, only if you know what you are doing.</p>
<ol>
<li> <strong>IP protect wp-admin:</strong> You can block all IPs from accessing wp-admin directory except your IP address. Add the following code to your .htaccess file:
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">AuthUserFile <span style="color: #339933;">/</span>dev<span style="color: #339933;">/</span><span style="color: #009900; font-weight: bold;">null</span><br />
AuthGroupFile <span style="color: #339933;">/</span>dev<span style="color: #339933;">/</span><span style="color: #009900; font-weight: bold;">null</span><br />
AuthName <span style="color: #0000ff;">&quot;WP Access Control&quot;</span><br />
AuthType Basic<br />
order deny<span style="color: #339933;">,</span>allow<br />
deny from all<br />
allow from xx<span style="color: #339933;">.</span>xx<span style="color: #339933;">.</span>xx<span style="color: #339933;">.</span>xx<br />
allow from xx<span style="color: #339933;">.</span>xx<span style="color: #339933;">.</span>xx<span style="color: #339933;">.</span>xx</div></div>
<p>Here xx.xx.xx.xx is your IP address. You can add multiple IP addresses to allow access from.</li>
<li><strong>Password Protect wp-admin directory:</strong> You can add a second layer of authentication to the wp-admin folder, which will be controlled by your web server. So that whenever you try to login, you will have to authenticate yourself twice (Hows that!!!)<br />
<strong>Standard Solution:</strong> If your your web host provides you with a cPanel, then the work is half done for you. Just Click on &#8220;Password protected Directories&#8221; link on your cPanel&#8217;s homepage, select the directory to password protect, enter the username and password and done!!<br />
<strong>Geeky Solution:</strong>
<ol>
<li>Visit <a href="http://www.htaccesstools.com/htpasswd-generator/">Htaccess Tools Htpasswd Generator</a></li>
<li>Enter a username and password for your password protected directory.</li>
<li>Create a .htpasswd file in the folder which is inaccessible by anybody (say /home/USERNAME).</li>
<li>Copy the line created by step 1 and paste it in the .htpasswd file created in step 2.</li>
<li>Create a .htaccess file in your wp-admin folder and copy the following code into it:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">AuthType Basic<br />
AuthName &quot;Admin&quot;<br />
AuthUserFile &quot;PATH_TO_.HTPASSWD_FILE/.htpasswd&quot;<br />
require valid-user</div></div>
</li>
</ol>
<p>Now every time you will login, you will be asked for this extra authentication.</li>
</ol>
</li>
<li>
<strong>Protect wp-config.php file:</strong> This is the most important file in the wordpress installation as it contains the username and password of the database associated with your blog. Add the following lines to the .htaccess file in your blog&#8217;s root directory to deny any kind of access to this file through your web server.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;files wp-config.php&gt;<br />
Order deny,allow<br />
deny from all<br />
&lt;/files&gt;</div></div>
</li>
<li>
<strong>Edit Robots.txt: </strong>You can prevent access to your wordpress folders by adding the following line to the <em>robots.txt</em> in your blog&#8217;s root directory.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Disallow: /wp-*</div></div>
<p>This will ensure that the good guys (like Google, Bing, Yahoo, etc) never index your wordpress folders.
</li>
</ol>
<p>Along with this, always keep your wordpress blog, plugins and themes updated to their latest version. And do I need to ask you to backup and backup and backup your blog, you never know when another Tsunami, Rita, Katrina will strike the Data Centers of your web host and you will be left with nothing but an apology.</p>
<p>Enjoy secure blogging!! And do not forget to share your tips on secure blogging in the comments!!</p>
]]></content:encoded>
			<wfw:commentRss>http://publicmind.in/blog/security-wordpress-blog/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

