Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 765 of 807  Not logged in ELOG logo
    icon2.gif   Re: Password Protect Delete, posted by Andreas Luedeke on Fri Jul 21 08:54:03 2017 

You can allow guests to create entries, but only registered users (Admins) to delete (or edit) entries:

Menu commands = List, New, Edit, Reply, Delete, Find, Config, Logout, Help
Guest menu commands = List, New, Reply, Find, Login, Help

See https://midas.psi.ch/elog/config.html#general for details.

Michael Cianci wrote:

We don't use a password file but would like to password protect (Admin only) the DELETE function in the MENU     Thank You

 

    icon2.gif   Re: Conditional attribute activation, posted by Andreas Luedeke on Mon Jul 24 14:33:51 2017 

Yes, this is possible by using "Conditional Attributes". Have a look at the ELOG syntax help: https://midas.psi.ch/elog/config.html#conditional

To hide attributes on edit, you can use "Show Attributes Edit =  ..." for the conditions; and you only list the comment reason for the case where the value of the other attribute has the value "reserved".

If you don't get it to work, then just post your logbook config with some comments on what you want to achieve.

Cheers, Andreas

Devrim Esenturk wrote:

I have a stock database running latest elog version on windows. I am reserving some products which not been sent to customer mistakenly and using value "reserved" for it. But I need another attribute for comment reason of reserving but this attribute must be activated when reserved value selected. Is this possible? I didn't see any option for this at admin guide.

 

Thank you

 

    icon2.gif   Re: Sharing logbooks among "Top Groups", posted by Andreas Luedeke on Sun Aug 20 14:55:18 2017 

I don't know if that works. Why don't you just try?

Satyajit Jena wrote:

Hi,

I am currently trying to configuring elog top groups, which are supposed to separate from each other. However, I would like to have a common logbook that should be visible in each group. Is there a way to share logbooks among Top Groups for example

Top Group Electronics = Elec1, Elec_EEE, Ele2

Top Group Processing  = P_AA1, PPP2, Elec_EEE

Top Group Monitoring = Mon1, Mon2, Mon3, Mon4

Top Group Data = Data1, PPP2, Data2

I would like logbook to be viewed:

  • Electronics:
    • Elec1
    • Elec_EEE
    • Ele2
  • Processing:
    • P_AA1
    • PPP2
    • Elec_EEE
  • Monitoring:
    • Mon1
    • Mon2
    • Mon3
    • Mon4
  • Data:
    • Data1
    • PPP2
    • Data2
    • Mon3
    • Mon4

Could you please suggest me if it is possible to set in this way (Color codes t show the common sharing).

Many thanks and regards,

satyajit

 

    icon2.gif   Re: Sharing logbooks among "Top Groups", posted by Andreas Luedeke on Mon Aug 21 08:51:09 2017 
Hi Satyajit,
I think you've just answered your own question. There is no magic switch - as far as I know - that would change that behaviour.

Probably there are ways to achieve your desired behaviour (using mirror servers and synchronising the logbooks) but that would require a large effort and would make your installation a lot more complicated.

With kind regards, Andreas

Satyajit Jena wrote:

Hi,

I tried without success. Logbook is not sharing, it is displaying only under one "Top Group" whereever it appears first.

With regards,

satyajit

Andreas Luedeke wrote:

I don't know if that works. Why don't you just try?

Satyajit Jena wrote:

Hi,

I am currently trying to configuring elog top groups, which are supposed to separate from each other. However, I would like to have a common logbook that should be visible in each group. Is there a way to share logbooks among Top Groups for example

Top Group Electronics = Elec1, Elec_EEE, Ele2

Top Group Processing  = P_AA1, PPP2, Elec_EEE

Top Group Monitoring = Mon1, Mon2, Mon3, Mon4

Top Group Data = Data1, PPP2, Data2

I would like logbook to be viewed:

  • Electronics:
    • Elec1
    • Elec_EEE
    • Ele2
  • Processing:
    • P_AA1
    • PPP2
    • Elec_EEE
  • Monitoring:
    • Mon1
    • Mon2
    • Mon3
    • Mon4
  • Data:
    • Data1
    • PPP2
    • Data2
    • Mon3
    • Mon4

Could you please suggest me if it is possible to set in this way (Color codes t show the common sharing).

Many thanks and regards,

satyajit

 

 

 

icon5.gif   Problems with german_UTF8 language, posted by Andreas Luedeke on Mon Aug 21 11:22:09 2017 elog_lang_bug.pngelog_lang_config_bug.png

Hi Stefan,

