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.
I'm not sure whether this is the right way to go about submitting Drupal module patches (this is my first), so go easy on me!
What I was lacking in GMap was a way in which to associate different API keys with different domains running the site. I know this was possible previously with the keys module, but I see that that has not been ported for D7 yet.
I have written a very basic patch that adds this functionality to GMap and D7.
Let me know what you think!
Comment | File | Size | Author |
---|---|---|---|
gmap-multiple-domains-support.patch | 5.24 KB | alexpls | |
Comments
Comment #1
alexpls CreditAttribution: alexpls commentedComment #2
alexpls CreditAttribution: alexpls commentedComment #3
Sutharsan CreditAttribution: Sutharsan commentedIt is not a good idea to change variable 'googlemap_api_key' into 'googlemap_api_keys' without providing an upgrade path. This way, everyone installing the module/patch will lose the API key.
The patch contains lines with trailing while space. Use Coder module to check.
Typo '$key_' in:
foreach($keys as $key_ => $values) {
You can leave '$key_' out.
Personally I'm not a fan of single character variables i.e.
$f
.$fieldset
has much more meaning.Make the fieldset non collapsible. It's not something that should be hidden.
Don't break translatable strings and don't include
<em>
:... Your current hostname is <em>' . $_SERVER['HTTP_HOST'] . '</em>.'
Use the % placeholder as described in t().
Comment #4
drupal a11y CreditAttribution: drupal a11y commentedAny updates on this?
For D6 exists also this add on for the Domain Module: http://drupal.org/project/domain_bonus
Comment #5
Sutharsan CreditAttribution: Sutharsan commentedA port of the Keys module is waiting for review: #1362494: Thorough review of 7.x dev branch. That could be a solution to this problem.
[edit] The patch is not a port but a thorough review.
Comment #6
drupal a11y CreditAttribution: drupal a11y commentedKeys Module is working fine with D7!