Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Use the CCK Widgets and Fields API instead of the Locative Information associated with each content type.
Comment | File | Size | Author |
---|---|---|---|
#27 | location_cck_6x_syntax_fix.zip | 2.75 KB | 2ndChanceTech |
#26 | location_cck_6x.zip | 2.75 KB | 2ndChanceTech |
#11 | location_cck.zip | 7.05 KB | webmasterkai |
#11 | location_cck-patches.zip | 5.47 KB | webmasterkai |
#3 | location_cck.zip_.not_.tar_.gz | 6.76 KB | ms2011 |
Comments
Comment #1
RobLoachThen you could do things that take advantage of the API, like use PathAuto to create URLs for nodes in relation to where they are.
Comment #2
ms2011 CreditAttribution: ms2011 commented+1 for providing CCK widget+field as an alternative to the current approach. you could also include an unlimited number of location fields, and give them different names...
Comment #3
ms2011 CreditAttribution: ms2011 commentedHere's what I was able to accomplish a few hours:
(see attached)
It works for adding fields, inputting values, and displaying them on the node. Unfortunately, it will need a bit more work to function with the Location API to integrate with Views, Gmap, etc. Maybe someone else can run with this? Otherwise, I'll work on it more as I have free time...
I started out by writing a contrib module I call location_cck.module and it works great, but I discovered that it really belongs in the core of the module... For instance:
I have already written most of the new code (501 lines) and the widget currently works. There's are several new advantages to this approach that are the same for any CCK Widget, but a couple I am excited for specifically are:
Things that are lacking are:
Things I would like to see added once the dust is settled:
Comment #4
ms2011 CreditAttribution: ms2011 commentedComment #5
vanvemdenMike,
+1, Great work! Just what I was looking for and surprised it did not yet exist. It makes sense to me to use one or more CCK fields for locations.
I hope I have some time soon to look at your module and the location module. A quick question I have right now: why is the field data stored in the 'content_type_x' table and not right away in the location table. If it would be stored in the location table, wouldn't the location module handle the rest (Views, GMap, etc) by itself? Or am I wrong?
Marco
Comment #6
Summit CreditAttribution: Summit commentedSubscribing. Looks great!
greetings,
Martijn
Comment #7
mandclu CreditAttribution: mandclu commented+1 for this, I'd like to use the city as part of my Autotitle setup.
Comment #8
GreenJelly CreditAttribution: GreenJelly commentedIs there a module page for this?
Comment #9
Boris Mann CreditAttribution: Boris Mann commentedIdeally it won't need a module page, it will ship with location module directly...
Comment #10
rickvug CreditAttribution: rickvug commented+1 for having this as part of the location package.
Comment #11
webmasterkai CreditAttribution: webmasterkai commentedUpdate to the module posted above. Includes some bug fixes.
Comment #12
philippejadin CreditAttribution: philippejadin commentedIn the mean time, can we use simple cck fields (input text) and hope than one day it will be possible to tell to a new generation location module "this field is the city" "this one is the postcode" "this one is the longitude" ?
This would be great
Comment #13
GreenJelly CreditAttribution: GreenJelly commentedGood work, will this be included in location?'
Comment #14
ms2011 CreditAttribution: ms2011 commentedthanks for your help webmasterkai. we still have a ways to go before this is really very useful. i haven't had time, but after speaking with bdragon it sounds like this functionality is slated for Location 3.
I just wanted to call some attention to rconstantine, who has been doing an excellent job of maintaining the cck_address.module. It even boasts some features location.module never provided, like zip code validation based on the country. IMHO, these two modules should be one. Now that Location.module has a new maintainer, bdragon, is there some possibility of interoperability or merger between the two? Maybe we don't have to build it from scratch.
Comment #15
Raving CreditAttribution: Raving commentedSubscribing
Comment #16
scottrigbyhello!
Is this patch still in need of testing (just checking since it's not clear from the comments so far whether this would still be relevant or useful)?
If so, what (if any) are the major things that would be helpful to test?
Cheers!
Scott
Comment #17
redben CreditAttribution: redben commentedJust what i needed ! this approach seems clean. One question though are the maintainers willing to depend on cck, or is it just an optional integration point ?
Comment #18
bcn CreditAttribution: bcn commented+1 to CCK'ifying the locations module...
Comment #19
ron_s CreditAttribution: ron_s commented+10 to CCK'ifying the locations module... ;)
Comment #20
groovypower CreditAttribution: groovypower commentedThis is awesome!!! I was wondering if you could add a method to fill out the location data with cck_address data already on the stored in a node or would it be better to do this once with a SQL command in phpMyAdmin and then convert all fields to use the Location widget instead of the cck_address?
Comment #21
jasontanner CreditAttribution: jasontanner commented+1 CCKing D6 version of Location 3
Comment #22
skizzo CreditAttribution: skizzo commentedWould the D5 patch in #11
work with location 5.x-3.0-test2 ?
Any chance that this addition finds
its way into forthcoming 3.0-beta?
Comment #23
geodaniel CreditAttribution: geodaniel commentedSubscribing to this, I like the idea.
Comment #24
ndwilliams3 CreditAttribution: ndwilliams3 commentedWhat is the latest on integration with Views and GMap?
Comment #25
mansspams CreditAttribution: mansspams commentedSubscibing indeed
Comment #26
2ndChanceTech CreditAttribution: 2ndChanceTech commentedI've been trying to port Location_CCK to D6.5 as I think it's just as important to have it now as it was in 5.x
Atleast for my website. I use it for things like "Birth Place" on profiles and information pages. In 5.x it worked great out of the box with gmap.
Anyways...
Currently I've made some basic changes, and uploaded what I have, I'm hoping someone can figure out the small left over issue, to get this functioning, but I'm lost. (I believe it's to do with the theme functions, that I just don't grasp yet)
Right now the module can be installed and activated without errors.
You can add Type "Location", and widget "Location Field" (no errors)
In the settings page, you can choose single or multiple (only tried single), and you can select the fields to display. (no errors).
All seems fine on the admin side, but then when you go to create content the fields do not show up for input.
I have an idea what needs to be changed, just can't figure it out at this time, PLEASE HELP!!!!
Comment #27
2ndChanceTech CreditAttribution: 2ndChanceTech commentedSorry, last upload had a syntax error I must of missed. Here's the corrected version.
Comment #28
bdragon CreditAttribution: bdragon commentedWhoops! I didn't notice it was completely missing from the 6.x tree!
Looking into it.
Comment #29
2ndChanceTech CreditAttribution: 2ndChanceTech commentedhey that would be awesome
Comment #30
kilnight CreditAttribution: kilnight commentedYes, getting the cck fields back into the 6.x tree would be huge... need them for a project right now :)
Comment #31
bdragon CreditAttribution: bdragon commentedOK, did some serious work on this.
It should be mostly working now.
http://drupal.org/cvs?commit=148463
Comment #32
scottrigbyHi bdragon - I enabled the new 6.x-3.x-dev location module & tried adding a location field.
But the next screen is blank white: http://MYSITE.COM/admin/content/node-type/profile/fields/field_profile_l...
it's not the white screen of death - it's just this screen that's affected.
Is there anything I can check beyond that at this point?
Comment #33
Anonymous (not verified) CreditAttribution: Anonymous commentedI am using location 6.x-3.0-rc2 and am trying to get the location cck module but I get the following error: "Fatal error: Cannot use string offset as an array in /var/www/d/sites/all/modules/location_cck/location_cck.module on line 268" when I try to create a node with the cck location field any help would be greatly appreciated.
Thanks
tristan.oneil
Comment #34
bdragon CreditAttribution: bdragon commented#326624: location cck field error after saving new field: fatal: cannot use string offset marked dupe.
The fatal error should be fixed now, by http://drupal.org/cvs?commit=149214.
Comment #35
Anonymous (not verified) CreditAttribution: Anonymous commentedGreat it is working now. I have a question about the location cck module and its integration with location gmap. It doesn't seem like the nodes are showing up on the node location map when entered through the location cck fields, and I am unable to create a view with the gmap format with entries entered using the cck location module. Is there something I'm missing?
Thanks,
tristan.oneil
Comment #36
Anonymous (not verified) CreditAttribution: Anonymous commentedAlright I figured out the problem, but I'm not sure how to fix it. It seems that the cck location module is not geocoding, do you have any idea as to how to remedy this.
Comment #37
that0n3guy CreditAttribution: that0n3guy commentedI just tested out the Location_cck widget/field from the DEV I downloaded today (10-31-08 Happy Halloween) on a fresh download of Acquia D6 and here are some things I noticed:
-Phone numbers do not display after submit
-Nothing display's for that field in the "preview" (when you hit preview button instead of submit)
-The Display settings (where you check the items you want it to hide) seems to do nothing.
-Address dont seem to be geocoding, I think this is the same problem as Tristan.oneil above.
Also, is there a way to hide the Long/Lat text entry boxes?
Comment #38
that0n3guy CreditAttribution: that0n3guy commentedUpdate, I got my cck location fields to geocode, I have no idea how, they just started working.
But the field lists everything grouped together in views (which is kinda to be expected).
My initial solution to all of my problems is to just not use the cck part of this module. It seems to have quite a few little problems. I decided I didn't need to use it for my current project so I wont :).
Comment #39
maastrix CreditAttribution: maastrix commentedGreat! Nice work!
Comment #40
janusman CreditAttribution: janusman commentedSubscribing
Comment #41
joshcali CreditAttribution: joshcali commentedsubscribing
Comment #42
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedsubscribing
Comment #43
drupalok CreditAttribution: drupalok commentedsubscribing
Comment #44
YesCT CreditAttribution: YesCT commentedtagging as a master issue.
Also, #347030: location_cck needs a views relation seems to be one of the major missing components to people using the cck locations, and #343943: CCK location not available to views/proximity-filtering > PATCH failed for 5.x is the hack some people are using to get around this while they wait for the relation to work.
I'm tempted to mark this issue "fixed" as cck locations are in!
Comment #45
YesCT CreditAttribution: YesCT commentedyep. marking this fixed. Please search for issues, or open a new issue for specific things wrong with cck locations.