Closed (won't fix)
Project:
Location
Version:
6.x-3.0
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Jan 2009 at 01:30 UTC
Updated:
29 Jul 2011 at 13:14 UTC
Jump to comment: Most recent file
Comments
Comment #1
jean-bernard.addor commentedAs well as cell phone.
Comment #2
yesct commentedhmmm I'm thinking that regular cck fields can fill that need?
maybe the fancy version of including those kinds of things could be generic: a user interface which could allow an admin to select other cck fields enabled on their site to be part of a meta location. Then that location could include the usual location stuff, and any other cck fields that were added, like a file/picture.
This might be possible now, create a content type meta location, add whatever cck fields you want, and add a location. Then in your content type, business directory entry, for example, add a meta location (or a node reference to it). Or, in your content type, business, allow multiple business diretory entries, or multiple meta location entries.
Tagging.
Comment #3
yesct commentedmarked #349936: URL associated with location as a duplicate of this issue
Comment #4
socialnicheguru commentedif using this method though, how would the item be associated with the location in the location table?
I am using cck location field now and am having issues with proximity filters, etc.
Comment #5
yesct commentedif each node only had one location, and if you could make a view that would list the correct nodes, then in the fields, you should be able to select the website or email fields associated with that node (not with the location)...
Comment #6
socialnicheguru commentedI use location for venues. It would be great to add the venue url and email address as part of location just like phone or fax now. It is just easier. that's all. just a suggestion :)
Comment #7
yesct commentedI dont know... this sounds like location is turning into a directory module. Maybe it should be the other way around, use a directory module, and use location as part of that solution?
Or if not use a directory module, create a directory content type, then use location as PART of the solution for that content type. Let that other content type worry about having a venue url and email address.
Thoughts???
Comment #8
jean-bernard.addor commentedNo sure to understand you.
My first idea for using location was to use location CCK as a repeatable field on the main node. This way, all location field (location phone ...) are repeated for each iteration of the location CKK field, with a clear association. If I put all the phone numbers on the main node, as CCK field, I will not know which one is going with which location, as, as far as I know there is no way to repeat groups of CCK fields, only individual fields can be repeted. This told, it would be extremly nice for me to be able to repeat groups of CCK fields.
I am also considering to have a main node type with references to a secondary node type for locations that way I could add as many CCK field as I want and one single (CCK) location field to the secondary node type. It seems simpler and more powerful from the drupal point of view, but it would be longer and more complicated to enter the data for the users of the site.
Comment #9
yesct commentedOne idea is to arrange the phone, website and the cck location (so they are associated with the location as you say) in a field group in the cck content type. Give that a try.
I get where you are coming from now, because you have a node that has multiple locations and each location has a field (like phone or website) and so it is easier to just have that be part of the location module. But, like you said, the Drupal way seems to be instead to use the building blocks of location, cck, etc to build what you need. Harder to get going the first time, but is super cool, and you dont have to wait on a maintainer of the project to implement it for you! (any project, not dissing bdragon. love bdragon!)
Comment #10
bartezz commentedI added website field.... here's the zip, unpack in contrib folder.
If anyone needs a email field for location let me know, I'll create it and post it here!
Cheers
Comment #11
socialnicheguru commentedemail field would be great too!
Comment #12
bartezz commentedWill look into that tomorrow!
Cheers
PS. if the add-on I added above worked for you, let it know so maybe it can get committed
Comment #13
bartezz commentedHere ya go....
Cheers
PS. post back if it works!
Comment #14
agileware commentedPlease post patch files instead of zip files.
It is much easier and also the standard on drupal.org
and mark the issue needs review if that is the case.
Comment #15
juicytoo commentedI think this is a great idea.
No more needing to use views and relations and arguments and stuff like that, just to achieve the simple purpose of putting things together where they should be.
Thanks for the implementation Bartezz .
Comment #16
bartezz commented@#14
I know patches are the standard... but erm there is nothing to patch here!
These are complete new files including within a directory...
This directory is supposed to be dropped into the contrib directory.
Not sure but as far as I know you can't create directories by means of a patch, nor can you patch none existing files...
Hence a ZIP file...
Cheers
Comment #17
agileware commentedFYI,
If you have a copy of the current location module and a copy of your new version (both the whole location directory with everything under it) you can use
Of those options, the u & the p are for readability and should be always used. The r makes it recursive, so you get your folders and the N treats missing files as empty, so if a file did not exist before it is created.
Comment #18
bartezz commentedFair enough... didn't know about that. Using Tortoise SVN.
Comment #19
bomarmonk commentedI downloaded your zipped modules and placed them in the contrib directory. There was no problem adding the email and url fields to the cck location node. However, the email address entered into the location form does not display when viewing the node.
Comment #20
bartezz commentedHi Bomarmonk,
But the website field IS showing? Weird!
Do you have CCK Content Permissions module enabled?
Cheers
Comment #21
bomarmonk commentedWell, after trying the URL field, it didn't display either. I tried both the full node view and the views listing of these locations. I unistalled the location module, reinstalled it, cleared my cache, and resaved the content type with the email and url fields. I'm not sure what might be preventing them from showing up-- could still be a configuration issue on my side.
Comment #22
klonostesting both email and url right now... will report back soon.
Comment #23
petethedude commentedThanks for these. I actually needed a couple custom field, so I used your code to create Location region and languages fields. My problem now is that I needed those fields to work as Views filters, but they won't show up under Filters in views. Any quick notions of how I can get them to show up there? I want to create some views blocks that filter by my new region and languages fields.
EDIT: I now realized that it's already coded for Location view types, but Node view types it wasn't. I found the following in location_fax.views.inc and added it to location_email.views.inc on line 27
Comment #24
kloewer commentedIf you do so, you should probably add:
'help' => t('The Email address of the selected location.'),
to line 34:
// location_email table -- fields
$data['location_email']['email'] = array(
'title' => t('Email'),
'help' => t('The Email address of the selected location.'),
'field' => array(
'click sortable' => TRUE,
),
Comment #25
Hardrocker commentedYesCT I am now using the location module for a directory service and using cck fields for name, email and website are all possible with cck. However since location is grouping its cck fields the other fields i mentioned above are left outside of the fieldgroup hence making it very unsightly and confusing to users. The aim is wanting a Name, Email and Website field to fall into the fieldgroup with the options of not collecting info from certain fields when needed as it is with other fields currently. Let me know your views on this please. Cheers!
Hardrocker
Comment #26
mattcasey commented#10 patch works, but you have to edit the location.tpl.php file as well!
Because I use the URL field as a link to the "Name" field, I included this to the top of my file:
Also, Theme Developer suggests us-location.tpl.php as a possible template override, but I wish I could create user or node-type overrides as well...
Comment #27
rooby commentedI agree with YesCT in #7, the location module is for locative information. CCK and it's related modules, like the email, link, date etc. modules are for this type of thing.
If you really want to go this way about it I recommend creating a new project on drupal.org called location_extra or something.
Then you can add all the fields you like in the manner used in #13.
My full reasoning can be found here #1079764-4: Adding extra fields to the Locative information collected.
(Also, posts #2 & #5 of that issue outline possible solutions for adding more fields to location information.)
Comment #28
bartezz commentedAs a developer I do agree that email and url fields are not locative information. But putting on my user hat I know it would be more logical usabillity wise to have one fieldset to enter all information on a location. Similar to Google Maps. Which is a combined location directory and works like a charm :)
Location_extra.module sounds like a good plan, will see if I have the time to create a module for this.
Cheers
Comment #29
dizarter commentedHow to display the location URL and email fields added by plugins in #10 and #13 under views fields?
Thanks!
Comment #30
rooby commented@dizarter:
After a brief look over the code it seems there is some views support there.
After installing the module you should be able to select 'Location: Email' just as you would any other location field.
However, the views support is not complete so it will only work for node views.
Using a user view with user locations is not supported by #10 or #13.
Those modules were probably made when location views support was less comprehensive so they aren't quite as feature rich as the location module fax and phone fields are now.
Comment #31
bartezz commented@rooby; You are right... if I remember correctly the views support was indeed less comprehensive. Anyone needing field views support is welcome to update #10 and #13 :) I'm dealing with chronic lack of time syndrome...
Cheers