Polling plugin for Typo III... 2

Posted by Steve Longdo Tue, 24 Jan 2006 05:36:00 GMT

Well I promised an update, and here it is. Not much progress to report. I am stalled on the sidebar issue, trying to have AJAX links in the sidebar panel to vote with and then updating the sidebar DIV with the results. Typo sidebars load fine from the SidebarController, but trying to hit them directly fails with uninitialized constant Plugin at the bottom of the error trace it mentions the controller file and the plugin.rb file.

Apparently plugin.rb is not loaded when you go to the controller directly. I wish sidebars worked more like the TextFilters. I tried to hack it up, but didn't have much success. I do notice that while the TextFilters are technically plugins, the controller for them lives inside the main Typo application, whereas the sidebar controller lives in the components directory... Long story short I've asked for help on the typo mailing list.

In the meantime I've been researching ways to display polling results. OpenLaszlo looked like a great candidate for this, especially for fitting into the small amount of real estate a sidebar allows. I had high hopes for its PieChart control, but it is still beta quality. I messed around with it a bit, but I wasn't satisfied with how it looks and also mouse events aren't supported yet. I spent quite a bit of time getting the demo up and running mostly because when you check it out from source some of the files have moved and thus the demos don't work. I will be keeping an eye on this project though especially now that there is a Ruby on Rails integration gem available from Oliver Steele.

Better news for Horizontal CSS graphing though. I was able to implement a helper based on Geoff Grosenbach's Vertical Bar CSS graphing code. At this point I will just be excited to see something show up in the sidebar for results... (grumble)

Negative Feedback on Typo...

Posted by Steve Longdo Sat, 21 Jan 2006 08:06:00 GMT

Have you seen the "feedback" from the TextDrive admins on Typo? Wow! That is some harsh "praise".
I remember one memory leak in particular caused some issues that the TextDrive guys helped to get fixed in Rails. I guess that experience has helped to sour them against Typo.

Polling Plugin for Typo II... 2

Posted by Steve Longdo Fri, 20 Jan 2006 06:05:00 GMT

I am continuing to work on the polling stuff for Typo. I've ended up expanding my approach to include a full Admin panel for the Polls. Mostly to allow selection of the "active" sidebar poll and to be able to view historical poll results.
I've run into an issue with the sidebar poll content.rhtml though. I was wanting to have AJAX voting via remote_link_to's, but no public routing is defined for sidebar plugins.
I've looked into how TextFilters are implemented in Typo to better understand how they work despite not having public routing. The TextFilterController defines a public_action method that allows child filters to include symbols for :plugin_public_action which in turn exposes the referenced methods.
Despite being named plugin_public_action it is in fact only implemeted for Filters and not for Sidebar components. I am debating adding this functionality and submitting a patch, however, I wonder if I am the only person that needs this functionality? I would update the routes.rb file to include a route for my poll controller, but that doesn't work because the sidebar controller handles loading all of the dependencies for "child" plugins.


Update: I just re-read this post and it comes off a bit badly. Mostly because I wrote it at the end of a very long day. I apologize to the reader for the stream of consciousness quality of the posting.
Read more...

Older posts: 1 2