Forum OpenACS Development: Blog This button for file-storage

Collapse
Posted by Nick Carroll on
Hi,

I would like to be able to link a file-storage item with a blog entry. So that in file-storage for a selected file, there would be an option that you can click on to create a blog entry that references to the file.

What would be the best way to do this so that I don't have to create a customised file-storage application? I would like this work to be part of the existing blogger and file-storage apps if possible.

Cheers,
Nick.

Collapse
Posted by Nick Carroll on
Ok, so I thought about how I might add the "Blog This" functionality to file-storage. I will need to create a service contract for file-storage called "extendedItemOptions". So for each implementation there will be an additional column in the file-storage UI that shows that extra functionality.

So if I implemented the service contract for the blogger, then a "Blog This" button will appear next to every file item. If I chose to implement "Email This", then a second column will appear next to the file item. The button or link will then take me to a page that takes an email address and message, and the file is attached and emailed out.

What does everyone think? I'm trying to find a flexible way for extending file-storage so that it can integrate with other OpenACS applications.

This thread might relate to Michael Feldstein's posting.

Collapse
Posted by Dave Bauer on
Nick

Please look into the new callbacks feature.

ANother way to look at this would be the new clipboard and related items packages. With clipboard you could blog ANY object by adding it to the clipboard and then taking the clipped items and adding them to the weblog post. THis is much more flexible and many times easier to implement.

I don't think we want to even go to all the trouble of service contracts here. I see much more potential with the clipboard model. It works by including a clipboard UI in the subsite master template. Every page (on HEAD) that has an interesting object sets an ADP property of "displayed_object_id". This way the clipboard can find the object that is currently being viewed.

I think this approach is so much better, since it can work for any object in the entire site, and requires basically no coding changes to any packages other than enabling the clipboard in the subsite master template. You can see examples of this in the cop-ui package in CONTRIB.

So if you can't work with this code from HEAD, I suggest doing the simplest thing that could work, with an eye towards upgrading to take advantage of the flexibility that will be available in OpenACS 5.2.

Collapse
Posted by Nick Carroll on
Dave,

I had a look at the cop package a couple weeks back. I must admit I didn't take much notice of the clipboard package. I will have a look at it.

Thanks,
Nick.