开发者

user specific persistent cck types in drupal

Is there a way to do the following. We need to have a few basic cck types that will allow users to track their chosen parameters over a length of time.

For example, one cck type may be cal开发者_如何学运维led "numeric tracker" It would have a field for labeling the type and a field for entering a number.

User A might label one numeric tracker "miles driven". Then each day user A would use this type to enter a number. User B might label a numeric tracker "hours slept". Each day user B would enter a number.

Is there a way to use cck in this way?


Yes, cck can handle this, but if I'm getting your requirements correctly I believe you may just be looking at the problem in the wrong way.

For tracking data like this I would create a content type:

Tracking Data
  Has CCK Numeric Slider
  Has CCK User

Then each day the user would create a new node of this type that would be associated with the user that created this. So instead of having one node that many user contribute to you have many nodes each associated with a user. You can then use views to group your nodes back together and display you data in a way that emulates your requirements. IE the end user never really know that under the presentation layer there are many nodes.

Additionally you can use rules to ensure that the user can only create one every 24 hours.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