I use a filter that scan attachments to make a photo gallery inline (with the jQuery cycle plugin) :

a:8:{s:5:"label";s:9:"Diaporama";s:11:"description";s:19:"jQuery Cycle plugin";s:2:"id";s:1:"2";s:7:"enabled";b:1;s:8:"advanced";b:1;s:5:"delta";s:1:"1";s:10:"components";a:3:{i:0;a:3:{s:5:"class";s:22:"flexifilter_chunk_grab";s:8:"settings";a:7:{s:6:"starts";s:11:"[diaporama]";s:4:"ends";s:12:"[/diaporama]";s:11:"pass_limits";i:0;s:14:"case_sensitive";i:0;s:12:"include_rest";i:1;s:4:"step";s:7:"process";s:10:"components";a:1:{i:0;a:3:{s:5:"class";s:24:"flexifilter_advanced_php";s:8:"settings";a:2:{s:4:"code";s:1124:"$output = "";

if (arg(0) == "node" && is_numeric(arg(1))) {

  $node = node_load(arg(1));

  if ($node->nid) {

$js = "  $('#diaporama').cycle({ ".$text."  });";

$content = "";
$maxwidth = 0;
$maxheight = 0;

  foreach ($node->files as $file) {

    if (substr($file->filemime, 0, 5) == 'image' && substr($file->description, 0, 9) == 'diaporama' && $file->status == 1) {

    $current_image = array_values(getimagesize($file->filepath));

    $maxwidth = ($maxwidth <= $current_image[0] ? $current_image[0] : $maxwidth);

    $maxheight = ($maxheight <= $current_image[1] ? $current_image[1] : $maxheight);

    $content .= theme_image($file->filepath, '', '', array ('width' => $current_image[0], 'height' => $current_image[1]), FALSE);

    }

  }

$output = "<script type='text/javascript'>$(function() {" . $js . "});</script><div id='diaporama' style='width:" . $maxwidth . "px;height:" . $maxheight . "px'>" . $content . "</div>";

  }

}

return $output;";s:4:"step";s:7:"process";}s:2:"id";s:2:"32";}}}s:2:"id";s:2:"31";}s:7:"id_next";i:33;s:9:"id_prefix";s:22:"flexifilter_component_";}s:3:"fid";s:3:"new";}

Now, if I only adds attachments without altering the body of the message, then the filter does not reload and my photo gallery will not be updated.

Demo : woodhome.fr

How can I force the filter reload every time I edit a node ?

Thank's for this great module ...

CommentFileSizeAuthor
#3 flexifilter.module.patch28.54 KBarhip

Comments

lilou’s picture

Title: Flexifiltrer not load if body unchanged » Flexifiltrer not load if body altered

title modified ...

lilou’s picture

Title: Flexifiltrer not load if body altered » Flexifiltrer not load if body not altered

oups.

arhip’s picture

StatusFileSize
new28.54 KB

I set 'no cache' in this patch, so the content won't need to be altered to reflect any changes. This is not a good solution, though, since content will be processed every node loads.

cwgordon7’s picture

Status: Active » Closed (duplicate)

This is a duplicate of the other issue, which describes this better.