<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="http://www.majordojo.com/projects/FeedManager/atom.xsl" type="text/xsl" media="screen"?>
<feed xmlns="http://www.w3.org/2005/Atom" 
      xmlns:thr="http://purl.org/syndication/thread/1.0">
  <link rel="alternate" type="text/html" href="http://www.majordojo.com/2005/12/how-to-install-a-widget-via-a.php" />
  <link rel="self" type="application/atom+xml" href="http://www.majordojo.com/2005/12/how-to-install-a-widget-via-a.php" />
  <id>tag:www.majordojo.com,2010://3/tag:www.majordojo.com,2005://3.2479-</id>
  <updated></updated>
  <title>Comments for How to install a widget via a plugin</title>
  <subtitle>A blog about Movable Type, technology, geek-dom, science-fiction and yes, sometimes my personal life.</subtitle>
  <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.261</generator>
  <entry>
    <id>tag:www.majordojo.com,2005://3.2479</id>
    <link rel="alternate" type="text/html" href="http://www.majordojo.com/2005/12/how-to-install-a-widget-via-a.php" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.majordojo.com/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=3/entry_id=2479" title="How to install a widget via a plugin" />
    <published>2005-12-22T07:29:25Z</published>
    <updated>2007-08-26T06:45:31Z</updated>
    <title>How to install a widget via a plugin</title>
    <summary>Sidebar Manager is not just a plugin, it is a platform. One of the core principals of Sidebar Manager is to provide other plugin developers with a tool they can leverage in delivering cool functionality to their users. For example,...</summary>
    <author>
      <name>Byrne</name>
      <uri>http://www.majordojo.com/</uri>
    </author>
    
    <content type="html" xml:lang="en" xml:base="http://www.majordojo.com/">
      <![CDATA[<p>Sidebar Manager is not just a plugin, it is a platform. One of the core principals of Sidebar Manager is to provide other plugin developers with a tool they can leverage in delivering cool functionality to their users. For example, suppose you are <a href="http://code.appnel.com/">Tim Appnel</a>. You could have your <a href="http://code.appnel.com/feeds-app#buynow">Feeds.App plugin</a> install an RSS feed widget into Movable Type. Users could then add that widget to their sidebar in a click of a button, using the Sidebar Manager plugin and platform.</p>

<p>The following is a snippet of Perl code that shows how to create a sidebar widget that can be integrated with Sidebar Manager. As you can see, all you need to do is create a template module with a name prefixed by &#8220;Sidebar: &#8221; and Sidebar Manager will assume it is a side widget to be manipulated.</p>

<pre><code>require MT::Template;
my $tmpl = MT::Template-&gt;new;
$tmpl-&gt;blog_id($blog_id);
$tmpl-&gt;type('custom');
&lt;b&gt;$tmpl-&gt;name('Sidebar: Example Widget');&lt;/b&gt;
$tmpl-&gt;text(&lt;&lt;END_TMPL);
Your template code goes here.
END_TMPL
$tmpl-&gt;save;
</code></pre>
]]>
      

    </content>
  </entry>

</feed>
