cck

How to access a file information from inside a formatter after submitting it?

I am creating a drupal cck field that allows you to create an audio recording and then display that recording immediately. After uploading the file to the server, I can't seem to figure out how to give the formatter the name of the file in order to play it back. Is there an easy way to store the file name with a tag specific to each reco...

Multi CCK field, some not visible

I have content type CustomInvoice, which has CCK fields (customer, price, ..etc). Then there is another content type, where all customers are stored. In CustomInvoice I have Reference CCK field to CustomerContentType .. so when creating CustomInvoice user would choose customer from drop down cck reference field and that is it. But if ...

Only getting the first character when accessing post variable

A common way I handle things in Drupal is to create a CCK type, and then create a custom submit handler to perform logic on the CCK fields when the node is submitted. However, I have been unable to get the value when the CCK field type is a Date field because the array is structured differently. UPDATE - João Guilherme had a much simple...

From custom formatters to a field?

I've made a field using Custom Formatters (Drupal, CCK). Now I got this PHP code to export /** * Implements hook_theme(). */ function product_attribute_theme() { return array( 'product_attribute_formatter_product_attribute' => array( 'arguments' => array('element' => NULL), ), ); } /** * Implements hook_field_formatte...

Setting up Drupal node reference autosuggest to search on two separate fields

The simple versoin of my question: I need a CCK Node reference field to search on two different fields in a node. What's the best way to do this? Some Background I run a calendar for a physical therapy program. Each lecture has a reading list. Readings are their own content type and the lecture has a autosuggest node reference field th...

'Access violation' error message while uploading files

I'm using CCK FileField (and CCK VideoField) in my content-type. I get 'Access violation' error message (after several minutes uploading) when I upload big videos (let's say.. 18MB). (The Access violation is a server message I guess.. or PHP error message.. My PHP Post max size is 100M so I guess this is not the issue. What could be t...

Custom compound CCK field - How to display individual sub-fields in Views?

In Drupal 6, I have created a simple Pricing CCK compound field module with a "cost" and a "product" sub-field based on this excellent tutorial: http://www.poplarware.com/articles/cck_field_module function usginpricing_field_settings($op, $field) { switch ($op) { case 'database columns': $columns['cost'] = array('type' => 'v...

Drupal NAT-ng and Computed field don't befriend easily

All day tried to compute fields from child nodes assigned using NAT-ng. My logic doesn't seem to go so far. As far as I know I need to get content by using nid which is asigned to nat id by getting it I am capable to get term id and all nodes assigned to this term (also can filter content types) ...

Send mail to address in another node in Drupal

I have a content type meeting that has a CCK node referer field that refers to one or more people nodes. Those people nodes contain a CCK Email field. Now I'd like to send a mail to all people listed in the meeting node when the node is created. I don't know how to do that as the mail adresses are in different nodes, so I can't just se...

How do I hide a CCK Nodereference input widget in #after_build?

I like simplifying the node form. One of my tricks in the past has been to conditionally hide CCK elements on new node creation when I want to enforce some kind of default. One of my favorite tricks is to whisk away things put in place by the Prepopulate module. Unfortunately for me, it's recent move to an #after_build-based mechanism se...

Drupal: CCK Integer field type length?

What's the maximum length for the CCK Integer field type in Drupal? Thank you! ...

Drupal: Token for date CCK field as plain text

I'm using the Rules module to send a mail and I'm inserting a token that represents a CCK Date field. This token contains HTML formatting which should not be present in a plain text mail. So when I insert the token I get <span class="date-display-single">06.09.2010 - 15:52</span> Instead of 06.09.2010 - 15:52 which is what I want...

Attach existing cck field to existing content type in Drupal

Without going through the UI, how would I add an existing CCK field type to an existing content type in Drupal? I'm imagining I could add the change of configuration straight to the database in an 'install' file, but if not, which hook should I call for this? ...

Remove required attribute from a CCK FileField

Hello. I have a node with a required CCK filefield. I want to remove the field requirement on certain pages, so I added a hook_form_alter in my module and tried the following: $form['field_image_file']['#required'] = false; which doesnt work! Printing the $form I see that there are loads of places where the #required value is set to...

Create a gallery from a CCK ImageField

What I have Currently I have a view that creates a list of entries, each entry has a title, description and multipule images. The view just shows the list right now and all the photos are group from the images field show when you preview the view. (the view is a block) What I am trying to build The list works, however instead of just...

Drupal views + CCK. Not sure how to get the view to display the way I'd like.

I'm using a custom theme. I have a custom content type with two fields. title thumbnail (created using imagecache). Note, in the example below, URL 1 and Title 1 are the two fields for the first row in the result set. I would like it to output something like so: <span> <img src="URL1" /> <span>Title 1</span> </span> <span> <...

Problem while enabling CCK module

I am trying to enable CCK module and when I try to enable it, I get a white screen with this URL (http://localhost/?q=admin/build/modules/list/confirm). But CCK is not being enabled I dont know whats wrong. This is what I am doing before trying to enable CCK. I downloaded CCK, extracted it and put it in /sites/all/modules/ folder Go t...

Access to field by node creation date in Drupal with CCK

I'm looking for a particular behaviour that grant permission to see one or more cck field based on date time creation of node. In particular i need to: Grant to role A: Full access to all CCK (old and new) Grant to role B: Access to all CCK but ONLY to ones present in node OLDER than 1 Year Anonymous user: No access to CCK field How c...

In drupal, is there a field type with variable number of values?

Using cck I've created a new content type, Contact. A contact can have 1 or more phonenumbers. Is possible to create a field type (string, number or node reference) so that the user creating content can add more phonenumbers to a contact? ...

Drupal CCK date field with just hours and minutes

hi @all how cann i create a date field in drupal just with houers an minutes without years and months. thx ...