Hi- I'm working on a banner ad extension for a friend and am currently using the file_column plugin (althought I've been thinking about using attachment_fu instead) to handle the image upload. Right now I've just stuck it in the root app's vendor/plugins directory. Is this acceptable practice or is there a better way to do it? I know the gallery module handles the image upload manually, but I wanted to stick with a proven method without rewriting existing code. Any thoughts? Regards, Josh
on 2007-05-19 17:23
on 2007-05-19 17:41
I'm still a relative Ruby/Rails/Radiant rookie; however, that's what I've been doing. I basically ask myself, "Do I want this plugin affecting all Radiant instances or just the one instance?" That answer determines where I put it. Using the root helps with staying DRY.
on 2007-05-19 18:06
If you want an example of how to integrate a plugin into an extension, check out page_attachments. It's not especially straightforward... you might have to dump code from init.rb of the plugin in the activate method of your extension. Sean
on 2007-05-19 18:11
This is what I have been doing, but I really reccomend shifting to attachment_fu. The killer feature is also that you can have image processing without RMagick, which leaks memory and is generally a pain. ImageScience, MiniMagick and RMagick are all provided, as well as DB and file system storage. Like Sean said extension. Look at his page_attachments for some good examples. I will be updating some of my own extensions to match the new hooks for the views. Keith Bingman Tel: +49-7731-79838380 email@example.com http://keithbingman.com