<?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>WP Marketing &#187; Hana Code Insert</title>
	<atom:link href="http://wpmarketing.org/tag/hana-code-insert/feed/" rel="self" type="application/rss+xml" />
	<link>http://wpmarketing.org</link>
	<description>Wordpress for Internet and Affiliate Marketing</description>
	<lastBuildDate>Mon, 07 May 2012 02:18:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Hana Code Insert v2.2</title>
		<link>http://wpmarketing.org/2009/10/hana-code-insert-v2-2/</link>
		<comments>http://wpmarketing.org/2009/10/hana-code-insert-v2-2/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 18:53:41 +0000</pubDate>
		<dc:creator>HanaDaddy</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Wordpress Plugins]]></category>
		<category><![CDATA[Hana Code Insert]]></category>
		<category><![CDATA[PHP evaluation]]></category>
		<category><![CDATA[shotcode]]></category>

		<guid isPermaLink="false">http://wpmarketing.org/?p=299</guid>
		<description><![CDATA[v2.2 (10/04/2009) : 1. PHP code content evaluation Some modification on PHP evaluation that you can use &#60;?php and ?&#62; within the entry content for PHP evaluation. So, in the previous version, if you wanted PHP code output, you could not use &#60;?php and ?&#62;. But now you can use them inside the entry item. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>v2.2 (10/04/2009)</strong> : </p>
<p><strong>1. PHP code content evaluation</strong><br />
Some modification on PHP evaluation that you can use <code>&lt;?php</code> and <code>?&gt;</code> within the entry content for PHP evaluation. </p>
<p>So, in the previous version, if you wanted PHP code output, you could not use <code>&lt;?php</code> and <code>?&gt;</code>. But now you can use them inside the entry item.</p>
<p>Previously you could only define PHP codes only.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;&lt;div style='border:1px dotted red; padding: 5px;'&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">print</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;m/d/Y H:i:s&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;&lt;/div&gt;&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p>But now, below code will work too.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;div style='border:1px dotted red; padding: 5px;'&gt;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">print</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;m/d/Y H:i:s&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>
&lt;/div&gt;</pre></div></div>

<p><img src="http://wpmarketing.org/wp-content/uploads/2009/10/entry_content.jpg" alt="entry_content" title="entry_content" width="558" height="146" class="aligncenter size-full wp-image-307" /></p>
<p><strong>2. Custom ShortCode</strong><br />
Also extra feature for custom short code is added. You can define your own custom short code prefix and post fix. So you don&#8217;t have to use <code>&#91;hana-code-insert]</code> shortcode any more.</p>
<p>If defined, custom short code format can be used instead of <code>&#91;hana-code-insert name='Entry Name' /]</code>. For example, if you define <code>{{</code> for start indicator, <code>}}</code> for end indicator, you can use <code>{{Entry Name}}</code>. But beware, your new shortcode format may conflict with other plugins and cause one or more plugins to fail.<br />
<span id="more-299"></span><br />
There are some restrictions. <code>^</code> and <code>\</code> characters are not allowed. And start and end indicators should not be used part of entry name. HTML comment tag is a good candidate for the customs shortcodes indicators. (Start indicator <code>&lt;!--</code> , End indicator : <code>--&gt;</code>) In this way, even if the Hana Code Insert is disabled, these shortcodes will not show this way.</p>
<p>Hana Code Insert Admin Setting Screen.<br />
<img src="http://wpmarketing.org/wp-content/uploads/2009/10/shortcode_setting.jpg" alt="shortcode_setting" title="shortcode_setting" width="561" height="186" class="aligncenter size-full wp-image-313" /></p>
<p>Some of the tested custom Short Codes in a post.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">===================
[[testing123]]
===================
~~testing123~~
===================
{{testing123}}
===================
This time it uses html comment.
&lt;!-- testing123 --&gt;
===================
&nbsp;
[ hana-code-insert name='testing123' /]</pre></div></div>

<p>Below is the output. Note that <code>&#91;hana-code-insert]</code> always works regardless of whether using customs shortcode or not.<br />
<img src="http://wpmarketing.org/wp-content/uploads/2009/10/shortcode_testing2.jpg" alt="shortcode_testing2" title="shortcode_testing2" width="457" height="355" class="aligncenter size-full wp-image-315" /></p>
<p>I am planning to implement Text Widget Support and enhancement in the Admin settings screen in the next version. (Additional description to recognize code snippet better, Search Fuction, etc..)</p>
<p>Enjoy! Let me know if you experience any problem.</p>
<div style='font-size:1.6em'><a href='http://wpmarketing.org/forum/forum/wp-plugin-hana-code-insert'>Hana Code Insert Forum</a></div>
]]></content:encoded>
			<wfw:commentRss>http://wpmarketing.org/2009/10/hana-code-insert-v2-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hana Code Insert Example 1: List of sub pages or sub categories</title>
		<link>http://wpmarketing.org/2009/10/hana-code-insert-example-1-list-of-sub-pages-or-sub-categories/</link>
		<comments>http://wpmarketing.org/2009/10/hana-code-insert-example-1-list-of-sub-pages-or-sub-categories/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 12:36:31 +0000</pubDate>
		<dc:creator>HanaDaddy</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Wordpress Plugins]]></category>
		<category><![CDATA[code snippet]]></category>
		<category><![CDATA[Hana Code Insert]]></category>
		<category><![CDATA[sub categories]]></category>
		<category><![CDATA[sub pages]]></category>

		<guid isPermaLink="false">http://wpmarketing.org/2009/10/hana-code-insert-example-1-list-of-sub-pages-or-sub-categories/</guid>
		<description><![CDATA[Hello, this is HanaDaddy and I would like to show you how to quickly add some quick sub categories or sub pages within a page or a post. For all of you that do not know what Hana Code Insert Plugin is, it&#8217;s a simple plugin that enables you to add piece of codes (HTML, [...]]]></description>
			<content:encoded><![CDATA[<p>Hello, this is HanaDaddy and I would like to show you how to quickly add some quick sub categories or sub pages within a page or a post. For all of you that do not know what Hana Code Insert Plugin is, it&#8217;s a simple plugin that enables you to add piece of codes (HTML, Javascript, or even PHP) in the middle of post or page. You can use it to add AdSense, Paypal donation button, HTLM forms, Analytics, or anything.</p>
<p>First, you need to install <a href="http://wpmarketing.org/plugins/hana-code-insert/">Hana Code Insert Plugin</a>.</p>
<p>Once you installed and activated the plugin, visit the Settings =&gt; Hana Code Insert option page. Activate the &#8216;Enable PHP Execution &#8216; check box. You need to enable this checkbox to use PHP. Then create an entry by inserting below code This is to show sub page of the current post.</p>
<p>You should not define &lt;?php or ?&gt; and need to enable ‘Evaluate as php code’ when you create the code entry. Please refer to below image for more info.</p>
<p><a href="http://wpmarketing.org/wp-content/uploads/2009/10/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" src="http://wpmarketing.org/wp-content/uploads/2009/10/image_thumb.png" border="0" alt="image" width="544" height="154" /></a><br />
<span id="more-276"></span><br />
This function will allow to show the list sub pages. Please note that $post variable has to be defined with ‘global’ modifier. The current post’s ID number is used as one of the function argument.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$post</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$children</span> <span style="color: #339933;">=</span> wp_list_pages<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'title_li=&amp;child_of='</span><span style="color: #339933;">.</span><span style="color: #000088;">$post</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ID</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;echo=0'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$children</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;ul&gt;<span style="color: #006699; font-weight: bold;">$children</span>&lt;/ul&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Now once you created the code entry, insert the hana code short code in the parent page.</p>
<p><a href="http://wpmarketing.org/wp-content/uploads/2009/10/image1.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" src="http://wpmarketing.org/wp-content/uploads/2009/10/image_thumb1.png" border="0" alt="image" width="544" height="170" /></a></p>
<p>Then click on the Hana Code Button to insert the code that we just created.</p>
<p><a href="http://wpmarketing.org/wp-content/uploads/2009/10/image2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" src="http://wpmarketing.org/wp-content/uploads/2009/10/image_thumb2.png" border="0" alt="image" width="544" height="242" /></a></p>
<p><a href="http://wpmarketing.org/wp-content/uploads/2009/10/image3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" src="http://wpmarketing.org/wp-content/uploads/2009/10/image_thumb3.png" border="0" alt="image" width="544" height="177" /></a></p>
<p>This is the output.</p>
<p><a href="http://wpmarketing.org/wp-content/uploads/2009/10/image4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" src="http://wpmarketing.org/wp-content/uploads/2009/10/image_thumb4.png" border="0" alt="image" width="544" height="216" /></a></p>
<p>Just like this, you can show the list of categories or sub categories within a post or page.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//Shows full list categories except 10.</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;ul&gt;&quot;</span><span style="color: #339933;">;</span>
wp_list_categories<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'orderby=name&amp;show_count=1&amp;exclude=10'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/ul&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">//Shows the child categories of category 8.</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;ul&gt;&quot;</span><span style="color: #339933;">;</span>
wp_list_categories<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'orderby=id&amp;show_count=1&amp;use_desc_for_title=0&amp;child_of=8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/ul&gt;&quot;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Category ID or Page ID can be found by inspecting the URL of category or page edit links.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://wpmarketing.org/wp-content/uploads/2009/10/image5.png" border="0" alt="image" width="392" height="44" /></p>
<p>For more informaiton, here are the wordpress reference pages for wp_list_pages and wp_list_categories function.<br />
<a href="http://codex.wordpress.org/wp_list_pages">http://codex.wordpress.org/wp_list_pages</a><br />
<a href="http://codex.wordpress.org/Template_Tags/wp_list_categories">http://codex.wordpress.org/Template_Tags/wp_list_categories</a></p>
<p></p>
<p style='font-size:1.6em'><a href='http://wpmarketing.org/forum/forum/wp-plugin-hana-code-insert'>Hana Code Insert Forum</a></p>
]]></content:encoded>
			<wfw:commentRss>http://wpmarketing.org/2009/10/hana-code-insert-example-1-list-of-sub-pages-or-sub-categories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced

Served from: wpmarketing.org @ 2012-05-21 16:13:53 -->
