πŸ‡ΊπŸ‡ΈUnited States @markabur

Account created on 19 December 2007, over 17 years ago
#

Recent comments

πŸ‡ΊπŸ‡ΈUnited States markabur

I just noticed the same problem and made the same fixes as #3 and #4 before I found this issue. It works!

πŸ‡ΊπŸ‡ΈUnited States markabur

In the footer, "Signup for Drupal News" should be "Sign up for Drupal news" as on the old site.

"Signup" is a noun. "Sign up" is a verb.

πŸ‡ΊπŸ‡ΈUnited States markabur

The issue in #44 was because I was testing as user 1. The image preview link is hidden for other users unless they have the permission set to see it, so back to RTBC.

πŸ‡ΊπŸ‡ΈUnited States markabur

I found this issue because I miss those comments too. I maintain several D7 sites and up until the comments were removed, I still referred to pages such as l() for its valuable examples in the comments.

https://web.archive.org/web/20210507000325/https://api.drupal.org/api/dr...

Without comments or examples, the API page is no better than the source code that I already have on my machine.

It's a shame that we need to rely on archive.org now for docs for what is still the most popular version of Drupal.

πŸ‡ΊπŸ‡ΈUnited States markabur

I'm trying #36 with a regular imagefield and I still see the "Image Preview" link even though that option is unchecked for the field.

I can see that focal_point_preprocess_image_widget() needs to change depending on the focal_point_previewsetting, but I can't figure out how to check that setting for the field.

πŸ‡ΊπŸ‡ΈUnited States markabur

I like this approach! In my case I needed to check which view I was currently altering, and I also needed some data from the rendered row result in order to use custom numbered markers. Here's what I changed:

-          $context = array('view_row' => $result);
+          $context = array(
+            'view_name' => $this->view->name,
+            'view_display' => $this->view->current_display,
+            'view_row' => $result,
+            'view_row_rendered' => $this->rendered_fields[$id],
+          );

Here's how I am using the new context info. (My view is configured in Views UI with a result counter, which is available in view_row_rendered but not in view_row.)

function mymodule_geofield_map_data_alter($datum, $context) {
  if (!empty($context['view_row']) && $context['view_name'] == 'my_map') {
    $path = '/' . drupal_get_path('module', 'mymodule') . '/markers/';

    // Path to custom numbered marker icon, e.g. mymodule/markers/number12.png .
    $result_counter = $context['view_row_rendered']['counter'];
    $icon = $path . 'number' . $result_counter . '.png';

    // Set path to custom icon.
    $datum->options['icon'] = $icon;
  }
}
πŸ‡ΊπŸ‡ΈUnited States markabur

I tried using this feature to add a new marker set using a custom module. I used a debugger to verify that the custom marker .ini is being read and that the icons are available in $icons at the end of _gmap_get_icondata(). However, the custom custom marker set is not showing up in Views. I'm looking at the "Marker / fallback marker to use" popup and don't see my marker set listed there.

Here is my .ini file. It is called "mynumbers.ini":

; Defaults
[defaults]
; Note: An empty shadow property will break IE.
; Leave it commented out if you aren't supplying an image.
;shadow = ""
anchorX = 10
anchorY = 29
infoX = 17
infoY = 6

; Marker sets
[mynumbers]
name = "My Numbers"
sequence = "mynumber1.png,mynumber2.png,mynumber3.png,mynumber4.png,mynumber5.png,mynumber6.png,mynumber7.png,mynumber8.png,mynumber9.png,mynumber10.png,mynumber11.png,mynumber12.png,mynumber13.png,mynumber14.png,mynumber15.png,mynumber16.png,mynumber17.png,mynumber18.png,mynumber19.png,mynumber20.png"

; Files

I've also tried leaving it as numbers.ini and naming the icons like number1.png, etc. but my custom icons don't override the default Numbers icon set (using Views to generate the map).

πŸ‡ΊπŸ‡ΈUnited States markabur

Can you be more specific?

Production build 0.71.5 2024