Hana Code Insert

V.2.0 (7/20/2009) : PHP evaluation settings can be set within the option page. Editor Helper Dialog button is added for easier insert. If you are upgrading , you should enable the PHP execution option from the option page if you were using PHP eval function previously.

V.1.5 (1/16/2009) : There was issue with the form and textarea tag . It is fixed now. Also, there is a ‘Remove All’ button now that you can remove all code entries if you have any issue.

Inserting some javascript or Html codes in the middle of an article is not an easy task. It’s hard to copy and paste bunch of codes into the article whenever you write an article. Sometimes, the code breaks and doesn’t work as intended because WordPress encodes HTML entities.

So I decided to come up with the plugin that will help me insert that AdSense or Paypal Donation code into the middle of article.

Hana Code Insert v2.0
V2.0 : New features to insert quick tags easily while posting a blog.

hanacode_button1

hanacode_button2


Now with my plugin, Hana Code Insert, you can easily insert any complicated HTML and JAVASCRIPT code or even custom PHP output in your Wordpress article. Useful for adding AdSense and Paypal donation code in the middle of the WP article. You can manage multiple code entries.

After the plugin installation, you would setup the HTML or Javascript entries in the ‘Hana Code Insert’ Settings menu. Simply define a unique name and paste the complicated codes copied from AdSense or Paypal into the textarea. Then click on the ‘Create a new entry’ button.

After the creation, you can find that the newly added entry is shown in the bottom. Copy the usage code example and insert it in your article. That’s all.

Basically, you can place the specific tag element [hana-code-insert name='...' /] in your wordpress article to show the codes. The ‘name’ attribute is mandatory where you use the name of the code entry that you want to show.

For example, after you setup a code entry in the admin Settings with the name ‘AdSense’, you can invoke the code by using below element in your article.

[hana-code-insert name='AdSense' /]

Below is the Admin Settings (Options) Screen for ‘Hana Code Insert’. Four code entries are defined.
hana-code-insert-image
Here are the actual working samples.

[hana-code-insert name='donation' /]


[hana-code-insert name='donation with amount' /]

Did you enjoy my article or software? Thank you for the donation.
US $

[hana-code-insert name='adsense' /]

Now this is an actual example showing the current local time. If you refresh the page, you can see that the time changes and reflecting the latest time. This is not javascript, but created by PHP codes inserted in the middle of this blog! (Note that if you have Super Cache plugin installed and enabled, this PHP code may not work correctly.)

Result

10/02/2009 19:49:34

Here is the actual code used when setting up in the Settings/Options page with name “php example”.

print "
<div style="border:1px dotted red; padding: 5px;">";
print date("m/d/Y H:i:s");
print "</div>
";

And here is the text inserted in the middle of the article.

[hana-code-insert name='php example' /]

Thank you.

For the support, please visit Support Forum

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • MySpace
  • StumbleUpon
  • Technorati
  • Twitter