<?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>Techspiration &#187; jMaki</title>
	<atom:link href="http://www.blog.karthikbala.com/tag/jmaki/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blog.karthikbala.com</link>
	<description>Technology, Spirituality and Rationality</description>
	<lastBuildDate>Sat, 03 Apr 2010 15:21:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>jMaki widgets for WordPress</title>
		<link>http://www.blog.karthikbala.com/jmaki-widgets-for-wordpress/</link>
		<comments>http://www.blog.karthikbala.com/jmaki-widgets-for-wordpress/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 17:58:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[jMaki]]></category>
		<category><![CDATA[accordion]]></category>
		<category><![CDATA[widget]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.blog.karthikbala.com/?p=13</guid>
		<description><![CDATA[Accordion to display links. It allows you to provide multiple panes and display them one at a time. It is like having several Collapsible Panels where only one can be expanded at a time.]]></description>
			<content:encoded><![CDATA[<div class="entry-content">
<p>For those who doesn’t know <a href="https://ajax.dev.java.net/">jMaki</a>,</p>
<p>“jMaki is an Ajax framework that provides a lightweight model for creating JavaScript centric Ajax-enabled web applications using Java, Ruby, PHP, and Phobos.”</p>
<p>i call it a widgetting framework, jMaki provides widgets which are the wrappers to the most popular javascript libraries like Dojo, Scriptaculous, Google, Yahoo etc… These wrappers are available for PHP and JSP which makes it very easy to add those javascript libraries to your PHP or JSP applications.</p>
<p>To a trial I started adding jMaki accordion widget to my wordpress blog which has turned to a WordPress plugin (<a href="http://wordpress.org/extend/plugins/jmaki-accordion/">download</a>)</p>
<p><a href="http://www.karthikbala.com/wp-content/uploads/2008/07/jmaki-accordion-screenshot.bmp"><img class="alignnone size-medium wp-image-12" title="jmaki-accordion-screenshot" src="file:///home/karthik/Desktop/karthikbala.com/search_files/jmaki-accordion-screenshot.html" alt="" /></a></p>
<p>If you want to add other jMaki widgets to your blog, first go through the article:<br />
<a href="http://lonewolf-online.net/computers/knowledgebase/wordpress-how-to-create-widgets">wordpress-how-to-create-widgets</a><br />
which will explain you of the basics of creating a WordPress plugin.</p>
<p>By now if you have gone through the above article you should be knowing how to say ‘Hello World’ from your sidebar. Now at the place(method) where you have written</p>
<div class="wp_syntax">
<div class="code">
<pre class="language" style="font-family: monospace;">echo "Hello World";</pre>
</div>
</div>
<p>you need to replace that with the jMaki code which will look like this:</p>
<div class="wp_syntax">
<div class="code">
<pre class="language" style="font-family: monospace;">addWidget( array(
                          "name" =&gt; "jmaki.accordionMenu",
                       "style"=&gt;"{height:40em}",
                          "value" =&gt;"{
                           menu : [
                           {label:  'Blogs',
                                menu: [
                                    { label : ' Greg Murray',
                                      href : 'http://weblogs.java.net/blog/gmurray71/'
                                    },
                                    { label : 'J Naveen',
                                      href : 'http://jaininaveen.blogspot.com/'
                                    },
                                    { label : 'Prashanth Ellina',
                                      href : 'http://blog.prashanthellina.com/'
                                    },
                                    { label : 'Carla Mott',
                                      href : 'http://weblogs.java.net/blog/carlavmott/'
                                    },
                                    { label : 'Arun Gupta',
                                      href : 'http://blogs.sun.com/arungupta/'
                                    },
                                     { label : 'Vikraman',
                                      href : 'http://vikraman.blogspot.com/'
                                    }
                                    ]
                           },
                           {label: 'Sites',
                                menu: [
                                    { label : 'TollyZone',
                                      href : 'http://jmaki.<strong style="color: black; background-color: #ffff66;">karthikbala.com</strong>/tollyzone'
                                     },
                                    { label : 'Zenmocha',
                                      href : 'http://www.zenmocha.com'
                                    },
                                    { label : 'TechSpirit',
                                      href : 'http://www.<strong style="color: black; background-color: #ffff66;">karthikbala.com</strong>'
                                    },
                                    { label : 'Indian Capitals',
                                      href : 'http://indiancapitals.com'
                                    }
                                    ]
                           }
                                    ]
                       }"
            ) );</pre>
</div>
</div>
<p>The above code is for the accordion widget, it differs from widget to widget, you can find them from <a href="http://wiki.java.net/bin/view/Projects/jMakiDataModels">here</a> and before that u want to download jMaki from <a href="https://ajax.dev.java.net/files/documents/3115/94868/jmaki-php-1.8.0.zip">here</a> but the above piece of code depends on other file called jmaki.php which you can add to your plugin directory and import that in this file by adding the line</p>
<div class="wp_syntax">
<div class="code">
<pre class="language" style="font-family: monospace;"> require_once("jmaki.php") ;</pre>
</div>
</div>
<p>but i got a problem saying permission denied to access files, for which i need to set variables in ‘php.ini’ which is not preferred when writing a plugin, so smartly i added the required function in jmaki.php to mywidget.php. Still jmaki.php inturn calls other javascript functions which comes with jmaki-min.js which inturn make use of other files.The directory structure for a widget jmaki.accordion should be like this:</p>
<div class="wp_syntax">
<div class="code">
<pre class="language" style="font-family: monospace;">/- accordion
    |
    +-accordion.php
    |
    +-resources
    |    |
    |    +-jmaki.js
    |    |
    |    +-config.json
    |    |
    |    +-jmaki
    |        |
    |        +-accordion
    |        |    |
    |        |    +-component.css
    |        |    |
    |        |    +-component.js
    |        |    |
    |        |    +-component.htm
    |        |
    |        +-resources
    |             |
    |             +styles
    |                |
    |                +-themes
    |                     |
    |                     +-theme.css</pre>
</div>
</div>
<p>You can find all those required files from the jmaki package you downloaded. <a href="http://www.ajax.dev.java.net/">jMaki</a> website has got good documentation to start over.</p>
<p>Note:<a href="http://wordpress.org/extend/plugins/jmaki-accordion/">jmaki-accordion widget</a> is in <a href="http://stack5.com/en/top-50-wordpress-plugins/">top 50 wordpress plugins</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.blog.karthikbala.com/jmaki-widgets-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
