Content Type

The field settings form is located at the url:

Drupal 4.7
admin / node / types / [type_name] / fields / [field_name]
Drupal 5.x
admin / content / types / [type_url] / fields / [field_name]

In other words, if you need to know the content type when you are creating the code for your widget and field settings, you can get it from arg(3). In Drupal 4.7, arg(3) is always the actual content type, so you can safely use the value of arg(3) as the content type, but in Drupal 5.x this behavior is different.

In Drupal 5.x, the content types are managed by the node module, and the node module has added a new method of displaying content types in urls by replacing any underscores with hyphens. In other words, a content type called 'content_book' will be transformed into 'content-book' when the name is used in an url. That means you can no longer assume that arg(3) is the exact name of the content type. The 5.x version of the content module has a method to handle this. Any place where you need to get a content type name from an url, or create an url from a content type name, use the following code:

$content_type = content_types(arg(3));
print 'The actual name of this content type is '. $content_type['type'];

$content_type = content_types($node->type);
print 'The string used in urls for this content type is '. $content_type['str_url'];

The content_types() function will accept either the type name or the str_url value as an argument to return the content type information for that value.