I included attachment_fu in my page_attachments extension.  It was kind 
of tricky, but here's the basic strategy:

1) Import the plugin's lib/ directory into the lib/ directory of your 
extension via svn:externals, piston, or an export.
2) Copy the contents of the init.rb file into the 'activate' method of 
your extension.

You may have to fiddle with things to make sure they work right.  Here's 
another potential strategy, YMMV:
(in 'activate')
1) Wherever you stored it, push the plugin's lib/ directory into the 
load path.
2) Load or require the plugin's init.rb.

In either strategy, the plugin should probably be dealt with first (i.e. 
placed first in the activate method) if your extension depends on it 
during its activation.

Sean

Andrew O'Brien wrote:
> I'm trying to make a radiant friendly wrapping around the
> Authorization plugin
> (http://www.writertopia.com/developers/authorization) and I was
> wondering: what's the best way to use a Rails plugin inside of a
> Radiant extension?
>
> I noticed there's a vendor/plugin directory in the standard project
> layout, but it doesn't seem to be in the include path.  I also tried
> adding a vendor/plugins directory to the extension (since it would be
> kind of nice to bundle them together anyway), but that didn't quite
> worked either.
>
> Any suggestions?
>
> Thanks,
> Andrew
>
> Oh, and in case you're wondering, I'm trying to add a controller to
> allow role creation and assignment, as well as compatibility with
> Radiant's existing authorization system.
> _______________________________________________
> Radiant mailing list
> Post:   [email protected]
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
>   

_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to