Hi,
This small patch adds a new email token %EI1O% which is the same than %EI1% (first alarmed frame) but sends the red outlined version instead.
Regards,
BaZso
Patch:
--- ./zmfilter.orig 2009-01-04 00:54:20.000000000 +0100
+++ /usr/bin/zmfilter.pl 2009-01-04 00:56:30.000000000 +0100
@@ -804,7 +804,7 @@
}
# Do we need the image information too?
- my $need_images = $text =~ /%(?:EPI1|EPIM|EI1|EIM)%/;
+ my $need_images = $text =~ /%(?:EPI1|EPIM|EI1|EI1O|EIM)%/;
my $first_alarm_frame;
my $max_alarm_frame;
my $max_alarm_score = 0;
@@ -862,6 +862,10 @@
{
push( @$attachments_ref, { type=>"image/jpeg", path=>sprintf( "%s/%0".ZM_EVENT_IMAGE_DIGITS."d-capture.jpg", getEventPath( $event ), $first_alarm_frame->{FrameId} ) } );
}
+ if ( $attachments_ref && $text =~ s/%EI1O%//g )
+ {
+ push( @$attachments_ref, { type=>"image/jpeg", path=>sprintf( "%s/%0".ZM_EVENT_IMAGE_DIGITS."d-analyse.jpg", getEventPath( $event ), $first_alarm_frame->{FrameId} ) } );
+ }
if ( $attachments_ref && $text =~ s/%EIM%//g )
{
# Don't attach the same image twice
Patch - Emailing red outlined image
-
- Posts: 10
- Joined: Tue Oct 07, 2008 12:38 pm
Hi,
it's simple. If you do not want to work with diff patch, or you have different version, do this:
Edit the zmfilter.pl file
find the firs line containing EI1 string, insert EI1O like that (look at the patch where and how)
find the second EI1 string, copy the whole "if" block, in one of them change EI1 to EI1O
Ooops, don't forget to change d-capture.jpg to d-analyse.jpg
Done
You have %EI1O% token what you can use in the email settings.
(Try to pair these steps to the patch, easy to learn)
BaZso
it's simple. If you do not want to work with diff patch, or you have different version, do this:
Edit the zmfilter.pl file
find the firs line containing EI1 string, insert EI1O like that (look at the patch where and how)
find the second EI1 string, copy the whole "if" block, in one of them change EI1 to EI1O
Ooops, don't forget to change d-capture.jpg to d-analyse.jpg
Done
You have %EI1O% token what you can use in the email settings.
(Try to pair these steps to the patch, easy to learn)
BaZso