Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   <img> in Display Attribute, posted by Emiliano Gabrielli on Fri Jul 8 19:08:30 2005 
    icon2.gif   Re: <img> in Display Attribute, posted by Stefan Ritt on Fri Jul 8 22:18:01 2005 
       icon2.gif   Re: <img> in Display Attribute, posted by Emiliano Gabrielli on Sat Jul 9 16:06:58 2005 
          icon2.gif   Re: < img > in Display Attribute, posted by Stefan Ritt on Mon Jul 11 13:13:27 2005 
             icon2.gif   Re: < img > in Display Attribute, posted by Emiliano Gabrielli on Mon Jul 11 14:30:11 2005 
                icon2.gif   Re: < img > in Display Attribute, posted by Emiliano Gabrielli on Fri Jul 15 17:28:33 2005 
                   icon2.gif   Re: < img > in Display Attribute, posted by Stefan Ritt on Wed Jul 20 23:30:45 2005 
                      icon2.gif   Re: < img > in Display Attribute, posted by Emiliano Gabrielli on Thu Jul 21 09:31:35 2005 
                icon2.gif   Re: < img > in Display Attribute, posted by Stefan Ritt on Sat Jul 16 12:30:33 2005 
                   icon2.gif   Re: < img > in Display Attribute, posted by Emiliano Gabrielli on Mon Jul 18 10:09:06 2005 
          icon2.gif   Re: <img> in Display Attribute, posted by Stefan Ritt on Wed Jul 20 23:32:46 2005 
             icon2.gif   Re: <img> in Display Attribute, posted by Emiliano Gabrielli on Thu Jul 21 12:54:32 2005 
                icon2.gif   Re: <img> in Display Attribute, posted by Stefan Ritt on Fri Jul 22 23:14:23 2005 
                   icon2.gif   Re: <img> in Display Attribute, posted by Emiliano Gabrielli on Sat Jul 23 16:16:10 2005 
                      icon2.gif   Re: <img> in Display Attribute, posted by Stefan Ritt on Sat Jul 23 18:23:57 2005 
                         icon2.gif   Re: <img> in Display Attribute, posted by Emiliano Gabrielli on Mon Jul 25 13:29:23 2005 
                            icon2.gif   Re: <img> in Display Attribute, posted by Stefan Ritt on Mon Jul 25 21:29:52 2005 
                               icon2.gif   Re: <img> in Display Attribute, posted by Emiliano Gabrielli on Tue Jul 26 10:45:14 2005 
                   icon2.gif   Re: <img> in Display Attribute, posted by Emiliano Gabrielli on Sat Jul 23 16:45:28 2005 
                      icon2.gif   Re: <img> in Display Attribute, posted by Stefan Ritt on Sat Jul 23 18:30:57 2005 
Message ID: 1257     Entry time: Mon Jul 11 14:30:11 2005     In reply to: 1256     Reply to this: 1274   1275
Icon: Reply  Author: Emiliano Gabrielli  Author Email: AlberT@SuperAlberT.it 
Category: Request  OS: All  ELOG Version:  
Subject: Re: < img > in Display Attribute 

Stefan Ritt wrote:

Emiliano Gabrielli wrote:
Still a problem .. sorry:
Options Category              = Info,Report,Problem{1},Other
Preset Category               = Info
Display Category              = <img style="border:0; float:left; margin-right:5px" src="icons/$category.png">$category

{1}ROptions Level             = Notice,Warning,Alert,Fixed
{1}Preset Level               = Warning
{1}Display Level              = <img style="border:0; float:left; margin-right:5px" src="icons/$level.png">$level

when I try to use this featur on a conditional attr it is ignored .. If I remove the {1} it is obviously showed .. but also when no $level is defined (taht is infact not what should be)...



BTW, is it possible to not show conditional attributes in mail and in "single entry" view? .. it's quite strange to ave a "Level" of a "Misure", not a "Problem" Tongue


thank you in advance Smile


Well, that's not the way condition attributes are supposed to work. They were designed to modify the new entry input mask, to have diefferent option lists depending on the value of an attribute. But conditional attributes do not have any meaning for normal display and for email notification. This would have to be implemented and is quite some work. So I would put following in your config:
Options Category              = Info{1},Report{1},Problem{2},Other{1}
Preset Category               = Info
Display Category              = <img style="border:0; float:left; margin-right:5px" src="icons/$category.png">$category

{1}ROptions Level             = Notice,Warning,Alert,Fixed
{1}Preset Level               = Warning
{1}Display Level              = <img style="border:0; float:left; margin-right:5px" src="icons/$level.png">$level
{2}Preset Level               = N/A

Having
N/A
is not as nice as having this attribute not shown at all, but that's the only choice one has right now Crying .

Another thing: you maybe realized that putting <img> in the subject of your orignal entry results in a missing image. That's a nasty side effect of your wish to have any <img> interpreted as HTML. Of course you could argue that <img> is not a real HTML statement because the source is missing, but then another one will come and put there a subject like: "I want an <img src="bla.gif"> in my config" and bang, we are back to the same problem. So if anyone has a clever idea of how to solve this, please let me know. Maybe one should be able to put a "\" in front of any code (also the ELCode tags) to not interprete them by the system. But while this is maybe obvious for a C programmer or shell programmer, the normal user might not find this so obvious.


IMHO the solution may be in allowing html code only in the cfg, not in the value of the field..
i.e., elog has to first allow html in the cfg attribute and then replace every $attribute with their values... this values as to be translated in html entities in order to solve the problem

in other wordsthe value of the attribute as to httl_encoded when displayed.. and the cfg line not

or I am loosing some point ?
ELOG V3.1.5-fe60aaf