It seems that the "disabled pages" paths only work for the specific paths, could we change this to support any paths starting with the defined path?

i.e. I want to exclude all pages after events\* but that doesn't seem to work, i tried 7.x-1.3, 7.x-1.4 and latest dev.
It only accepts the full paths i.e. events/webinars/123/test. Unless I'm using the wrong format?

@Osman, Thanks again as initially i remember you created this module during our conversation on stackoverflow, you rock! I don't mind hacking my module if you can kindly advise.

I'd say it's in lazy.module

either under function theme_lazy_image($variables) {

$disabled_paths = preg_split("/\s+/", variable_get('lazy_disabled_paths'));

or

function _filter_lazy_process($text, $filter) {

  $disabled_paths = preg_split("/\s+/", variable_get('lazy_disabled_paths'));

  if ($library_installed && !in_array(drupal_get_path_alias(), $disabled_paths)) {
    $html_dom = filter_dom_load($text);

    foreach ($opt_tags as $tag) {
      $matches = $html_dom->getElementsByTagName($tag);
      foreach ($matches as $element) {
        $classes = $element->getAttribute('class');
        $classes = (strlen($classes) > 0) ? explode(' ', $classes) : [];
        if (!in_array($opt_skipClass, $classes)) {
          $classes[] = $opt_selector;
          $element->setAttribute('class', implode(' ', $classes));

          $src = $element->getAttribute('src');
          $element->removeAttribute('src');

          $element->setAttribute($opt_src, $src);
          $element->setAttribute('src', $opt_placeholderSrc);
        }
      }
    }

    $text = filter_dom_serialize($html_dom);
  }

Comments

markusd1984 created an issue. See original summary.

markusd1984’s picture

Issue summary: View changes

  • osman committed e33529a on 7.x-1.x
    Issue #3209086: wildcard for disabled pages paths?
    
osman’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.