<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Article RSS Feed</title>
    <link>http://soxbox.no-ip.org/radiant/rss/</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Radiant On Crack is an experimental branch of the Radiant CMS</description>
    
    
        <item>
          <title>Installing the part_attachments Extension</title>
          <description>&lt;p&gt;
I really should have updated this earlier. I've renamed my attachments extension. Full installation instructions are:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
   cd RAILS_ROOT/vendor/extensions
   svn co http://soxbox.no-ip.org/radiant/svn/extensions/admin_parts/
   svn co http://soxbox.no-ip.org/radiant/svn/extensions/part_attachments/
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
If you want to have all the image manipulation goodness, you'll also need fleximage and rmagick installed.
&lt;/p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
   cd RAILS_ROOT/vendor/plugins
   svn co http://beautifulpixel.com/svn/plugins/flex_image
   gem install rmagick
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;
I'm pretty sure the rest of the information in the last two blog posts is accurate.
&lt;/p&gt;
</description>
          <pubDate>Tue, 06 Feb 2007 10:08:00 GMT</pubDate>
          <guid>http://soxbox.no-ip.org/radiant/articles/2007/02/06/installing-the-part_attachments-extension/</guid>
          <link>http://soxbox.no-ip.org/radiant/articles/2007/02/06/installing-the-part_attachments-extension/</link>
        </item>
    
        <item>
          <title>Page Asset Management II</title>
          <description>I&amp;#8217;ve now finished:
	&lt;ul&gt;
	&lt;li&gt;a way to upload asset for a page that hasn&amp;#8217;t been created yet. 
