By lewiz on
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
=-=
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.
Not on my system
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
NancyDru
=-=
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
Maybe in 6.x
They're probably going to make CCK part of core by then.
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru
=-=
no signs of them yet in my testing of D6
Brilliant! I feel silly for
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.
You may wish to also consider the location module
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.
Thanks for the heads-up.
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.