<?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>ZENVERSE</title>
	<atom:link href="http://zenverse.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://zenverse.net</link>
	<description>Design and Web Development</description>
	<lastBuildDate>Tue, 31 Jan 2012 02:46:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Zinx &#8211; Free Premium WordPress Magazine Theme</title>
		<link>http://zenverse.net/zinx-wordpress-theme/</link>
		<comments>http://zenverse.net/zinx-wordpress-theme/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 02:45:31 +0000</pubDate>
		<dc:creator>Zen</dc:creator>
				<category><![CDATA[Free Themes]]></category>
		<category><![CDATA[Wordpress Themes]]></category>
		<category><![CDATA[free wordpress themes]]></category>
		<category><![CDATA[wordpress themes]]></category>

		<guid isPermaLink="false">http://zenverse.net/?p=2451</guid>
		<description><![CDATA[Zinx is my first free theme in 2012, a zebra stripes design wordpress magazine theme with premium features such as animated gallery, post thumbnail, featured video, latest tweets, social bookmark, popular posts and more. Come in to view the demo and list of features.
[download id="66" format="2" autop="false"]]]></description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p>Zinx is my first free theme in 2012, a zebra stripes design wordpress magazine theme with premium features such as animated gallery, post thumbnail, featured video, latest tweets, social bookmark, popular posts and more. View the list of features below.</p>
<p><strong>Type : </strong>Semi Magazine (uses excerpt at blog index)<br />
<strong>Functionality : </strong>Blog</p>
<h3>Features</h3>
<ul>
<li>Fixed width, widget-ready and gravatar-ready</li>
<li>Tested on Chrome, FireFox, IE6, IE8, Opera, Safari.</li>
<li>Tested and working properly up to WordPress 3.2.1</li>
<li>Beautify your blog using Post Thumbnail and Post Image</li>
<li>2 thumbnail system to choose from : &#8220;WordPress&#8217;s Featured Image System&#8221; or &#8220;Zenverse Post Thumbnail &#038; Post Image System&#8221;</li>
<li>Featured Posts displayed using animated slideshow</li>
<li>Built-in Social Sharing buttons in blog index and single page (can be disabled in theme options)</li>
<li>Tabbed Menu with 3 tabs at sidebar</li>
<li>About Us Menu at sidebar</li>
<li>Featured Video at sidebar</li>
<li>Ready for Google Analytics, Adsense and Webmaster Tools</li>
<li>Twitter Integration, display latest tweets at header</li>
<li>Feedburner Integration</li>
<li>Built-in plugins such as page navigation and related posts.</li>
<li>Uses Sexy Bookmark plugin to share your post</li>
<li>Auto determine popular posts based on comment count and display at footer</li>
<li>Four banner ads spots in sidebar</li>
<li>Commented CSS files for easy editing</li>
<li>Powerful Theme Options page at Admin Panel</li>
<li>New Version Notifier feature, you will be notified when there is new version for this theme</li>
</ul>
<h3>Demo</h3>
<p><a title="Zinx has been previewed 210 times." target="_blank" href="/?themedemo=zinx">Preview Zinx (210)</a></p>

