cck

How do I set the value for a CCK Node-reference field automatically when create form submits

I have a content type (A) that references a single node of a different content type (B). The node referenced (B) can be programmatically determined using the information for the user creating this new node (A)... Each user can only create a single node of the referenced content type (B), so this single node will always be referenced from...

How to trim uploaded file name's length to 10 chars when using Drupal CCK file fields?

I uploaded 1 file and name it "test-test-test-test-test.php". It create problem in my layout. my layout is mess up. so if i upload file name up to 10 char then its fine. ...

Drupal location CCK field does not save.

Hi! I have installed Location, GMAP, GMAP Location and Location CCK modules. I needed Location CCK because I could not force ordinary location to show in specific field group. It looks like it is attached statically to the main group (I have defined field groups as a tabs and do not want to show location information on the main tab). A...

Drupal / CKEditor and input filtering, how to return clean value?

I have a Drupal set up with CKEditor and CCK, with a custom node which has some additional fields using CKEditor, one field being 'related_news'. I'm trying to figure out the best practice for returning that data safely. What I have right now is: $node = noad_load(35); <h3>Related News</h3> <?php print $node->field_related_news['0']['v...

Drupal: Possible to assign view permissions to all cck fields for a node type?

I've created a custom content type: product This product has an image (cck file field) and a few other cck fields that make up it's content definition. By default, when an anonymous user looks at a published product, they do not have permission to view the image or any other cck field. Personally, I don't really want to have to alwa...

Module to parse RSS feed in Drupal?

I'm trying to simply display an RSS feed as part of my site. A user will put in an RSS URL into a CCK field and I want to take that URL and display the latest RSS results. I assume there's a module for this but I can't seem to find it. ...

What should I check for when I cannot upload files into filefield CCK fields?

I have recently moved a drupal site. (both servers run on a debian based LAMP stack) Everything works great here, including the uploading of images via a CCK filefield. Original url: dev.example.com/foo Deploying it to a test folder on the production server to a test folder for an environmental shakedown cruise lead it here: www...

Drupal Location CCK map does not center at location point.

I have applied and configured CCK Location module to show node location on map (GMap, GMap location modules). However there is small issue that map does not show location at the centre (address marker is off the screen and user must scroll through the map to find it ;-). It looks like map is centred one map screen off to the left (to t...

Unable to print CCK field in template in Drupal

Hi, I'm trying to print CCK field in my node.tpl.php -file like this; print $node->field_name_here[0]['view']; But when I navigate to that page, I can't see the contents. Even when i use print_r($node); I can't see any info about the variable. Drupal only renders everything else in node.tpl.php -file. BUT... if I stop the executi...

Drupal, Views: trimming text doesn't work because tags are not closed properly

hi, I have a node with a text area editable with CKEditor. THis means my customer can add italic style with it. Then I have a VIew in which I'm trimming this text area for each node to 140 characters. The problem is that if my customer adds italic style right before the treshold, the text is not closed, and I have html errors (for exa...

How to reference parent node of cck referenced node in drupal

I have a new content type called 'A' which has a cck reference node field that makes reference to type 'B'. I have a custom template that renders out all node types 'B' in a very specific way.. the problem is that for this template, I need to know who the current node belongs to. type B will always have a parent (of type 'A').. but I ...

Reading node field values in module code using Drupal 6

I have created a custom module and am using hook_block to programmatically create some blocks. My question is how can I access field values including CCK fields for the current node within my module? I basically want to get a value from a CCK field and use the value when building my block for that page. ...

Drupal Views and Content Taxonomy.

Hello, I have been searching all morning and have yet to come across the solution for my problem.. problem is: I have successfully created a CCK content type using the content taxonomy module (which allows me to use a vocabulary as the content). the user is asked to select his/her preferred cultures. so in simple terms form holding a...

Theming node-xxx.tpl.php

hi. i am new to drupal theming. i want to do the following: i have a product content type that i am manipulating it's node-product.tpl.php, the product content-type has a CCK field of type "Embedded Video" (using the Media module found at http://drupal.org/project/media ). since i need to wrap the "Embedded Video" field with a tag i wan...

Changing the value of a field in a Drupal form

Hello, I've created a hook submit function for my Drupal node edit form. I'd like to change the value of a CCK field (not in the form) for that specific node within the sumbit handler. I've tried setting the field as hidden and applying a value to it, but this didn't work. Could anyone suggest a way to do this? Thanks, Jonathan ...

New CCK fileds not showing up on Creat Content form

I have created new fields for a CCK content type. They were showing up before just fine. Now nothing. The only thing I did differently was delete some fields before adding the new ones. I can see the columns in the content type table. They are just not showing up in the Create Content form. Any help on this would be greatly appreciated. ...

How could I have a cck field get the computed value of another cck field?

Lets say I have a cck field called foo. It is a text field with php input. Say the php code in foo field results in the value of 1,256 when computed. I need cck field called bar to pick up/obtain/have the VALUE (1,256) of cck field foo. Node XYZ Foo:*some php code* ===>results in value of 1,256 Bar:1,256 If I just have cck fi...

jQuery access input field by name[value][id]

I have some HTML code like this: <input id="fieldname-1" name="field_name[value][1]" value="1" type="checkbox" /> <input id="fieldname-2" name="field_name[value][2]" value="2" type="checkbox" /> <input id="fieldname-3" name="field_name[value][3]" value="3" type="checkbox" /> I want to access this with jQuery like: $('input[field_name...

Updating 10,000 cck fields daily in drupal

One of our sites has around 10,000 nodes. In each node, there is a simple cck text/integer field. This integer changes daily, so they need to be updated every day. The integer ranges from 1 to 20000000. The cck field is across all content types, so it has its own table in the database. We don't use revisions. I chose to have it rea...

file field in drupal cck module

Hello How can I add a file field in drupal CCK ? Thanks ...