If you upload an asset and subsequently don&amp;#8217;t save the page, it&amp;#8217;s still 
left orphaned though (probably just have a rake task to clean.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Caching. Currently using the exact same mechanism as the rest of radiant
(ie. 5 minute expiry and stored in yaml files). Not the best approach for
either large assets or manipulated images.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;So that leaves:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;a nice way to edit/delete images&lt;/li&gt;
		&lt;li&gt;validation&lt;/li&gt;
		&lt;li&gt;tests&lt;/li&gt;
		&lt;li&gt;confidence that you can use this without screwing up your data/life/mind.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;But I&amp;#8217;ll probably put those off for the moment.&lt;/p&gt;</description>
          <pubDate>Tue, 02 Jan 2007 17:09:00 GMT</pubDate>
          <guid>http://soxbox.no-ip.org/radiant/articles/2007/01/02/page-asset-management-ii/</guid>
          <link>http://soxbox.no-ip.org/radiant/articles/2007/01/02/page-asset-management-ii/</link>
        </item>
    
        <item>
          <title>Page Asset Management</title>
          <description>&lt;p&gt;I&amp;#8217;ve been toiling away at another Asset Management extension &amp;#8211; originally I started just playing round with Keith Bingham&amp;#8217;s extension, but I&amp;#8217;m pretty much dumped all that code now.&lt;/p&gt;


	&lt;p&gt;&lt;a href=&quot;http://soxbox.no-ip.org/radiant/svn/extensions/part_assets&quot;&gt;http://soxbox.no-ip.org/radiant/svn/extensions/part_assets&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;This extension requires that you&amp;#8217;re running on the mental branch, and
that you also have my admin_parts extension installed:&lt;/p&gt;


	&lt;p&gt;&lt;a href=&quot;http://dev.radiantcms.org/svn/radiant/branches/mental/&quot;&gt;http://dev.radiantcms.org/svn/radiant/branches/mental/&lt;/a&gt;  
&lt;a href=&quot;http://soxbox.no-ip.org/radiant/svn/extensions/admin_parts&quot;&gt;http://soxbox.no-ip.org/radiant/svn/extensions/admin_parts&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Features of this extension:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Images are linked to each page, rather than being global.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Local images can be displayed with:

	&lt;p&gt;&amp;lt;r:image name=&amp;#8221;monkey.jpg&amp;#8221;/&amp;gt;&lt;/p&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Images from another page with:

	&lt;p&gt;&amp;lt;r:find url=&amp;#8221;/some/page/name&amp;gt;
  &amp;lt;r:image name=&amp;#8221;monkey.jpg&amp;#8221;/&amp;gt;
&amp;lt;/r:find&amp;gt;&lt;/p&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Images can be manipulated using &lt;a href=&quot;http://beautifulpixel.com/flex_image/index.html&quot;&gt;FlexImage&lt;/a&gt;. Just dump a transform_name.flexi file into &amp;#8216;app/views/assets&amp;#8217; and you can transform images:&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;app/views/assets/polariod.flexi&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;@image.resize! :size =&amp;gt; '100x100'
@image.border! :size =&amp;gt; 3
@image.shadow!&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;And in the page:&lt;/p&gt;


	&lt;p&gt;&amp;lt;r:image name=&amp;#8221;monkey.jpg&amp;#8221; transform=&amp;#8221;polariod&amp;#8221;/&amp;gt;&lt;/p&gt;


	&lt;p&gt;There&amp;#8217;s also a default.flexi that all images are passed through &amp;#8211; these
files contain just ruby code and get passed both the @asset and the
owning @page, so you could do default transformations depending on the
type of page involved.&lt;/p&gt;


	&lt;p&gt;If FlexImage isn&amp;#8217;t installed, the extension can continue to be used as a
basic asset management system.&lt;/p&gt;


This isn&amp;#8217;t complete. I don&amp;#8217;t have:
	&lt;ul&gt;
	&lt;li&gt;a way to upload images for a page that hasn&amp;#8217;t been created yet.&lt;/li&gt;
		&lt;li&gt;a nice way to delete images&lt;/li&gt;
		&lt;li&gt;much in the way of validation&lt;/li&gt;
		&lt;li&gt;anything in the way of tests (it&amp;#8217;s probably going to crash early and often)&lt;/li&gt;
		&lt;li&gt;any caching whatsoever (your &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; will likely get choked if you try running this in production with transforms under even slight load)&lt;/li&gt;
		&lt;li&gt;any confidence that it wont destroy all your data or kill your first born child (use at own risk)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;I&amp;#8217;m pretty excited about how this extension is turning out &amp;#8211; I&amp;#8217;d love some feedback, and any offers of patches are always welcome.&lt;/p&gt;</description>
          <pubDate>Tue, 02 Jan 2007 16:59:00 GMT</pubDate>
          <guid>http://soxbox.no-ip.org/radiant/articles/2007/01/02/page-asset-management/</guid>
          <link>http://soxbox.no-ip.org/radiant/articles/2007/01/02/page-asset-management/</link>
        </item>
    
        <item>
          <title>AdminParts Extension</title>
          <description>&lt;p&gt;I think given my glacial pace of development that dumping my branch and going with extensions is the way to go. Herewith, my first radiant extension.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ve had a bit of a play with giving extensions access to the admin
pages. I&amp;#8217;ve gone with the concept of having &amp;#8216;AdminPart&amp;#8217; classes. A page
class has an admin_parts array, listing the admin part classes, ie.&lt;/p&gt;


	&lt;p&gt;Page.admin_parts = [TitleAdminPart, ExtendedMetadataAdminPart,
PartTabAdminPart]&lt;/p&gt;


	&lt;p&gt;These are rendered through corresponding partials under an admin_parts
directory (ie, TitleAdminPart becomes admin_parts/_title.rhtml). The
page controller then passes off to each of the admin parts to save their
data back to the model.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ve got an extension that implements this (in a very rough way), and an
proof of concept example.&lt;/p&gt;


	&lt;p&gt;&lt;a href=&quot;http://soxbox.no-ip.org/radiant/svn/extensions/&quot;&gt;http://soxbox.no-ip.org/radiant/svn/extensions/&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;The only noticable change from having the extension installed is that at
the moment when you save a page, the parts are saved off regardless of
whether the save of the entire page is successful. Doesn&amp;#8217;t bother me at
the moment though.&lt;/p&gt;</description>
          <pubDate>Fri, 08 Dec 2006 17:13:00 GMT</pubDate>
          <guid>http://soxbox.no-ip.org/radiant/articles/2006/12/08/adminparts-extension/</guid>
          <link>http://soxbox.no-ip.org/radiant/articles/2006/12/08/adminparts-extension/</link>
        </item>
    
        <item>
          <title>I'm Back</title>
          <description>Sorry for the long absence.... not that there was anybody listening. Because Radiant has shifted since I last set foot here, I've moved off most of my changes and pulled in a fresh copy of the 'mental' branch to play on.

Hopefully I'll get something done this time.</description>
          <pubDate>Fri, 10 Nov 2006 16:19:47 GMT</pubDate>
          <guid>http://soxbox.no-ip.org/radiant/articles/2006/11/10/im-back/</guid>
          <link>http://soxbox.no-ip.org/radiant/articles/2006/11/10/im-back/</link>
        </item>
    
        <item>
          <title>Custom routing for plugins and tests</title>
          <description>&lt;p&gt;Haven&amp;#8217;t had as much time to play lately as I&amp;#8217;ve been put onto a new project at work which is taking up a fair bit of my thinking time, but I&amp;#8217;m slowly pushing ahead.&lt;/p&gt;


	&lt;p&gt;Revisions &lt;a href=&quot;/radiant/bssvn/!revision/16&quot;&gt;16&lt;/a&gt; and &lt;a href=&quot;/radiant/bssvn/!revision/17&quot;&gt;17&lt;/a&gt; are in with a nice little feature:&lt;/p&gt;


	&lt;p&gt;I decided to have a go at updating the rails version to the latest trunk, just to see what would happen, and had most of the functional tests failing with wierd nil errors. The cause of this was the use of named routes combined with misuse of the with_routing function.&lt;/p&gt;


	&lt;p&gt;When you use &amp;#8216;with_routing&amp;#8217; in a test, the new set of routes that are used will be used &lt;em&gt;instead of&lt;/em&gt; those defined in routes.rb. The radiant test code was assuming that the previously defined named routes were still available. Rails also had a quirk where any named routing method would, instead of throwing a NameError, as it should, instead attempted to look up the old controller/action using the new naming rules. Since the with_routing in radiant was used to add a default route (&amp;#8217;:controller/:action&amp;#8217;) all the old named routes would map to their instead.&lt;/p&gt;


	&lt;p&gt;With the rewriting of rail&amp;#8217;s routing code, the named routes will now fail with a cryptic error about calling a method on nil. When the routes are replaced, the named route helper methods still remain on controllers, but they will fail instead of looking up the route (they should really get removed, but i don&amp;#8217;t see how that could be done safely).&lt;/p&gt;


	&lt;p&gt;To work around this, I&amp;#8217;ve added a mechanism to allow the addition of extra routes through the Radiant::CustomRoutes object. Call Radiant::CustomRoutes.register with a block that accepts an normal rails route mapper, and the Radiant::CustomRoute.activate method will add those routes in during a route reload.&lt;/p&gt;


	&lt;p&gt;The tests also make use of this to add additional routes for testing purposes by using the &amp;#8220;with_radiant_routing&amp;#8221; helper.&lt;/p&gt;


	&lt;p&gt;This stuff should be great for adding radiant plugins that want to include extra controllers in the administration interface (or to anywhere on the site really). Bonus.&lt;/p&gt;</description>
          <pubDate>Thu, 06 Jul 2006 11:53:00 GMT</pubDate>
          <guid>http://soxbox.no-ip.org/radiant/articles/2006/07/06/custom-routing-for-plugins-and-tests/</guid>
          <link>http://soxbox.no-ip.org/radiant/articles/2006/07/06/custom-routing-for-plugins-and-tests/</link>
        </item>
    
        <item>
          <title>Rails Obverser Bug Update</title>
          <description>&lt;p&gt;My bug report to rails was picked up and &lt;a href=&quot;http://dev.rubyonrails.org/changeset/4521&quot;&gt;fixed&lt;/a&gt;. Them boys is fast. Pity that named routes appears to be broken in the current trunk, so I&amp;#8217;ll have to leave off updating the rails external. But after fiddling around trying to see why it&amp;#8217;s broken, I realised that it didn&amp;#8217;t matter. My problem was that I&amp;#8217;d been playing with my behaviors in the &amp;#8221;/app/models&amp;#8221; directory &amp;#8211; but they&amp;#8217;re behaviors and should be getting loaded from the &amp;#8221;/app/behaviors&amp;#8221; directory anywhere &amp;#8211; and those files are loaded before the observer is registered. Doofus.&lt;/p&gt;


	&lt;p&gt;Haven&amp;#8217;t had a chance to progress much further today. Ate more than my fill of indian at lunch, and have spent most of the day struggling to stay awake. I have whipped up a little faux-page object that delegates rendering back to a controller, so I should be able to go about writing the comment handler with all the functionality of a full rails controller. Suprising how easy that was. I&amp;#8217;ll probably have the comments working either Monday or, if I have time, sometime this weekend, and then everybody can start telling me what I&amp;#8217;m doing wrong (and bombard me with offers for cheap pharmaceuticals &amp;#8211; should put some filtering into it).&lt;/p&gt;


	&lt;p&gt;After that it&amp;#8217;s a toss-up between expanding the plugin system for radius (specifically &amp;#8211; adding migrations and adding extra admin controllers should be easy for plugins) or pushing ahead with the extra functionality that I need to migrate &lt;a href=&quot;http://www.thegroggysquirrel.com&quot;&gt;The Groggy Squirrel&lt;/a&gt; over to radiant. I should really do the later, but the former seems like more being more interesting and the fact that it might be really disruptive is a good justification.&lt;/p&gt;</description>
          <pubDate>Fri, 30 Jun 2006 17:19:56 GMT</pubDate>
          <guid>http://soxbox.no-ip.org/radiant/articles/2006/06/30/rails-obverser-bug-update/</guid>
          <link>http://soxbox.no-ip.org/radiant/articles/2006/06/30/rails-obverser-bug-update/</link>
        </item>
    
        <item>
          <title>A Mess of Changes</title>
          <description>&lt;p&gt;Have checked a lot of stuff in in an unfinished state at the moment. Can&amp;#8217;t make up my mind about things, but hadn&amp;#8217;t done a checkin since yesterday.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ve moved what was previously called Asset to be the new Page object, and what was previously Page is now LegacyBehaviorPage. This was originally done because I thought single-table inheritance wasn&amp;#8217;t giving me what I wanted (searching on a subclass wouldn&amp;#8217;t return subclasses of that) &amp;#8211; I think my problem was just that the subclasses hadn&amp;#8217;t been created yet, so it didn&amp;#8217;t know to search for them.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ve added in a BehaviorPage object, which should be pretty much a straight replacement for behavior. It&amp;#8217;s got all the same methods, so it should be possible to just change existing behaviors to extend BehaviorPage instead of Behaviour::Base. I might move Page back to Asset and make this class the new Page.&lt;/p&gt;


	&lt;p&gt;Added a rough CommentablePage behavior using the new BehaviorPage style of behavior. Test for displaying comments are done, but still umming and ah-ing over how to handle the submission of comments. Should I register a new controller or should I have a behavior that handles comment submission. As silly as it might sound, I&amp;#8217;m leaning towards the latter &amp;#8211; I might make a fake child of a CommentablePage that is only returned by find_page_by_url.&lt;/p&gt;


	&lt;p&gt;Oh, and I added some logging to PageContext so that I get the full backtrace of errors during a radius tag render. Debugging is so annoying when &amp;#8220;Wrong number of arguments(0 for 1)&amp;#8221; embedded in a page is all you have to go on.&lt;/p&gt;</description>
          <pubDate>Thu, 29 Jun 2006 18:05:02 GMT</pubDate>
          <guid>http://soxbox.no-ip.org/radiant/articles/2006/06/29/a-mess-of-changes/</guid>
          <link>http://soxbox.no-ip.org/radiant/articles/2006/06/29/a-mess-of-changes/</link>
        </item>
    
        <item>
          <title>Damn you Observer</title>
          <description>&lt;p&gt;Damn. Found a &lt;a href=&quot;http://dev.rubyonrails.org/ticket/5535&quot;&gt;Rails Bug&lt;/a&gt; &amp;#8211; if an observer is created before a subclass (in this case, when UserActionObserver gets instantiated before my new CommentablePage object), then observations don&amp;#8217;t apply to the subclass.&lt;/p&gt;


	&lt;p&gt;Now I have to decide between patching that in (and potentially getting disrupted when rails catches up) or just making sure that things load in the right order. Annoying. I think I&amp;#8217;ll go for the former.&lt;/p&gt;</description>
          <pubDate>Wed, 28 Jun 2006 22:12:47 GMT</pubDate>
          <guid>http://soxbox.no-ip.org/radiant/articles/2006/06/28/damn-you-observer/</guid>
          <link>http://soxbox.no-ip.org/radiant/articles/2006/06/28/damn-you-observer/</link>
        </item>
    
        <item>
          <title>Single Table Inheritance</title>
          <description>&lt;p&gt;Starting on the changes that are going to make this a real branch &amp;#8211; starting to make changes to the database that will change that precious data and stop you from just switching back without some sql magic. Here be dragons.&lt;/p&gt;


	&lt;p&gt;Just checked in single table inheritance (&lt;a href=&quot;/radiant/bssvn/!revision/8&quot;&gt;Revision 8&lt;/a&gt;) &amp;#8211; this will allow the adding of extra data to pages by linking them to other database models. Next is the migration of behaviours to become subclasses of page so that table associations can be simply described there. I&amp;#8217;ve split out some of the functionality of Page into an Asset superclass, paving the way for pages that don&amp;#8217;t have PageParts or Layouts (I&amp;#8217;m thinking Images, Redirects).&lt;/p&gt;


	&lt;p&gt;My first step to this has been done in &lt;a href=&quot;/radiant/bssvn/!revision/9&quot;&gt;Revision 9&lt;/a&gt; where I have made the behavior method of Page private and expanded the list of delegated methods. This way everything is talking to a page object, and behavior is just a hidden implementation detail &amp;#8211; this way you can extend the system by subclassing page instead of adding behaviors.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ll be updating this site to run the latest version of R.O.C. at every opportunity, so if things break, it&amp;#8217;s probably because I was stupid.&lt;/p&gt;</description>
          <pubDate>Wed, 28 Jun 2006 10:56:43 GMT</pubDate>
          <guid>http://soxbox.no-ip.org/radiant/articles/2006/06/28/single-table-inheritance/</guid>
          <link>http://soxbox.no-ip.org/radiant/articles/2006/06/28/single-table-inheritance/</link>
        </item>
    
    
  </channel>
</rss>

