Closed (fixed)
Project:
Google Maps location
Version:
6.x-1.0-beta3
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
20 Apr 2009 at 06:18 UTC
Updated:
29 Jul 2009 at 05:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
doxwrx commentedAs a side note, can anyone please tell me how to edit the node title for this module?
Thanx
Comment #2
JaredAM commentedThis is a great module but I think this would actually be a very useful addition. Since this module is to be used by "brochure and company profile web sites" it might be useful to have a Title and Body field so that people may set the page/node title as well as a body field to provide visitors with specific information regarding their location.
The ability to set the width and height would also be great.
To the OP: I created a module and used hook_form_alter to add a Title and Body field as well as to change the page title.
Comment #3
babbage commentedCommanderVimes: Code to create a custom module is I guess an OK help for people who may not know how to do it. However, can I suggest you post an actual patch to the module itself—if it looks good, we'll commit it.
Comment #4
JaredAM commentedHey, I figured out how to do a patch. My first!
In this patch:
Added gmaplocation/view and gmaplocation/edit MENU_LOCALTASK
Added an Information section where people may add a Title and Body to their gmaplocation page.
Changed gmaplocation_info title from "Description" to "Marker Information" to clarify the form.
Added description to gmaplocation_address to help google revolve the address
Added gmaplocation_width and gmaplocation_height to set the width and height of the map
Removed extra code for gmaplocation_key
Changed #validate to gmaplocation_admin_settings_validate
Modified page to include new information
Modified block so that subject will have the gmaplocation_title and users entered
Let me know if I created it correctly.
Comment #5
babbage commentedHi CommanderVimes,
First, congrats on creating your first patch, and thank you for assisting with the development of this module by doing this work.
Superficially, it looks like it is in the right format. (I'm yet to evaluate it properly.) Now the learning continues! Normal practice for Drupal development (for both modules and core) is to confine patches to changing one area of functionality at a time, rather than rolling up multiple separate changes into a single patch. Big patches with multiple changes make patches harder to review, make problems more difficult to troubleshoot, and make regressions harder to roll back in CVS. The first two would be something that could be worked around in this case, but the latter one means that I'm not really willing to commit this patch as a whole even if it appears to work.
This patch appears to do a number of quite separate things that are not dependent on each other and many of which are not addressing the original request raised in this particular issue... Don't be discouraged—they look like positive changes, and I'm happy to review all the changes that you've made. However, you need to:
a) create each one as a separate patch that is confined to a single area of functionality (that is, all the changes that are required for one new feature or bug fix).
b) create a separate issue in the issue queue of the module for each area of functionality, describing what it is designed to change or solve, and attaching the patch. Note that these patches will need to be created in a clear series, as each patch once applied will change the position that other patches will occur in the file.
I appreciate this may
seem likebe more work. However, there is a reason this is best practice and it's not something I'm willing to depart from.Comment #6
babbage commentedDecided to meet you half way... the simplest changes I'm just committing as where they are one-line changes they are easy to pick out of your larger patch and I can immediately see your changes. So:
Changed gmaplocation_info title from "Description" to "Marker Information" to clarify the form.
http://drupal.org/cvs?commit=228200
Comment #7
babbage commentedAdded gmaplocation/view and gmaplocation/edit MENU_LOCALTASK
http://drupal.org/cvs?commit=228206
Verrrry nice addition. Obvious thing to add. :)
Comment #8
babbage commentedAdded description to gmaplocation_address to help google revolve the address.
http://drupal.org/cvs?commit=228210
http://drupal.org/cvs?commit=228212
Comment #9
babbage commentedChanged #validate to gmaplocation_admin_settings_validate.
Already committed in #496796: Validate point to the wrong function.
Comment #10
babbage commentedModified page to include new information.
You'll need to be more specific here; make this a separate issue with any improvements to the page that have not already been applied above as a single patch.
Comment #11
babbage commentedModified block so that subject will have the gmaplocation_title and users entered.
Also needs to be more specific—explain what you are trying to achieve and attach a patch in it's own issue.
Comment #12
babbage commentedRemoved extra code for gmaplocation_key.
http://drupal.org/cvs?commit=228218
Added gmaplocation_width and gmaplocation_height to set the width and height of the map.
Separate issue please, with its own patch.
Comment #13
babbage commentedAll the above changes justify a new release as they include significant bug fixes. So for now, here comes b2...
Which just leaves...
Added an Information section where people may add a Title and Body to their gmaplocation page.
Now that we've removed everything else, we're finally back to our originally request. Please download a copy of b2 which contains all the changes I've applied (as referenced above), make your changes to that version, and create a patch from that. I'll then review and expect to be able to quickly commit those changes.
And once these other patches you've been working on have all been committed I'll follow b2 with another release....
Comment #14
babbage commented"Please download a copy of b2..."
Make that b3. [sigh]
Comment #15
doxwrx commentedJaredAM and dbabbage
Wow!
I just noticed these recent posts and am thrilled to see that you fellas are taking this module to a higher level.
Thanks for the great work. I look forward to implementing the updated module.
In the mean time, I had solved my issue by editing "drupal_set_title(t" in the gmaplocation.module file.
Comment #16
JaredAM commenteddbabbage,
Only thing I noticed missing from b3 is #required for the Google key. I'll install and test it (hopefully) sometime this week.
Comment #17
nicholas.alipaz commentedLooking forward to gmaplocation_body patch to be committed. Thanks for the recent changes!
Comment #18
nicholas.alipaz commentedLooking forward to gmaplocation_body patch to be committed. Thanks for the recent changes!
Comment #19
babbage commentedWell, I'm still waiting for that to be submitted as a separate patch—I've committed all the other patches but have asked JaredAM (previously CommanderVimes) to submit that here as a standalone patch against the current -dev version of the module so it can be reviewed properly.
Comment #20
babbage commentedAnd, to clarify, I would be happy to review a patch submitted by anyone else that re-rolls those specific proposed changes against the current version of the module, separating them out from all the other changes that have been committed already.
Comment #21
nicholas.alipaz commentedHere is a copy of the patch rolled against the current beta3 version. I do not see a "dev version" for D6. dbabbage, I hope that is what you are after.
I have added one more field to the form too. So now the output is:
Title
Location Information (shown above map)
Google Map
Location Information (shown below map)
This should allow users to input text above and below the map, in addition to customizing the page title.
Comment #22
nicholas.alipaz commentedBTW, this is an adequate patch for the current needs of most users. But it might be an idea to rewrite a bit of the module in the future so that the module creates a new content type that can allow for CCK fields.
Comment #23
nicholas.alipaz commentedUpdate for previous patch. This one sets the "body" field to be "not required". Requiring that field could cause issues for some people.
Please ignore previous patch and use this one.
Comment #24
nicholas.alipaz commentedOK, take 3. Hopefully last fix. Should have tested a bit more. Seems the last patch has an extraneous closing div tag. This one is pretty thoroughly tested. Enjoy!
Comment #25
nicholas.alipaz commentedBTW, I have another version that adds a text area to the block configuration page. This enables the admin to add some text above the static image in the block. I will post that as a new issue once this gets committed and finished being cleaned up if needed.
I am using the modified version of the module here, you can see the extra text in the sidebar:
http://sorkbeachrentals.regencyweb.info/
You can also see the added text above the map on the location page. The option to add text below the map is there as well, but I did not use it on this site:
http://sorkbeachrentals.regencyweb.info/location.html
Comment #26
babbage commentedInitial review of this patch; I have not tried to apply it yet. This generally looks like it is on the right track. A couple of small issues to be addressed.
+ '#title' => t('Information'), '#collapsible' => TRUE,These should appear on two separate lines.
Data retrieved from variable_get should not be passed through t(). (There may be one or two other examples of this too.)
(From http://api.drupal.org/api/function/t )
Finally, I think the descriptions are too specific—people may want to put text above and below the map that is nothing to do with location or driving information; it would be better for the descriptions to simply describe where the information will appear.
None of these are difficult to change; I could do this myself when I get some more time to look at this patch and actually try applying it, but if you are happy to upload an updated one please go ahead!
Comment #27
nicholas.alipaz commenteddbabbage,
I believe this version makes all the suggested changes. Some of which were in the originally submitted patch ;), I just copied 'em out I think.
Anywho, this patch moves all the t() functions so that they surround the default value and not the actual variable itself, which is to my knowledge the correct way to handle it. I did that on the newly added variables as well as any existing variables that it made since to do so with.
I also fixed that linebreak, as well as fixing a few other linebreak issues that were in the beta3 version.
Let me know if you see anymore issues.
Comment #28
JaredAM commentedSorry guys, I was out on vacation, will test the new version and report back.
Comment #29
JaredAM commentedI like the new patch with body above and below. Makes for a nice page, but in order to support filters for the location body and footer fields, the filter_form needs to be set for each textarea.
Comment #30
nicholas.alipaz commentedgood catch JaredAM. This seems to be working well for me using patch in #438834-27: Can I add text to the node page?
with your patch #438834-29: Can I add text to the node page? applied against it.
Marking, reviewed. Change if you would rather have a few more testers than you and I.
Comment #31
babbage commentedPatches in #27 and #29 committed, to a new 2.x branch. (1.0 has been released.)
http://drupal.org/cvs?commit=237646
I like this functionality, but don't like how the boxes are displayed on the edit form. This is going to remain in the (new) -dev version, at least until that is tidied up. However, that now becomes a new issue as this one is done.
JaredAM—when you re-roll a patch as you did in #29, it should be rolled against the current modules HEAD (that is, the files in CVS) and thus incorporate all the changes from any previous patches that were proposed *in that issue*, unless you are rolling them back deliberately. In contrast, what you uploaded had to be used after the patch in #27 had been applied. No big deal; just letting you know that's not the way that patches are usually done for Drupal. You can imagine why—if you joined a large issue late, you then only have to review/apply one patch to get up to speed, not 20 of them one on top of another. :)