Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   CSS reference in Email for private logbooks, posted by Andreas Luedeke on Mon Aug 21 14:27:50 2017 
    icon2.gif   Re: CSS reference in Email for private logbooks, posted by Stefan Ritt on Fri Dec 21 14:04:41 2018 
Message ID: 68669     Entry time: Mon Aug 21 14:27:50 2017     Reply to this: 68879
Icon: Question  Author: Andreas Luedeke  Author Email: andreas.luedeke@psi.ch 
Category: Request  OS: All  ELOG Version: V3.1.3-aded4ae 
Subject: CSS reference in Email for private logbooks 
We operate ELOG in an intranet. Many logbooks do send out emails; several use HTML content formatting.
If I watch HTML formatted emails from the intranet, then everything is fine.
If I try to read them from home, my email client hangs when it tries to read the CSS file from out intranet (URL: https://elog-gfa.psi.ch/SLS/elog.css).
Is there a way to set a URL for the email CSS?
Then I could simply copy the CSS file to the internet accessible location and the emails would be properly formatted in the intranet and from home.
 
I've tried to use "Use Email URL = ", but it turned out that this will change all base URL's in the email BUT the one in the CSS :-(
So I would need a config "Email CSS URL = " to set this.
 
Here is a patch that does what I want, but it might have some side-effects I'm not yet aware of:
7636,7643c7636,7638
<    if (absolute_link) {
<       if (lbs != NULL && getcfg(lbs->name, "Email CSS URL", str, sizeof(str)))
<          strlcpy(css_base, str, sizeof(css_base));
<       else if (lbs == NULL && getcfg("global", "Email CSS URL", str, sizeof(str)))
<          strlcpy(css_base, str, sizeof(css_base));
<       if (css_base[0] == 0)
<         compose_base_url(lbs, css_base, sizeof(css_base), FALSE);
<    } else
---
>    if (absolute_link)
>       compose_base_url(lbs, css_base, sizeof(css_base), FALSE);
>    else
 
 
Cheers
Andreas
ELOG V3.1.5-3fb85fa6