Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /home1/tylerfra/public_html/includes/common.inc).

cck

Drupal Custom Time Field Select List with 15 Minute Intervals

If you need a custom time field select list with 15 minute interval options in Drupal 7, try this out when adding a new field to your content type (this will work in Drupal 6 as well):

Field: List (text)

Widget: Select list

Allowed values list:

Drupal CCK FileField (ImageField) Permissions Granularity

So I had a content type with an optional, unlimited value Imagefield attached to it. The content type's user permissions where set to allow all authenticated users to edit any node of that type. Which is all fine and dandy like sour candy. However, by default users are able to edit and/or remove other user's images in that field. Out-of-the-box that is the intended functionality, but I wanted user's images to be protected from other users. Here is how it can be done with a module:

Retrieve CCK Filefield Imagefield Default Image Path

Here is how to get a Drupal 6 CCK Filefield Imagefield default image path:

Modify CCK Fields with Drupal hook_form_alter

Here is how to modify a CCK field on a node form in Drupal. In this particular example, the CCK field I am trying to modify is called 'field_news_image' and is inside a CCK Field Group called 'group_image'. The modification hides the field by wrapping a div around the field and setting the div's display to none.

Return Drupal CCK Integer Field Allowed Values List as Array

Drupal 6 (D7 below)

Below is a helpful function that will return the allowed values list for a Drupal CCK Integer Field as an Array.

For example, here is my allowed values list for my cck integer field "field_dg_hole_tee":

Subscribe to RSS - cck