Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 211 of 795  Not logged in ELOG logo
ID Date Icon Author Author Email Category OS ELOG Version Subjectup
  65905   Fri Jun 6 11:24:49 2008 Reply Stefan Rittstefan.ritt@psi.chQuestion 2.7.3-2104Re: Conditional Attributes Boolean?

Grant Jeffcote wrote:
After searching the manual and not finding (missing?) the answer is it possible to add conditional statements to a Boolean attribute? I would like a tick box to be able to trigger an event when submitted.


Conditions are not possible with boolean attributes. You have to define the attribute as a list like

Attributes = ..., Flag, ...
Options Flag = Yes{0}, No{1}

{0} ...

{1} ...
  1060   Wed Apr 6 21:15:03 2005 Reply Stefan Rittstefan.ritt@psi.chQuestionWindows2.5.8.2Re: Conditional Attributes/Preset Text
> I upgraded from ver 2.5.5-2 to 2.5.8-2 and found that none of my preset text
> worked any longer.  I struggled with it for several hours and then reverted
> back to 2.5.5-2 and the preset text worked again.  I have attached my
> elgd.cfg file for review.  Thanks in advance for your help...

Your config file really helped. You found a bug which happens only if one uses
conditions with lowercase letters, so that's why nobody else saw it before. I
fixed it and released V2.5.8-3
  1063   Thu Apr 7 00:51:05 2005 Agree David Brodydbrody@echo-inc.comQuestionWindows2.5.8.2Re: Conditional Attributes/Preset Text
> > I upgraded from ver 2.5.5-2 to 2.5.8-2 and found that none of my preset text
> > worked any longer.  I struggled with it for several hours and then reverted
> > back to 2.5.5-2 and the preset text worked again.  I have attached my
> > elgd.cfg file for review.  Thanks in advance for your help...
> 
> Your config file really helped. You found a bug which happens only if one uses
> conditions with lowercase letters, so that's why nobody else saw it before. I
> fixed it and released V2.5.8-3

Thanks for the information.

ELOG is terrific!
  1902   Tue Aug 15 13:44:45 2006 Reply Stefan Rittstefan.ritt@psi.chQuestionWindows Re: Conditional E-Mail Attributes
Conditional attributes have been made working in email notifications sometime in version 2.6.0. You might have to upgrade to the recent version, but then it should work.
  1903   Fri Aug 18 14:22:07 2006 Reply Grant Jeffcotegrant@jeffcote.orgQuestionWindows Re: Conditional E-Mail Attributes

Stefan Ritt wrote:
Conditional attributes have been made working in email notifications sometime in version 2.6.0. You might have to upgrade to the recent version, but then it should work.


I'm using your latest binary release but still can't seem to get the 'Email Encoding' function to be decided under a conditional entry? There are no other references to email encoding in the logbook but it defaults to type 2 on all emails regardless of what the conditional attribute is set to.

Example below:

{1}Email attributes = Event Date, Event Start, Event End,
{1}Email Encoding = 2

{2}Email attributes = Service Affected, Ticker Text,
{2}Email All = seg@sdf.com
{2}Preset text = Ticker Text Entry
{2}Email Encoding = 1

{3}Email attributes = SMS,
{3}Email Encoding = 1
{3}Email All = sdb@sdf.com

Thx


  1904   Fri Aug 18 15:31:53 2006 Reply Stefan Rittstefan.ritt@psi.chQuestionWindows Re: Conditional E-Mail Attributes
If I try that little configuration file:
[global]
port = 8080
password file = passwd
smtp host = your.smpt.host

[demo]
Theme = default
Comment = General linux tips & tricks
Attributes = Author, Type, Category, Subject, Email Type
Options Type = Routine, Software Installation, Problem Fixed, Configuration, Other
Options Category = General, Hardware, Software, Network, Other
Options Email Type = plain{1}, html{2}

{1}Email encoding = 1
{2}Email encoding = 2

then the email encoding changes from plain to HTML depending on the conditional attribute Email Type. Maybe you misunderstood the concept of conditional attributes. In the above config the attribute Email Type determines the condition {1} or {2}, which leads then to different values of the email encoding. But it's important to have the line
Options Email Type = plain{1}, html{2}

