Hi guys,

I want to provide three new fields for the image and blog content types. I wish to add the following three fields:

latitude
longitude
altitude

Can anybody suggest how I might go about doing this (just some short pointers).

From my basic knowledge of Drupal I could extend node to provide these extra fields (I may wish at a later date for more/all content types to have these location fields), or extend each of image and blog separately.

If I extended image and blog would I be best to edit the current modules, or create location_image and location_blog (or similar)?

Thanks a lot!

Comments

vm’s picture

Drupal 5 allows you to do this now. goto administer -> content types
edit the content type and add a new field to it ?

you can extend this functionality using CCK.module and its addons for the ability to add all kinds of different fields to exisisting and new content types.

nancydru’s picture

Maybe if you have CCK, but I don't and I don't see where I can add a new field.

Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database

vm’s picture

thanks for the calrification, you are correct, the add fields tab is only available when CCK.module is installed. The add content type tab is what is now available with D5

nancydru’s picture

vm’s picture

no signs of them yet in my testing of D6

lewiz’s picture

Brilliant! I feel silly for not having checked first!

CCK is definitely the way that I will go to add these types. I'll probably create another module that does useful stuff with the info :)

Thanks for the info.

nevets’s picture

The location module can be enabled for selected content types and allows you to specify an address including the latitude and longitude. The advantage is you can specify and address and it will determine the latitude and longitude if possible.

lewiz’s picture

Thanks for the heads-up. I'm actually wanting to do the reverse of what you say this module offers -- I want to do reverse geocoding, which is converting a latitude and longitude into a place name :) I'll definitely check it out though to see if I can adapt it.

Thanks, Lewis.