Glad you could stop by the Linux Basement site. Linux Basement is an informational Podcast about Linux, open source software and lots of other wonderful technology. If you want to find out more about open source technologies, subscribe and have a listen!

#linuxbasement is up at irc.freenode.net

MP3 Feed
Ogg Vorbis Feed
MP3 Feed (all episodes)
Ogg Feed (all episodes)

Video blog (not the show!)

 

Milestones in Drupal

We've got a Drupal site on which users maintain notes on product development projects, leave comments, etc. and the user base would like to add milestones to function in a similar way that comments function (many milestones for any given project).  We have CCK and Views primarily driving the function of the site but can't seem to figure out how to implement a "one project - many  milestone" one-to-many relationship.

 

Any ideas out there?  Anyone done something similar?

 

Bob

 

p.s. we are NOT using the project module as this is designed mostly for software development - we are developing material-based products.

 

This is a whacky idea, but

This is a whacky idea, but taking a look at the comment module in core, I bet you could simply download core, take /modules/comment and put it into a testing directory, then simply change all instances of "comment" to "milestones" then throw it into your /sites/default/modules contributed directory and see if it works. I've not tested it, but in theory it should work. Then you would just go in and enable the module.

Hmm, I'll see what I have to test it on...

I'll give it a try on a test site too ...

Thanks for the whacky idea, chad - it might just work as desired.  Next week will be a great time to flush things out since lots of people are taking vacation time and the office is awfully quiet. 

 

I'll keep you posted on how things work out ..

 

bob

 

p.s. I'm the one who did the drupal presentation at OLF - Thanks once again for your support there!

Bob, I had a feeling that

Bob,

I had a feeling that was you! Ok so I took the comments module and changed everything to milestone, then I had to make a small change around line 2014 where there are two vainfo instances, I changed them to fainfo to simply change the function. I went in and enabled the module, and sure enough, there is now a milestone option when you create a node, just like comments. However, I'm getting an error about tables not existing when I submit the node. Close though... I will post the code up if I get it.

Chad

has something to do with

has something to do with core and node_comment_statistics. Can't quite get it, but I'm fried. It is friday. I will try to get some time over the weekend to have a look at it. You are using drupal 5 right?

Chad

One more note on this. in

One more note on this. in the milestone.module file, you actually have to replace comment Comment and COMMENT to get it to even run.

In vim I did

:%s/comment/milestone/g

%s/Comment/Milestone/g

%s/COMMENT/MILESTONE/g

Ok I just wanted to show off my mad vim skillz.

Chad

OK - you are a VIM god

This looks simple enough - yes I'm using Drupal 5.x.  Haven't committed to upgrading to 6.x yet because of some modules not being ready yet ...

 

Thanks for taking some time to check this out for me, oh god of VIM!