since recently (a few weeks) ELOG confuses the language translations.
Individual language strings are translated into garbage; most other strings are fine.
Currently I see the string "please select" translated into "ressed" (see attached picture), instead of what's written correctly in the language file "bitte auswählen".
But with every restart the corrupted strings vary: other strings are affected and other garbage strings are shown - some of them unreadable binary code (see Attachment 2).
I have the same version running in English: I see no problems there.
Kind regards

Andreas

icon3.gif   Bug with Drafts and Language German, posted by Andreas Luedeke on Mon Aug 21 11:45:06 2017 elog_lang_pending_draft_bug.png

Hi Stefan,

when one creates a new entry, and a draft entry exists for the logbook, then a menu appears (see attachment).
If one select "Neuen Eintrag anlegen" then it should ignore the draft and create a new entry.
This feat is done by adding a "&ignore=1" to the "new" command: "<URL>/?cmd=New&ignore=1".
The problem is, that it should not be "cmd=New&..." but "cmd=Neu", since the commands are part of the translation.
Due to this, no new entry can be created as long as a draft exists; at least not in any language other than english.
This problem apparently existed since the beginning of drafts, but it only created problems at our site recently.
Kind Regards
Andreas

PS: Here's a patch that works:

diff  elogd.c elogd.c-orig
9575,9576c9575,9576
<    rsprintf("<input type=button value=\"%s\" onClick=\"window.location.href='?cmd=%s&ignore=1';\">\n", loc("Create new entry"),
<             loc("New"));
---
>    rsprintf("<input type=button value=\"%s\" onClick=\"window.location.href='%s';\">\n", loc("Create new entry"),
>             "?cmd=New&ignore=1");
    icon2.gif   Re: Bug with Drafts and Language German, posted by Andreas Luedeke on Mon Aug 21 12:16:05 2017 

I've quickly checked: there are a couple more commands in the source code that are not language encoded. I guess some of them needs correction.

> egrep -n "cmd=[A-Za-z]" elogd.c
10293:   rsprintf("    r.open('GET', '?jcmd=Unlock&edit_id=%d', true);\n", message_id);
11784:                      ("<label for=\"ELCode\"><a target=\"_blank\" href=\"?cmd=HelpELCode\">ELCode</a>&nbsp;&nbsp;</label>\n");
13663:                                "\r\n%s URL         : %s?cmd=Config&cfg_user=%s&unm=%s\r\n", loc("Logbook"),
14562:      redirect(lbs, "?cmd=Config");
14625:      sprintf(str, "../%s/?cmd=Config", getparam("lbname"));
14678:      sprintf(str, "../%s/?cmd=Config", lbn);
15703:   combine_url(lbs, host, "?cmd=GetMD5", url, sizeof(url), &ssl);
16378:         strcat(str, "?cmd=GetConfig"); // request complete config file
16380:         strcat(str, "?cmd=Download");  // request config section of logbook
16570:      strcat(str, "?cmd=GetPwdFile");   // request password file
17575:            rsprintf("<br><b><a href=\"../%s/?cmd=Synchronize&confirm=1\">", lbs->name_enc);
17577:            rsprintf("<br><b><a href=\"%s/?cmd=Synchronize&confirm=1\">", lbs->name_enc);
17579:            rsprintf("<br><b><a href=\"../%s/?cmd=Synchronize&confirm=1\">", lbs->name_enc);
18959:   if (strstr(ref, "cmd=Search&"))
18960:      strlcpy(strstr(ref, "cmd=Search&"), strstr(ref, "cmd=Search&") + 11, sizeof(str));
26728:         rsprintf("<a href=\"?cmd=Synchronize\">%s</a></td>\n", loc("Synchronize all logbooks"));
 

Andreas Luedeke wrote:

Hi Stefan,

when one creates a new entry, and a draft entry exists for the logbook, then a menu appears (see attachment).
If one select "Neuen Eintrag anlegen" then it should ignore the draft and create a new entry.
This feat is done by adding a "&ignore=1" to the "new" command: "<URL>/?cmd=New&ignore=1".
The problem is, that it should not be "cmd=New&..." but "cmd=Neu", since the commands are part of the translation.
Due to this, no new entry can be created as long as a draft exists; at least not in any language other than english.
This problem apparently existed since the beginning of drafts, but it only created problems at our site recently.
Kind Regards
Andreas

PS: Here's a patch that works:

diff  elogd.c elogd.c-orig
9575,9576c9575,9576
<    rsprintf("<input type=button value=\"%s\" onClick=\"window.location.href='?cmd=%s&ignore=1';\">\n", loc("Create new entry"),
<             loc("New"));
---
>    rsprintf("<input type=button value=\"%s\" onClick=\"window.location.href='%s';\">\n", loc("Create new entry"),
>             "?cmd=New&ignore=1");

 

icon5.gif   CSS reference in Email for private logbooks, posted by Andreas Luedeke on Mon Aug 21 14:27:50 2017 
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