in order to set a condition.
  1905   Sat Aug 19 15:47:52 2006 Reply Grant Jeffcotegrant@jeffcote.orgQuestionWindows Re: Conditional E-Mail Attributes

Stefan Ritt wrote:
If I try that little configuration file:
[global]
port = 8080
password file = passwd
smtp host = your.smpt.host

[demo]
Theme = default
Comment = General linux tips & tricks
Attributes = Author, Type, Category, Subject, Email Type
Options Type = Routine, Software Installation, Problem Fixed, Configuration, Other
Options Category = General, Hardware, Software, Network, Other
Options Email Type = plain{1}, html{2}

{1}Email encoding = 1
{2}Email encoding = 2

then the email encoding changes from plain to HTML depending on the conditional attribute Email Type. Maybe you misunderstood the concept of conditional attributes. In the above config the attribute Email Type determines the condition {1} or {2}, which leads then to different values of the email encoding. But it's important to have the line
Options Email Type = plain{1}, html{2}

in order to set a condition.


I use conditional attributes to select the fields I would like displayed on a form or page.
I understand how they work but wish to set the Email Encoding automatically depending on which item they choose from a drop down list (ie. which form they are using)

For example, if they choose 'Fred Bloggs' from the conditional drop down attribute 'Name' it will set the page so that only 'Fred Bloggs' required attributes are viewable. I wish to send this page in Plain text when submitted.

If 'Fred Jones' is chosen then only attributes applicable to 'Fred Jones' are shown. When he submits his entry then I need the email to be sent in HTML.

The email encoding option would have to be set under either Fred Bloggs{1} or Fred Jones{2} conditions.

Attributes = Name,

Options Name = Fred Bloggs{1}, Fred Jones{2}

{1}Email encoding = 1
{1}Email All = sed@frd.fg
{2}Email encoding = 2
{2}Email All = sdf@fgd.hg

I can get options like 'Email All = sed@frd.fg' to change to another email address when used as above but not Email formatting.

I have all the other conditional attributes working fine otherwise but would really like to be able to add this option.

Thanks for your help.
  1906   Sat Aug 19 18:45:22 2006 Reply Stefan Rittstefan.ritt@psi.chQuestionWindows Re: Conditional E-Mail Attributes

Grant Jeffcote wrote:

Stefan Ritt wrote:
If I try that little configuration file:
[global]
port = 8080
password file = passwd
smtp host = your.smpt.host

[demo]
Theme = default
Comment = General linux tips & tricks
Attributes = Author, Type, Category, Subject, Email Type
Options Type = Routine, Software Installation, Problem Fixed, Configuration, Other
Options Category = General, Hardware, Software, Network, Other
Options Email Type = plain{1}, html{2}

{1}Email encoding = 1
{2}Email encoding = 2

then the email encoding changes from plain to HTML depending on the conditional attribute Email Type. Maybe you misunderstood the concept of conditional attributes. In the above config the attribute Email Type determines the condition {1} or {2}, which leads then to different values of the email encoding. But it's important to have the line
Options Email Type = plain{1}, html{2}

in order to set a condition.


I use conditional attributes to select the fields I would like displayed on a form or page.
I understand how they work but wish to set the Email Encoding automatically depending on which item they choose from a drop down list (ie. which form they are using)

For example, if they choose 'Fred Bloggs' from the conditional drop down attribute 'Name' it will set the page so that only 'Fred Bloggs' required attributes are viewable. I wish to send this page in Plain text when submitted.

If 'Fred Jones' is chosen then only attributes applicable to 'Fred Jones' are shown. When he submits his entry then I need the email to be sent in HTML.

The email encoding option would have to be set under either Fred Bloggs{1} or Fred Jones{2} conditions.

Attributes = Name,

Options Name = Fred Bloggs{1}, Fred Jones{2}

{1}Email encoding = 1
{1}Email All = sed@frd.fg
{2}Email encoding = 2
{2}Email All = sdf@fgd.hg

I can get options like 'Email All = sed@frd.fg' to change to another email address when used as above but not Email formatting.

I have all the other conditional attributes working fine otherwise but would really like to be able to add this option.

Thanks for your help.


Can you please try the above configuration example, and can you please tell me exactly which version of elog you are using? If I try that example with ELOG V2.6.2-1714, it works fine (it DOES change the email encoding).
ELOG V3.1.5-fe60aaf