<h3>Download<a name="download"></a></h3>
<blockquote><a rel="nofollow" href="http://zenverse.net/wp-content/plugins/download-monitor/download.php?id=66" title="Zinx Premium WordPress Magazine Theme has been downloaded 50 times">Zinx Premium WordPress Magazine Theme 1.0 </a><br />[ Downloaded 50 times | 177.44 KB ]</blockquote>
<p><em>License: Free to us, MUST keep footer intact AS IS </em></p>
<h3>Recommendations for User</h3>
<h5>Manual Excerpt</h5>
<p>To make your blog looks better, you need to include a manual excerpt for every post (like my blog). You can add that while editing or adding new post. You can, however, leave your excerpt empty and wordpress will automatically make an excerpt for you, but all HTML tags would be auto removed.</p>
<h5>Post Image &#038; Thumbnails</h5>
<p>Post Thumbnail is a square image of size 125 x 125 pixels, shown at blog index, related posts and search.<br />
Post Image is an image of size 550 x 190 pixels, shown at single post page, below the post title.<br />
To beautify your blog, try to include post thumbnails for every post (if possible).</p>
<h5>Why there are 2 thumbnail system to choose from?</h5>
<p>All ZenVerse themes already have their own thumbnail system before WordPress introduces Featured Image system in WordPress 2.9. To continue support all Zenverse theme users who were still using the old thumbnail system, we need to keep the old thumbnail system.<br />
You can choose the priority of the thumbnail system being used, seperately for Post Thumbnail and Post Image, in the theme options page.</p>
<h5>Featured Category</h5>
<p>In most cases, not all your featured posts are in the same category. You can create a new category (let&#8217;s say I called it : Featured) and choose it as the &#8220;Featured Category&#8221; at the theme option page.<br />
<a target="_blank" href="http://img42.imageshack.us/img42/5679/featuredguide.gif">Step-by-step guide to activate Featured Gallery</a></p>
<h5>Social Bookmarking using Sexy Bookmarks Plugin</h5>
<p>You need to install <a href="http://wordpress.org/extend/plugins/sexybookmarks/" rel="nofollow" target="_blank">Sexy Bookmark plugin</a> in order to show the social bookmark buttons under &#8220;Share This Post&#8221; menu. Please make sure you set the &#8220;Menu Location&#8221; to &#8220;Manual Mode&#8221; in the plugin settings page.</p>
<h5>WP-PageNavi Plugin Conflict</h5>
<p>Some users reported that WP-PageNavi plugin causes the sidebar and footer to be missing. If you have WP-PageNavi plugin installed, you should deactivate the plugin.</p>
<h3>ChangeLog<a name="changelog"></a></h3>
<p><strong>Version 1.0</strong><br />
- First version</p>
<h3>Theme Support / Edit / Add Features</h3>
<p>Free theme support service has been <b>stopped</b>. If you need some tweaking or want to add features, please <a target="_blank" href="http://zenverse.net/contact/">contact me</a>. *Depending on the matter, you <em>might</em> need to buy me a cup of coffee or 3</p>
<h3>Like this theme? Donate via Paypal</h3>
<p>I spent a lot of time making themes and plugins. If you like this theme and would like to support my works, you can donate via PayPal using the button below.<br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick" />
<input type="hidden" name="hosted_button_id" value="4859745" />
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" />
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
</form></p>
<p>Thank you.</p>
]]></content:encoded>
			<wfw:commentRss>http://zenverse.net/zinx-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>PHP &#8211; Using oEmbed API to Embed Videos</title>
		<link>http://zenverse.net/php-oembed-embed-videos/</link>
		<comments>http://zenverse.net/php-oembed-embed-videos/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 08:53:09 +0000</pubDate>
		<dc:creator>Zen</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://zenverse.net/?p=2445</guid>
		<description><![CDATA[oEmbed is a format for allowing an embedded representation of a URL on third party sites. Which means, if we have a video page's URL, we can easily get the video thumbnail photo, video title, HTML code to embed it in our website and more. But of course, the video site must have oEmbed support in order for us to do that.]]></description>
			<content:encoded><![CDATA[<p>oEmbed is a format for allowing an embedded representation of a URL on third party sites. Which means, if we have a video page&#8217;s URL, we can easily get the video thumbnail photo, video title, HTML code to embed it in our website and more. But of course, the video site must have oEmbed support in order for us to do that. Check out <a rel="nofollow" target="_blank" href="http://oembed.com">http://oembed.com</a> for full documentation.</p>
<h3>Let&#8217;s look at how YouTube oEmbed works</h3>
<p>1. First, send a request to YouTube&#8217;s Oembed API page with a video URL (must be urlencoded) as parameter and we also specified that we want it to be returned in json format.</p>
<blockquote><p><a rel="nofollow" target="_blank" href="http://www.youtube.com/oembed?url=http%3A//www.youtube.com/watch%3Fv%3DbDOYN-6gdRE&#038;format=json">http://www.youtube.com/oembed?url=http%3A//www.youtube.com/watch%3Fv%3DbDOYN-6gdRE&#038;format=json</a>
</p></blockquote>
<p>2. You will then see a long json-encoded string which contains all information about the video.</p>
<p>3. Next thing you need to do is just simply json-decode the string using your programming language, then you are free to use the information. We will see how to do that in PHP.</p>
<h3>Using Oembed to Embed Youtube Videos in PHP</h3>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p2445code1'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p24451"><td class="code" id="p2445code1"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #000088;">$videourl</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'http://www.youtube.com/watch?v=gB4nwqNM190'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$json</span> <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><a href="http://www.php.net/file_get_contents"><span style="color: #990000;">file_get_contents</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'http://www.youtube.com/oembed?url='</span><span style="color: #339933;">.</span><a href="http://www.php.net/urlencode"><span style="color: #990000;">urlencode</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$videourl</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;format=json'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$decode</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/json_decode"><span style="color: #990000;">json_decode</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$json</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$decode</span> <span style="color: #339933;">==</span> <span style="color: #009900; font-weight: bold;">null</span> <span style="color: #339933;">||</span> <span style="color: #339933;">!</span><span style="color: #000088;">$decode</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$error</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	<span style="color: #666666; font-style: italic;">//error control here</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$thumb</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$decode</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'thumbnail_url'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$html</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$decode</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'html'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>It&#8217;s pretty straightforward and self-explanatory:</p>
<ul>
<li>First, we send a url request to YouTube&#8217;s obembed API page using file_get_contents() function.</li>
<li>Second, we decode the response using json_decode() function which convert json format to array.</li>
<li>Third, if there is no error in decoding, we then assign $thumb and $html and use it in our website or program.</li>
</ul>
<h3>Extra: If you want to limit the embedded video&#8217;s width or height</h3>
<p>You can specify the max height or max width by appending the maxwidth or maxheight parameters to the oembed URL. (Please note that this cannot resize a smaller video to bigger size)</p>
<p>For example, from our example above, to specify max width of 300 pixels:</p>
<blockquote><p><a rel="nofollow" target="_blank" href="http://www.youtube.com/oembed?url=http%3A//www.youtube.com/watch%3Fv%3DbDOYN-6gdRE&#038;format=json&#038;maxwidth=300">http://www.youtube.com/oembed?url=http%3A//www.youtube.com/watch%3Fv%3DbDOYN-6gdRE&#038;format=json&#038;maxwidth=300</a></p></blockquote>
<p>You should notice the video embedding code (iframe) is now limited to width of 300 pixels.</p>
<h3>How do I embed videos from other video sites like Vimeo?</h3>
<p>Most of the popular video sites has oEmbed support just like YouTube. For example, by <a target="_blank" href="http://www.google.com/search?q=vimeo+oembed">googling &#8220;vimeo oembed&#8221;</a> we found vimeo oembed documentation.</p>
<p>In vimeo, this is the URL we should send our request to:</p>
<blockquote><p><a rel="nofollow" href="http://vimeo.com/api/oembed.json?url=http%3A//vimeo.com/7100569" target="_blank">http://vimeo.com/api/oembed.json?url=http%3A//vimeo.com/7100569</a></p></blockquote>
<p>More details about oEmbed API page for other video sites will be covered in our next blog post (coming soon).</p>
]]></content:encoded>
			<wfw:commentRss>http://zenverse.net/php-oembed-embed-videos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP MySQL &#8211; Get Next Auto Increment Value of a Table</title>
		<link>http://zenverse.net/php-mysql-next-auto-increment-value/</link>
		<comments>http://zenverse.net/php-mysql-next-auto-increment-value/#comments</comments>
		<pubDate>Sat, 14 Jan 2012 06:05:14 +0000</pubDate>
		<dc:creator>Zen</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://zenverse.net/?p=2404</guid>
		<description><![CDATA[We do not often need this but sometimes when we need to retrieve the next auto increment value of a table (without incrementing the auto increment value of course), this solution below will help.]]></description>
			<content:encoded><![CDATA[<p>We do not often need this but sometimes when we need to retrieve the next auto increment value of a table (without incrementing the auto increment value of course), this solution below will help.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p2404code2'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p24042"><td class="code" id="p2404code2"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #000088;">$query</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/mysql_query"><span style="color: #990000;">mysql_query</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SHOW TABLE STATUS WHERE name='your_table_name_here'&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/mysql_num_rows"><span style="color: #990000;">mysql_num_rows</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/mysql_fetch_assoc"><span style="color: #990000;">mysql_fetch_assoc</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$result</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Auto_increment'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><span style="color: #666666; font-style: italic;">//error</span>
	<span style="color: #666666; font-style: italic;">//error control here</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Just replace &#8220;your_table_name_here&#8221; with your mySQL table name.</p>
<h3>As a Function</h3>
<p>Furthermore, making it a PHP function would make the solution looks clean.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p2404code3'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p24043"><td class="code" id="p2404code3"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> get_next_value<span style="color: #009900;">&#40;</span><span style="color: #000088;">$tablename</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$query</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/mysql_query"><span style="color: #990000;">mysql_query</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SHOW TABLE STATUS WHERE name='&quot;</span><span style="color: #339933;">.</span><a href="http://www.php.net/mysql_real_escape_string"><span style="color: #990000;">mysql_real_escape_string</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tablename</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;'&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://www.php.net/mysql_num_rows"><span style="color: #990000;">mysql_num_rows</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/mysql_fetch_assoc"><span style="color: #990000;">mysql_fetch_assoc</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$result</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'Auto_increment'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><span style="color: #666666; font-style: italic;">//error</span>
		<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//usage</span>
<span style="color: #000088;">$nextval</span> <span style="color: #339933;">=</span> get_next_value<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'your_table_name_here'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://zenverse.net/php-mysql-next-auto-increment-value/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Celebrating Christmas with Google &#8211; &#8220;Let It Snow&#8221;</title>
		<link>http://zenverse.net/google-let-it-snow/</link>
		<comments>http://zenverse.net/google-let-it-snow/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 05:09:02 +0000</pubDate>
		<dc:creator>Zen</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://zenverse.net/?p=2388</guid>
		<description><![CDATA[This year Google is celebrating christmas with the world. Try searching for "Let It Snow" at google.com and you will see snowflakes start falling from top of the page. Few seconds later, your page will be covered by a layer of snow where you can draw anything you want on the screen. Clicking the blue "Defrost" button will bring the page back to normal, except that snowflakes still continue to fall.]]></description>
			<content:encoded><![CDATA[<p>This year Google is celebrating christmas with the world. Try searching for &#8220;<a href="http://www.google.com/search?q=let+it+snow" target="_blank">Let It Snow</a>&#8221; at google.com and you will see snowflakes start falling from top of the page. Few seconds later, your page will be covered by a layer of snow where you can draw anything you want on the screen. Clicking the blue &#8220;Defrost&#8221; button will bring the page back to normal, except that snowflakes still continue to fall.</p>
<p><a href="http://zenverse.net/wp-content/uploads/2011/12/letitsnow.jpg"><img src="http://zenverse.net/wp-content/uploads/2011/12/letitsnow.jpg" alt="" title="letitsnow" width="600" height="429" class="alignnone size-full wp-image-2393" /></a></p>
<p>Also, check out Google&#8217;s previous trick: <a href="http://zenverse.net/do-a-barrel-roll-fun-google-search-trick/">Do a Barrel Roll</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zenverse.net/google-let-it-snow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ocean Wave &#8211; Free Premium WordPress Magazine Theme</title>
		<link>http://zenverse.net/oceanwave-wordpress-theme/</link>
		<comments>http://zenverse.net/oceanwave-wordpress-theme/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 17:10:14 +0000</pubDate>
		<dc:creator>Zen</dc:creator>
				<category><![CDATA[Free Themes]]></category>
		<category><![CDATA[Wordpress Themes]]></category>
		<category><![CDATA[free wordpress themes]]></category>
		<category><![CDATA[wordpress themes]]></category>

		<guid isPermaLink="false">http://zenverse.net/?p=2383</guid>
		<description><![CDATA[OceanWave is my last free theme of 2011, it is a wordpress magazine theme with premium features such as animated gallery, post thumbnail, featured video, latest tweets, social bookmark, popular posts and more. Come in to view the demo and list of features.
[download id="65" format="2" autop="false"]]]></description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p>OceanWave is my last free theme of 2011, it a wave-design wordpress magazine theme with premium features such as animated gallery, post thumbnail, featured video, latest tweets, social bookmark, popular posts and more. View the list of features below.</p>
<p><strong>Type : </strong>Semi Magazine (uses excerpt at blog index)<br />
<strong>Functionality : </strong>Blog</p>
<h3>Features</h3>
<ul>
<li>Fixed width, widget-ready and gravatar-ready</li>
<li>Tested on Chrome, FireFox, IE6, IE8, Opera, Safari.</li>
<li>Tested and working properly up to WordPress 3.2.1</li>
<li>Beautify your blog using Post Thumbnail and Post Image</li>
<li>2 thumbnail system to choose from : &#8220;WordPress&#8217;s Featured Image System&#8221; or &#8220;Zenverse Post Thumbnail &#038; Post Image System&#8221;</li>
<li>Featured Posts displayed using animated slideshow</li>
<li>Built-in Social Sharing buttons in blog index and single page (can be disabled in theme options)</li>
<li>Tabbed Menu with 3 tabs at sidebar</li>
<li>About Us Menu at sidebar</li>
<li>Featured Video at sidebar</li>
<li>Ready for Google Analytics, Adsense and Webmaster Tools</li>
<li>Twitter Integration, display latest tweets at header</li>
<li>Feedburner Integration</li>
<li>Built-in plugins such as page navigation and related posts.</li>
<li>Uses Sexy Bookmark plugin to share your post</li>
<li>Auto determine popular posts based on comment count and display at footer</li>
<li>Four banner ads spots in sidebar</li>
<li>Commented CSS files for easy editing</li>
<li>Powerful Theme Options page at Admin Panel</li>
<li>New Version Notifier feature, you will be notified when there is new version for this theme</li>
</ul>
<h3>Demo</h3>
<p><a title="OceanWave has been previewed 2189 times." target="_blank" href="/?themedemo=oceanwave">Preview OceanWave (2189)</a></p>

<h3>Download<a name="download"></a></h3>
<blockquote><a rel="nofollow" href="http://zenverse.net/wp-content/plugins/download-monitor/download.php?id=65" title="Ocean Wave WordPress Theme has been downloaded 458 times">Ocean Wave WordPress Theme 1.1.1 </a><br />[ Downloaded 458 times | 147.82 KB ]</blockquote>
<p><em>License: Free to use must keep footer intact AS IS </em></p>
<h3>Recommendations for User</h3>
<h5>Manual Excerpt</h5>
<p>To make your blog looks better, you need to include a manual excerpt for every post (like my blog). You can add that while editing or adding new post. You can, however, leave your excerpt empty and wordpress will automatically make an excerpt for you, but all HTML tags would be auto removed.</p>
<h5>Post Image &#038; Thumbnails</h5>
<p>Post Thumbnail is a square image of size 125 x 125 pixels, shown at blog index, related posts and search.<br />
Post Image is an image of size 550 x 190 pixels, shown at single post page, below the post title.<br />
To beautify your blog, try to include post thumbnails for every post (if possible).</p>
<h5>Why there are 2 thumbnail system to choose from?</h5>
<p>All ZenVerse themes already have their own thumbnail system before WordPress introduces Featured Image system in WordPress 2.9. To continue support all Zenverse theme users who were still using the old thumbnail system, we need to keep the old thumbnail system.<br />
You can choose the priority of the thumbnail system being used, seperately for Post Thumbnail and Post Image, in the theme options page.</p>
<h5>Featured Category</h5>
<p>In most cases, not all your featured posts are in the same category. You can create a new category (let&#8217;s say I called it : Featured) and choose it as the &#8220;Featured Category&#8221; at the theme option page.<br />
<a target="_blank" href="http://img42.imageshack.us/img42/5679/featuredguide.gif">Step-by-step guide to activate Featured Gallery</a></p>
<h5>Social Bookmarking using Sexy Bookmarks Plugin</h5>
<p>You need to install <a href="http://wordpress.org/extend/plugins/sexybookmarks/" rel="nofollow" target="_blank">Sexy Bookmark plugin</a> in order to show the social bookmark buttons under &#8220;Share This Post&#8221; menu. Please make sure you set the &#8220;Menu Location&#8221; to &#8220;Manual Mode&#8221; in the plugin settings page.</p>
<h5>WP-PageNavi Plugin Conflict</h5>
<p>Some users reported that WP-PageNavi plugin causes the sidebar and footer to be missing. If you have WP-PageNavi plugin installed, you should deactivate the plugin.</p>
<h3>ChangeLog<a name="changelog"></a></h3>
<p><strong>Version 1.1.1</strong><br />
- Fixed a bug &#8211; wrong rss feed link at sidebar<br />
- Changed files: header.php, functions.php, sidebar.php and style.css (updated version number only)</p>
<p><strong>Version 1.1</strong><br />
- Fixed a bug where comment feature is not working when related post is enabled.<br />
- Changed files: functions.php and style.css (updated version number only)</p>
<p><strong>Version 1.0</strong><br />
- First version</p>
<h3>Theme Support / Edit / Add Features</h3>
<p>Free theme support service has been <b>stopped</b>. If you need some tweaking or want to add features, please <a target="_blank" href="http://zenverse.net/contact/">contact me</a>. *Depending on the matter, you <em>might</em> need to buy me a cup of coffee or 3</p>
<h3>Like this theme? Donate via Paypal</h3>
<p>I spent a lot of time making themes and plugins. If you like this theme and would like to support my works, you can donate via PayPal using the button below.<br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick" />
<input type="hidden" name="hosted_button_id" value="4859745" />
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" />
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" />
</form></p>
<p>Thank you.</p>
]]></content:encoded>
			<wfw:commentRss>http://zenverse.net/oceanwave-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>[WordPress] How to Exclude Certain Categories From RSS Feed, Home, Search Page and More</title>
		<link>http://zenverse.net/wordpress-exclude-categories/</link>
		<comments>http://zenverse.net/wordpress-exclude-categories/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 06:49:35 +0000</pubDate>
		<dc:creator>Zen</dc:creator>
				<category><![CDATA[Wordpress Development]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://zenverse.net/?p=2375</guid>
		<description><![CDATA[Sometimes we need to exclude a few unimportant categories from our main feed or other pages. A quick search through the web, you will arrive at wprecipes' tutorial, which unfortunately happens to be erroneous because wrong function was used (as of 15 Dec 2011). Anyway, in this blogpost I am gonna show how to exclude categories in RSS Feed, as well as Homepage, Search Page and more.

There are a number of ways to achieve what we want, but the best and cleanest method is to exclude using WordPress Action Hook.]]></description>
			<content:encoded><![CDATA[<p>Sometimes we need to exclude a few unimportant categories from our main feed or other wordpress pages. A quick search through the web, you will arrive at wprecipes&#8217; tutorial, which unfortunately happens to be erroneous because wrong function was used (as of 15 Dec 2011). Anyway, in this blogpost I am gonna show how to exclude categories in RSS Feed, as well as Homepage, Search Page and more.</p>
<p>There are a number of ways to achieve what we want, but the best and cleanest method is to exclude using WordPress Action Hook: <a href="http://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts" target="_blank">pre_get_posts</a>. Using this action hook, we can easily exclude any categories in all wordpress generated pages.</p>
<h3>Exclude Certain Categories from RSS Feed</h3>
<p>First thing you need to do is find the category IDs that you want to hide. WPrecipes <a href="http://www.wprecipes.com/how-to-find-wordpress-category-id" target="_blank">explains this</a> pretty well.</p>
<p>Let&#8217;s say you want to exclude category 3, 4 and 5. Open your theme&#8217;s functions.php, paste these codes:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p2375code4'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p23754"><td class="code" id="p2375code4"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> mytheme_exclude_cats<span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_feed</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'cat'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'-3,-4,-5'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//seperate by comma</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$query</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'pre_get_posts'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'mytheme_exclude_cats'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<ul>
<li><strong><u>pre_get_posts</u></strong> is an action hook that is triggered everytime before wordpress actually retrieve post from database. Therefore, we can tell wordpress to exclude certain categories.</li>
<li><strong><u>$query</u></strong> is a wordpress query object that carries information about current query: how many post to show, what categories to show to exclude, at which page does this query runs, etc.<br />
If you are familiar with writing custom query using WP_Query(), $query is actually the parameters of <a href="http://codex.wordpress.org/Class_Reference/WP_Query#Interacting_with_WP_Query" target="_blank">WP_Query</a>.</li>
<li><strong><u>$query->is_feed</u></strong> carries boolean value of TRUE only when you are in Feed Page.</li>
</ul>
<p>You can run var_dump($query) inside the function to learn more about what the object holds.</p>
<h3>Exclude Certain Categories from Homepage</h3>
<p>Just simply change &#8220;is_feed&#8221; to &#8220;is_home&#8221;:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p2375code5'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p23755"><td class="code" id="p2375code5"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> mytheme_exclude_cats<span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_home</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'cat'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'-3,-4,-5'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//seperate by comma</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$query</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'pre_get_posts'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'mytheme_exclude_cats'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<h3>Exclude from other places</h3>
<p>Just simply change &#8220;is_feed&#8221; to the following:</p>
<p>is_feed &#8211; in RSS feed page<br />
is_home &#8211; in blog homepage<br />
is_category &#8211; in category page<br />
is_tag &#8211; in tag page<br />
is_search &#8211; in search page<br />
is_comment_feed &#8211; in comment RSS feed page<br />
is_author &#8211; in author archive page</p>
<h3>Exclude Specific Categories from more than 1 pages</h3>
<p>For example, to exclude category 3, 4 and 5 in both RSS Feed and Search page, it will be just as easy as:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p2375code6'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p23756"><td class="code" id="p2375code6"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> mytheme_exclude_cats<span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_search</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">is_feed</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$query</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'cat'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'-3,-4,-5'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//seperate by comma</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$query</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
add_action<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'pre_get_posts'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'mytheme_exclude_cats'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://zenverse.net/wordpress-exclude-categories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Smart Date Function &#8211; Display Time Elapsed (Difference) Based on a Given Timestamp</title>
		<link>http://zenverse.net/php-smart-date-function/</link>
		<comments>http://zenverse.net/php-smart-date-function/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 04:43:29 +0000</pubDate>
		<dc:creator>Zen</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://zenverse.net/?p=2371</guid>
		<description><![CDATA[As a web developer, we often need to display dates in our website. As a web user myself, I don't like to read full dates like "26 November 2011 11:30PM" because it takes me a little while to interpret the date. I prefer reading smart dates like "1 hour ago" or "6 months ago". Therefore, here I wrote a quick and simple function in PHP that display the time difference/elapsed based on a given timestamp value.]]></description>
			<content:encoded><![CDATA[<p>As a web developer, we often need to display dates in our website. As a web user myself, I don&#8217;t like to read full dates like &#8220;26 November 2011 11:30PM&#8221; because it takes me a little while to interpret the date. I prefer reading smart dates like &#8220;1 hour ago&#8221; or &#8220;6 months ago&#8221;. Therefore, here I wrote a quick and simple function in PHP that display the time difference/elapsed based on a given timestamp value.</p>
<h3>PHP Smart Date Function</h3>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p2371code7'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p23717"><td class="code" id="p2371code7"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/*
Simple PHP Smart Date Function
by Zen (http://zenverse.net)
*/</span>
<span style="color: #000000; font-weight: bold;">function</span> smartdate<span style="color: #009900;">&#40;</span><span style="color: #000088;">$timestamp</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$diff</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/time"><span style="color: #990000;">time</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$timestamp</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$diff</span> <span style="color: #339933;">&lt;=</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'Now'</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$diff</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> grammar_date<span style="color: #009900;">&#40;</span><a href="http://www.php.net/floor"><span style="color: #990000;">floor</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$diff</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">' second(s) ago'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$diff</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">60</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> grammar_date<span style="color: #009900;">&#40;</span><a href="http://www.php.net/floor"><span style="color: #990000;">floor</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$diff</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">' minute(s) ago'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$diff</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">60</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">60</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">24</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> grammar_date<span style="color: #009900;">&#40;</span><a href="http://www.php.net/floor"><span style="color: #990000;">floor</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$diff</span><span style="color: #339933;">/</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">60</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">' hour(s) ago'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$diff</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">60</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">60</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">24</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">30</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> grammar_date<span style="color: #009900;">&#40;</span><a href="http://www.php.net/floor"><span style="color: #990000;">floor</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$diff</span><span style="color: #339933;">/</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">60</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">60</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">24</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">' day(s) ago'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$diff</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">60</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">60</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">24</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">30</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">12</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> grammar_date<span style="color: #009900;">&#40;</span><a href="http://www.php.net/floor"><span style="color: #990000;">floor</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$diff</span><span style="color: #339933;">/</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">60</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">60</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">24</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">30</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">' month(s) ago'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> grammar_date<span style="color: #009900;">&#40;</span><a href="http://www.php.net/floor"><span style="color: #990000;">floor</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$diff</span><span style="color: #339933;">/</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">60</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">60</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">24</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">30</span><span style="color: #339933;">*</span><span style="color: #cc66cc;">12</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">' year(s) ago'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> grammar_date<span style="color: #009900;">&#40;</span><span style="color: #000088;">$val</span><span style="color: #339933;">,</span> <span style="color: #000088;">$sentence</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$val</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$val</span><span style="color: #339933;">.</span><a href="http://www.php.net/str_replace"><span style="color: #990000;">str_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'(s)'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'s'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$sentence</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$val</span><span style="color: #339933;">.</span><a href="http://www.php.net/str_replace"><span style="color: #990000;">str_replace</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'(s)'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$sentence</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Basically I defined 2 functions above:<br />
<strong>smartdate</strong> &#8211; calculates the difference between given timestamp and current time, then returns the correct sentence<br />
<strong>grammar_date</strong> &#8211; modifies the returned sentence to plural form or singular form</p>
<h3>Usage</h3>
<p>The usage is simple and straightforward.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p2371code8'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p23718"><td class="code" id="p2371code8"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//example 1</span>
<span style="color: #b1b100;">echo</span> smartdate<span style="color: #009900;">&#40;</span><span style="color: #000088;">$yourtimestamp</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//example 2</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Posted on '</span><span style="color: #339933;">.</span>smartdate<span style="color: #009900;">&#40;</span><span style="color: #000088;">$yourtimestamp</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>By default, this function returns the floor() value, i.e: instead of returning &#8220;1.7 years ago&#8221;, it returns &#8220;1 year ago&#8221;. Anyway, the function can be easily modified to suit your specific needs.</p>
<h3>Give users the choice to view the full date</h3>
<p>1 disadvantage of smart date is of course, it reduces the level of detail and granularity of the date information. For example, dates of 13 months ago or 19 months ago will both be displayed as &#8220;1 year ago&#8221;.</p>
<p>The most common way to let user view the full date is to add a &#8220;title&#8221; attribute with full date as the attribute value. Now, when user mouseover your smart date, they can see the full date popping up as tooltip. Facebook uses this approach.</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p2371code9'); return false;">View Code</a> PHP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p23719"><td class="code" id="p2371code9"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//from example 2 above</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'Posted on &lt;span title=&quot;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$originalfulldate</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot;&gt;'</span> <span style="color: #339933;">.</span> smartdate<span style="color: #009900;">&#40;</span><span style="color: #000088;">$yourtimestamp</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/span&gt;'</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://zenverse.net/php-smart-date-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cat-Ears &#8211; Free Social Bookmark Buttons &amp; Logo [PSD + PNG]</title>
		<link>http://zenverse.net/cat-ears-free-social-bookmark-buttons/</link>
		<comments>http://zenverse.net/cat-ears-free-social-bookmark-buttons/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 02:22:32 +0000</pubDate>
		<dc:creator>Zen</dc:creator>
				<category><![CDATA[Freebies]]></category>
		<category><![CDATA[Icons Pack]]></category>
		<category><![CDATA[Resources]]></category>

		<guid isPermaLink="false">http://zenverse.net/?p=2364</guid>
		<description><![CDATA[This is a set of free social bookmark icons in cat-ears design. I made them when I am bored. They are ready to be downloaded and used right away. Change the colour of the icons using the "Hue/Saturation" layer to match your design. Hide the "cat ears" layer if you don't like them :)]]></description>
			<content:encoded><![CDATA[<p>This is a set of free social bookmark icons in cat-ears design. I made them when I am bored. They are ready to be downloaded and used right away. Change the colour of the icons using the &#8220;Hue/Saturation&#8221; layer to match your design. Hide the &#8220;cat ears&#8221; layer if you don&#8217;t like them <img src='http://zenverse.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3>Preview</h3>
<p><img src="http://zenverse.net/wp-content/uploads/2011/12/cat-ears_icons.jpg" alt="Cat-Ears Free Social Bookmark Icons by zenverse.net" /></p>
<h3>Download</h3>
<p>The zip file contains 1 PSD and 1 PNG file.</p>
<blockquote><a rel="nofollow" href="http://zenverse.net/wp-content/plugins/download-monitor/download.php?id=64" title="Cat-Ears - Free Social Bookmark Buttons & Logo [PSD + PNG] has been downloaded 92 times">Cat-Ears - Free Social Bookmark Buttons & Logo [PSD + PNG] </a><br />[ Downloaded 92 times | 517.37 KB ]</blockquote>
<p>Comments are appreciated. Enjoy the pack and share it to your friends <img src='http://zenverse.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>License: <a target="_blank" rel="nofollow" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 Unported License</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zenverse.net/cat-ears-free-social-bookmark-buttons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cannot Access Localhost After Editing etc/hosts and Flushing DNS Cache</title>
		<link>http://zenverse.net/cannot-access-localhost-after-editing-etchosts-flush-cache/</link>
		<comments>http://zenverse.net/cannot-access-localhost-after-editing-etchosts-flush-cache/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 16:23:42 +0000</pubDate>
		<dc:creator>Zen</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://zenverse.net/?p=2354</guid>
		<description><![CDATA[I was developing a new website that uses Facebook Login as the membership system. I came across this situation where I needed to create a "fake" domain by editing the etc/hosts file. Somehow, after editing the etc/hosts file (following an online guide), I cannot seems to browse http://localhost in my browser anymore. However, I can still browse my local apache server using http://127.0.0.1]]></description>
			<content:encoded><![CDATA[<p>I was developing a new website that uses Facebook Login as the membership system. I came across this situation where I needed to create a &#8220;fake&#8221; domain by editing the etc/hosts file. Somehow, after editing the etc/hosts file (following an online guide), I cannot seems to browse http://localhost in my browser anymore. However, I can still browse my local apache server using http://127.0.0.1</p>
<blockquote><p><strong>NOTE:</strong><br />
This is not XAMPP / apache issue<br />
This is not browser-specific issue
</p></blockquote>
<p>In fact, this is a simple problem with simple solution. However, this problem occurs when I am getting frustrated with the Facebook integration problem (after 12 hours of debugging). Therefore, I missed some simple but important steps to solve this problem. Here I list them down below:</p>
<h3>1. Ping Localhost</h3>
<p>For Mac OS users, open up your Terminal. For windows users, open up your command prompt.</p>
<ul>
<li>Type the &#8220;ping localhost&#8221; and press enter.</li>
<li>You should get error messages like &#8220;unknown host&#8221; since you are having this problem.</li>
</ul>
<ul>
<li>Next, type &#8220;ping 127.0.0.1&#8243; and press enter.</li>
<li>If you saw something like this, the ping is successful:

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p2354code10'); return false;">View Code</a> CMD</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p235410"><td class="code" id="p2354code10"><pre class="cmd" style="font-family:monospace;">PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.118 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.171 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.167 ms</pre></td></tr></table></div>

</li>
<li>If you get &#8220;unknown host error&#8221;, please check whether you have started your local server service.</li>
</ul>
<h3>2. Clear your browser cache</h3>
<p>Modern browsers cache a lot of stuff, including DNS cache. They may have cached the erroneous DNS setting in etc/hosts, so you might want to clear your browsers cache and try loading localhost again. Clearing cache alone would already be sufficient, you can skip clearing cookies, saved session, etc.</p>
<p>If it still doesn&#8217;t work, try #3 below.</p>
<h3>3. Did you just flushed the DNS cache?</h3>
<p>I ran this command in terminal (Mac) to flush my cache before I get into this mess: &#8220;dscacheutil -flushcache&#8221;<br />
For some reason, after I flushed the cache, the DNS setting is not being rebuilt &#8211; I cannot ping localhost but I can ping 127.0.0.1</p>
<p>After restarting my laptop (to rebuild the DNS settings &#038; cache) and clearing all browser cache once again, I finally get my localhost displayed again.</p>
<p>Now I hope this helps some of you.</p>
]]></content:encoded>
			<wfw:commentRss>http://zenverse.net/cannot-access-localhost-after-editing-etchosts-flush-cache/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Legacy Facebook &#8220;Share&#8221; Button Codes (Bubble Count, Box Count and More)</title>
		<link>http://zenverse.net/legacy-facebook-share-button-code/</link>
		<comments>http://zenverse.net/legacy-facebook-share-button-code/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 16:12:32 +0000</pubDate>
		<dc:creator>Zen</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[facebook]]></category>

		<guid isPermaLink="false">http://zenverse.net/?p=2329</guid>
		<description><![CDATA[Few months ago, Facebook removed the page that allow us to generate codes for their official "Share" button. They replaced it with <a href="https://developers.facebook.com/docs/reference/plugins/like" target="_blank">"Like" button</a> instead. While "Like" button is fast and easy but we cannot add our comment along with the "Like" action. Therefore, in some cases, we still need the old Share button. Fortunately, the sharer.php still exists, so we can add the Share button using Facebook's official script.]]></description>
			<content:encoded><![CDATA[<p>Few months ago, Facebook removed the page that allow us to generate codes for their official &#8220;Share&#8221; button. They replaced it with <a href="https://developers.facebook.com/docs/reference/plugins/like" target="_blank">&#8220;Like&#8221; button</a> instead. While &#8220;Like&#8221; button is fast and easy but we cannot add our comment along with the &#8220;Like&#8221; action. Therefore, in some cases, we still need the old Share button. Fortunately, the sharer.php still exists, so we can add the Share button using Facebook&#8217;s official script.</p>
<p>Here are the complete codes for all sizes of Facebook share button for those who are interested:</p>
<h3>Box Count</h3>
<p><a name="fb_share" type="box_count" href="http://www.facebook.com/sharer.php">Share</a> &nbsp;*count will only visible when there is at least 1 share</p>
<div class="clear"></div>
<p>Codes:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p2329code11'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p232911"><td class="code" id="p2329code11"><pre class="html" style="font-family:monospace;">&lt;a name=&quot;fb_share&quot; type=&quot;box_count&quot; href=&quot;http://www.facebook.com/sharer.php&quot;&gt;Share&lt;/a&gt;
&lt;script src=&quot;http://static.ak.fbcdn.net/connect.php/js/FB.Share&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</pre></td></tr></table></div>

<h3>Button Count</h3>
<p><a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php">Share</a> *count will only visible when there is at least 1 share</p>
<p>Codes:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p2329code12'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p232912"><td class="code" id="p2329code12"><pre class="html" style="font-family:monospace;">&lt;a name=&quot;fb_share&quot; type=&quot;button_count&quot; href=&quot;http://www.facebook.com/sharer.php&quot;&gt;Share&lt;/a&gt;
&lt;script src=&quot;http://static.ak.fbcdn.net/connect.php/js/FB.Share&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</pre></td></tr></table></div>

<h3>Button only</h3>
<p><a name="fb_share" type="button" href="http://www.facebook.com/sharer.php">Share</a></p>
<p>Codes:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p2329code13'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p232913"><td class="code" id="p2329code13"><pre class="html" style="font-family:monospace;">&lt;a name=&quot;fb_share&quot; type=&quot;button&quot; href=&quot;http://www.facebook.com/sharer.php&quot;&gt;Share&lt;/a&gt;
&lt;script src=&quot;http://static.ak.fbcdn.net/connect.php/js/FB.Share&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</pre></td></tr></table></div>

<h3>Small Icon only</h3>
<p><a name="fb_share" type="icon" href="http://www.facebook.com/sharer.php">Share</a></p>
<p>Codes:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p2329code14'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p232914"><td class="code" id="p2329code14"><pre class="html" style="font-family:monospace;">&lt;a name=&quot;fb_share&quot; type=&quot;icon&quot; href=&quot;http://www.facebook.com/sharer.php&quot;&gt;Share&lt;/a&gt;
&lt;script src=&quot;http://static.ak.fbcdn.net/connect.php/js/FB.Share&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</pre></td></tr></table></div>

<h3>Custom URL?</h3>
<p>All codes above &#8220;shares&#8221; the current page. If you want to share another page or a specific page, you need to add a &#8220;share_url&#8221; attribute to the &lt;a> tag. You need this too when you have multiple share buttons in a single page.</p>
<p>Example below shares our main website http://zenverse.net instead of this page.</p>
<p><a name="fb_share" type="button_count" share_url="http://zenverse.net" href="http://www.facebook.com/sharer.php">Share</a></p>
<p>Here&#8217;s how:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p2329code15'); return false;">View Code</a> HTML</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p232915"><td class="code" id="p2329code15"><pre class="html" style="font-family:monospace;">&lt;a name=&quot;fb_share&quot; type=&quot;button_count&quot; share_url=&quot;http://zenverse.net&quot; href=&quot;http://www.facebook.com/sharer.php&quot;&gt;Share&lt;/a&gt;
&lt;script src=&quot;http://static.ak.fbcdn.net/connect.php/js/FB.Share&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</pre></td></tr></table></div>

<h3>Multiple Share Buttons</h3>
<p>If you have multiple share buttons in a single page, you just need to include the &lt;script> element <b>once</b>.</p>
<p>Hope this helps.</p>
<p><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://zenverse.net/legacy-facebook-share-button-code/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

