Closed (fixed)
Project:
PM Lite
Version:
6.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Feature request
Assigned:
Reporter:
Created:
28 May 2008 at 20:08 UTC
Updated:
16 Jun 2008 at 20:36 UTC
I apologize that I'm not testing. The description left a bit of a question. Is the PM a node or a content type? Meaning, could I use CCK to add or remove fields from the PM? If I set up the PM. This sounds very close to a module I want to develop except that what I'd send would be personal reports instead of PMs.
Are you depending upon another module for the security aspect of the PMs?
Comments
Comment #1
rszrama commentedThe PM is a content type, so every PM that gets sent is a node on your Drupal site. As for security, I'm using Drupal's own hook_access() so that only the PM author and specified recipient(s) are able to view the node. Drupal's hook_db_rewrite_sql() also lets me hide PM nodes from any sort of node lists that you'd normally find on a Drupal site, though that will need some wider testing in the wild to make sure it's good enough.
So, you can easily use this to transmit documents by either using the normal file attachments granted to content types by the upload module or by adding a CCK field to the content type.
I'll probably need till the end of next week for me to consider this feature complete. I didn't get a chance to commit last night my work on breadcrumbs and an unread notifier and such. I'll be heading out of town this weekend for a camping trip w/ guys from my church, and I'll probably come home soggy (looks like rain) and in need of some sleep. ^_^
Comment #2
flickerfly commentedHave fun camping with your church. I'm heading out to ICCM (http://iccm.gospelcom.net) next week and so I'm looking at being busy in prep, travel and the conference. I am however very interested in the possibility of using your module for this purpose.
The more I think about it, I wonder if 2 (or more) content types would be needed for this purpose. One for the typical PM and another for reports. Would the module be able to manage multiple content types?
I think I'll pull it down and get to know it.
Comment #3
rszrama commentedInteresting thought... I actually hadn't considered the necessity of multiple content types. Given the current architecture, that isn't possible. For the purposes of this module, I want to keep the code light and probably won't implement that (unless there's a very easy way to do this... I know we've got something similar with product classes in Ubercart).
I'd consider whether it's a necessity first. You might get away with just adding the file field or attachment to the PM node and either: 1) display a message to users about how to send files to other users or 2) write a wrapper module that will alter the PM node form if a user chooses to send a file from a particular link.
Also, thanks for the link. Hadn't heard about ICCM before. We did have a fun time traipsing through the woods, and we got to hear from two of our pastors about encouragement in community and confrontation in community that serves the purpose of promoting or protecting holiness. It was a great time. : )
And it's nice to meet so many Christians through Drupal, too.
Comment #4
flickerfly commentedYeah, a whole new content type might be a bit heavy. This is "Lite" after all.
No reason I couldn't use CCK to add attachments and then another hidden field called type. My plan is to figure out how to automate the delivery of the reports so I could just set that CCK type in the automation and then provide views that distinguish the types. My views fu isn't solid so I'm not sure I could even do that, but it sure would be cleaner all around. I'll investigate that.
That brings another thought, any plans to implement an API?
Thanks!
Comment #5
rszrama commentedchx pointed out in the other issue here that my hook_db_rewrite_sql() might prevent this module from working with Views. That would be unfortunate... I'll have to chat w/ merlin to see about fixing that.
Re: an API, I'm not entirely sure why that would be necessary. I won't rule it out, but part of the benefit of making PMs nodes is that there's already a fully developed API for handling nodes. If you wanted to automate the sending of a PM, you can simply fill out a node object and use node_save() to do the job.
I'm sure I'm missing something, though, so feel free to ping back if you had thoughts on what that might entail. : )
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.