Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 220 of 238  Not logged in ELOG logo
New entries since:Thu Jan 1 01:00:00 1970
icon1.gif   Javascript for Bookmark Link for one-click submission to elog, posted by Fred Hooper on Sat Jan 31 09:33:35 2004 elogsubmit-template.js
I have created a javascript to be used as a browser link that allows a one
step cut and paste from a web browser into a elog logbook. 

The intended application is allow a user to do a text selection in a web
browser, then click on a bookmark that automagically pastes the selected
text, the current browser page url, and the current browser page title into
a pre-defined elog logbook.   I do some research where I would like to save
some text from a webpage, but also have a record of where the webpage came
from.  However, you should find that you can extend this script in a varity
of ways for your own application.  

The script is a simple one: it uses javascript in a saved bookmark to get
your selected text, title, and url, and then creates a new browser window
with a elog form, and print the document variables into the form, and then
submits the form to elog.   The key advantage to this approach is that you
can use the "post" command, rather than "get", to submit to the text section
of an elog logbook.  The only way I found now to submit to elog via a
bookmark is using the "get" command, and it doesn't allow entry of the
"text" field, only attribute fields.    

The second major advantage to using POST is that you can submit a much large
quanity of information ; However, some checking on this leads me to believe
that the limit is browser and server depended, so YMMV.  However, a great
discussion on the limits of browsers can be found here: 
http://www.squarefree.com/bookmarklets/browsers.html .

One of the major limits is that IE6.0 browsers have a maxium of 508 bytes
per bookmark - This book runs over 800 bytes, so I suspect tha IE6+ will not
allow it.  I tested the link with Mozilla and Firebird 0.7.

This script will need to edited for you to use with your elog logbook.
The script should be fairly self-explainitory, if you are used to html forms
and have some exposure to javascript.

You will need to modifiy the following fields:

1) in form action = http://<your_domain.com>/elog/<logbook>/?cmd=New
      change the link to point to your specific logbook to be used for entry.

2) the attribute fields need match up with the ones in your logbook.

     The ones listed in the template are Author, Email, Title, and URL.

     If you have fixed fields (like Author and Email), then you can
predefine these fields as shown.  

      I have the page title used as the entry for Title, and the page url is
 use as the URL attribute.

      Finally, I have the text selection used as the entry for the Text field.

      You can add additional fields by creating a new <input ...>  segment
in the script.  For those more clever than me, you can concatinate the
title, url and selection to paste into the Text area as well.  

3) once you have a edited version of the script (make sure you keep it as a
single line), you can then create a new bookmark in your browser, and then
paste the script into the properties->location field (for Mozilla/Firebird)
or the properites->url field (IE).  Give it a good name like "post to elog"

4) once saved, you can then go a web page, select some text, and then go to
your bookmarks and click on the bookmark.  It should then create a new
window in elog with a completed logbook entry.


some notes:

1) again, this may not work on IE6+ browsers due to M$ limitations.

2) You may have to be logged in already to elog for this work - I have not
tested the interaction using a password protected elog

3) You can only post to a single elog logbook - You'll need to have multiple
bookmarks for multiple logbooks.
   
    icon2.gif   Re: Javascript for Bookmark Link for one-click submission to elog, posted by Stefan Ritt on Wed Feb 4 12:00:14 2004 
I find this script very nice. Indeed JavaScript can be very powerful to do such 
things. I added some JavaScript support to the elogd server itself. If one opens 
the "New" page like

http://localhost/demo/?cmd=New&js=test.js

then the JavaScript "test.js" (which has to be present in 
themes/default/test.js) gets inserted into the page header and executed. This 
can be used to add custom form validation, which is more powerful than the built 
in checking if required attributes are present.

Then I tried to redo the bookmark script with the new method. A server-side 
script has of course more space than just a bookmark. I started with a bookmark 
like:

javascript:window.open("http://localhost/demo/?cmd=New&js=test.js");

which even works on IE6. The script "test.js" contains:

function a()
{
  var d=opener.document;
  alert("test.js");
  alert(d.location.href);
  alert(d.getSelection());
}

a();

While the first alert() works, the others fail. It seems like the "opener" 
method does not correctly dereference the right window. If anybody has some 
idea, please let me know.

The new version of elogd which supports the "js=" command can be found here:

http://midas.psi.ch/cgi-bin/cvsweb/elog/src/elogd.c?rev=1.235
icon6.gif   New major ELOG version 2.5.0 released, posted by Stefan Ritt on Thu Jan 29 10:14:13 2004 sync.gif
Version 2.5.0 of ELOG has been released yesterday. The main new feature is 
the automatic mirroring of logbooks between different elog servers. 

This is useful if one wants to synchronize logbooks between a desktop PC 
and a laptop, for example. During synchronization, new or modified entries 
on both sides are merged intelligently. Another application is if several 
companies or institutes want to keep a ELOG database locally, but have the 
databases synchronized periodically with each other. Periodic mirroring 
can be set up with a built in cron-like facility. 

Although the synchronization has been tested extensively, I still consider 
this part in beta state. Before using it, one should make a backup of 
existing logbooks. The flag "Mirror simulate" can be used to test the 
mirroring without actually overwriting or deleting anything. If problems 
arise with mirroring, they should be reported to the author.

Localization files have been updated, so if anybody volunteers to update 
or make a new translation, please contact the author.
icon4.gif   Strange timezone in email sent with Postfix, posted by Joseph Giaime on Thu Jan 29 00:24:44 2004 
Hi all,
I'm having trouble getting a sensible timezone to be attached to e-mail that gets sent out when messages are posted. I'm using Postfix, not sendmail (Mac OS X Server uses this beginning with version 10.3). In this set-up, the 'sendmail' program is a front-end for Postfix, not the real thing. I suspect that there are subtle differences that cause this problem.
Instead of something like "Date: Wed, 28 Jan 2004 14:46:16 -0600", the "-0600" is replaced by a large number that doesn't correspond with anything I can figure out. This is the sort of thing that does no real harm, but the notebook users keep complaining
Any thoughts or suggestions would be appreciated. -Joe
Here is what gets mailed when a messages is posted:
Return-Path: 
Received: from ligo.phys.lsu.edu ([unix socket])
	by ligo.phys.lsu.edu (Cyrus v2.1.13) with LMTP; Wed, 28 Jan 2004 16:27:03 -0600
X-Sieve: CMU Sieve 2.2
Received: from ligo.phys.lsu.edu (ligo.phys.lsu.edu [130.39.181.231])
	by ligo.phys.lsu.edu (Postfix) with SMTP
	id 5E12A788D1; Wed, 28 Jan 2004 16:27:03 -0600 (CST)
To: ELOG@ligo.phys.lsu.edu, user@ligo.phys.lsu.edu
From: elog@ligo.phys.lsu.edu
Subject: New playground elog entry
X-Mailer: Elog, Version 2.3.9
X-Elog-URL: http://ligo.phys.lsu.edu:8080/playground/13
X-Elog-submit-type: web|elog
Date: Wed, 28 Jan 2004 22:27:03 +52182819
Content-Type: TEXT/PLAIN; charset=US-ASCII
Message-Id: <20040128222703.5E12A788D1@ligo.phys.lsu.edu>

A new entry has been submitted on ligo.phys.lsu.edu

Logbook             : playground
Author              : Joseph Giaime
Type                : Other
Category            : Other
Subject             : yet another test

Logbook URL         : http://ligo.phys.lsu.edu:8080/playground/13
    icon2.gif   Re: Strange timezone in email sent with Postfix, posted by Stefan Ritt on Thu Jan 29 09:25:45 2004 
> Instead of something like "Date: Wed, 28 Jan 2004 14:46:16 -0600", the
> "-0600" is replaced by a large number that doesn't correspond with anything
> I can figure out.  This is the sort of thing that does no real harm, but the
> notebook users keep complaining. 

This is caused by the elogd program itself. To produce the "-0600", it uses the 
variable "timezone", which is defined as difference in seconds between local time 
and coordinated universl time. This works find under Windows, Linux, FreeBSD, but 
apparently not under MacOSX. Although this variable is defined, it's unassigned. 

The code where this is used is in sendmail(), at the lines

   time(&now);
   ts = localtime(&now);
   strftime(buf, sizeof(buf), "%a, %d %b %Y %H:%M:%S", ts);
   offset = (-(int) timezone);
   if (ts->tm_isdst)
      offset += 3600;

The current localtime gets written into "buf", then the timzone offset gets 
corrected by the daylight savings time, then the offset is used to produce the 
"-0600".

So if anybody being familiar with MacOSX has some idea, please let me know.

- Stefan
icon3.gif   whishlist direct shortcut to select a files or folder (not http), posted by Etienne Van Caillie on Wed Dec 3 06:32:09 2003 
whishlist

an entry like
file:///E:/Dossier\!!shorcut
will open IE with these current adresse

Stef could you add a logbook  
'wishlist'
'subgroup' contribution/icons
    icon2.gif   Re: whishlist direct shortcut to select a files or folder (not http), posted by Stefan Ritt on Wed Dec 3 09:18:25 2003 
> an entry like
> file:///E:/Dossier\!!shorcut
> will open IE with these current adresse

Yes it does, and what is your question?

> Stef could you add a logbook  
> 'wishlist'
> 'subgroup' contribution/icons

If you have any icons, just put it under the contributions logbook. There 
are only few entries, so no deed to make a subgroup.

As for wishlist, start with the "Forum" Logbook. If a wish gets "accepted", 
I put it on the official web page.
       icon2.gif   Re: whishlist direct shortcut to select a files or folder (not http), posted by Etienne Van Caillie on Wed Dec 3 14:57:05 2003 
> > an entry like
> > file:///E:/Dossier\!!shorcut
> > will open IE with these current adresse
> 
> Yes it does, and what is your question?
> 
> > Stef could you add a logbook  
> > 'wishlist'
> > 'subgroup' contribution/icons
> 
> If you have any icons, just put it under the contributions logbook. There 
> are only few entries, so no deed to make a subgroup.
> 
> As for wishlist, start with the "Forum" Logbook. If a wish gets "accepted", 
> I put it on the official web page.

sorry for my 'stupid' question please delete this entry :)
icon4.gif   speed is very slow if logbook contains many entries, posted by Heiko Scheit on Wed Nov 12 12:25:44 2003 gmon.txt
This is not really a bug, but elogd was getting really slow with our
logbook.  It took about 4 1/2 seconds just to get the default page in
threaded mode with 15 entries.  The logbook has in total about 2000
entries, though.

After playing around with the compiler option '-gp' and gprof the
problem was found: loc() is called about 18000 times per logbook
access!  (Attached you can find the gprof output.  There might be
other places where to save time: e.g. getcfg().)  The function loc()
calls stat every time to check if the language file was updated and
this takes a long time especially over NFS.

The quick solution for me was to just replace loc() with 'char
*loc(char *orig) {return orig;}'.  Therefore, I cannot use the
localization that I used anymore, which is not a big problem at the
moment.  After that the time to download the default page was only
0.16 s; almost a factor of 30 faster!

I would suggest to only read the language file (AND also the config
file!) once upon startup.  After changing things one has to restart
elogd, which is not so nice, but the long delay is not acceptable.
Another option not to restart elogd is to make elogd respond to a
signal (e.g. kill -HUP) to reread the config and language files.
    icon2.gif   Re: speed is very slow if logbook contains many entries, posted by Stefan Ritt on Wed Nov 12 12:34:02 2003 
This is a very nice measurement you made and helps me a lot. I will 
incorporte your suggestions into the next version. Under Windows however, 
there is no -HUP signal, so that won't work for them. But what I can easily 
do is to check for new configuration/language file once every access, not 
once every loc() or getcfg(). I till think about.

Thanks again,

  Stefan
       icon2.gif   Re: speed is very slow if logbook contains many entries, posted by Stefan Ritt on Thu Nov 20 17:55:57 2003 
I implemented the new scheme where 

- under Windows, the configuration is only checked once every access

- under Unix, the configuration is read initially, and on every -HUP signal

This should speed up the server considerably. The next bottleneck is the 
rsputs2() function, which requires quite some computing power in order to find 
any "http://", "//", etc. strings in every output. If anybody knows a 
more clever way of coding that, please let me know.

The new version is under CVS.
          icon1.gif   Re: speed is very slow if logbook contains many entries, posted by Etienne Van Caillie on Mon Nov 24 10:25:10 2003 
> I implemented the new scheme where 
> 
> - under Windows, the configuration is only checked once every access
> 
> - under Unix, the configuration is read initially, and on every -HUP signal
> 
> This should speed up the server considerably. The next bottleneck is the 
> rsputs2() function, which requires quite some computing power in order to find 
> any "http://", "//", etc. strings in every output. If anybody knows a 
> more clever way of coding that, please let me know.
> 
> The new version is under CVS.

may be use the logic in the 'format' attribute
like 'email', http, ftp 
so elog will test only on these attributes
icon4.gif   Elogd.exe Crashes When There are too Many Replies to Replies..., posted by Christopher Jones on Sun Oct 12 08:37:00 2003 
Hi,

  We have been using Elog successfully as a shiftlog book for over a month 
now, but I recently ran into an annoying bug, I think.
  We had a thread that was created and was being replied to over several 
days.  We first replied to the original thread and then each subsequent 
reply was a reply of the previous reply.  When the thread reached above 13 
of these, the elogd.exe would crash everytime a user attempted to select 
the logbook that contained the enormous thread.  
  I found the only workaround was to manually delete the offending entry 
from the log file and to instruct my users to not reply to replies unless 
absolutely necessary.  I have been able to replicate this error across the 
rest of my logbooks as well.  If there is any more information you may 
need, please feel free to contact me.

Thanks,
Chris Jones
    icon2.gif   Re: Elogd.exe Crashes When There are too Many Replies to Replies..., posted by Stefan Ritt on Sun Oct 26 17:04:59 2003 
>   We have been using Elog successfully as a shiftlog book for over a month 
> now, but I recently ran into an annoying bug, I think.
>   We had a thread that was created and was being replied to over several 
> days.  We first replied to the original thread and then each subsequent 
> reply was a reply of the previous reply.  When the thread reached above 13 
> of these, the elogd.exe would crash everytime a user attempted to select 
> the logbook that contained the enormous thread.  
>   I found the only workaround was to manually delete the offending entry 
> from the log file and to instruct my users to not reply to replies unless 
> absolutely necessary.  I have been able to replicate this error across the 
> rest of my logbooks as well.  If there is any more information you may 
> need, please feel free to contact me.

Sorry my late reply, I was pretty busy these days...

I tried to reporduce your problem, but without success. Have a look at

http://midas.psi.ch/elogdemo/Linux/32

where I replied 20 times producing a very long thread without any problem. So 
can you reproduce your problem? I suspect that there was some other problem, 
since the number of replies is internally not limited in any way. If you 
again get into a situation where elodg.exe crashes on the *DISPLAY* of some 
message, you can send me the offending file xxxxxxa.log directly by email and 
I can analyze it. Only if I can reproduce a problem, I can fix it.

- Stefan
       icon2.gif   Re: Elogd.exe Crashes When There are too Many Replies to Replies..., posted by Stefan Ritt on Tue Nov 11 13:49:50 2003 
I found a stack overflow if there are too many replies. This has been fixed in 
the current CVS verson of elogd.c and will be incorporated into the next release.
          icon2.gif   Re: Elogd.exe Crashes When There are too Many Replies to Replies..., posted by Christopher Jones on Fri Nov 21 07:59:50 2003 
> I found a stack overflow if there are too many replies. This has been fixed in 
> the current CVS verson of elogd.c and will be incorporated into the next release.

Many thanks for your quick reply to this issue.  I have also noticed that when 
moving a log entry that contains as few as 4 replies to replies with the "Move to" 
command that the elog server will crash.  I ran into this issue many times when I 
created a new logbook and was trying to move some of the longer threads into it.  
Please let me know if you would like me to send some sample entries from our 
logbook that illustrate this.

Thanks,
Chris    
icon4.gif   Update request for Admin Guide, posted by Justin Dieters on Tue Nov 18 23:19:57 2003 
Heya, I've been using elog for a year or so, with a proxy through Apache,
but recently I've ran into some trouble with my Apache config, where
spammers were using my incorrectly configured proxy to send spam.

I have
some requests for the Administrator's Guide: "Running elogd under Apache". 
I'm hoping a few little notes will save others the trouble I've gone
through. Neither of these are any fault of elog's or Apache's, but of my own
ignorance. (I am using elog 2.3.9, and Apache 2.something, if that matters)

1) When doing "ProxyPass ..." when setting up elog under Apache, do NOT put
"ProxyRequests On".  This is not needed, if it is enabled and not set up
correctly, it allows spammers to send spam via Apache's proxy.  More
information on this is here: http://www.apacheweek.com/issues/03-07-25,
about halfway down the page, under "Spammers use open Apache proxies"

Even though it doesn't mention ProxyRequests in the guide, I think there
should be a little side note mentioning that "ProxyRequests On" is NOT
needed, because I put it in, thinking it was - I am probably not the only one.

2) I have found that mod_proxy_http.c must be loaded in addition to
mod_proxy.c and mod_alias.c for the proxy to work, otherwise I get a 403
error.  I think this should be mentioned as well.
    icon4.gif   Re: Update request for Admin Guide, posted by Stefan Ritt on Thu Nov 20 17:51:53 2003 
Thanks, I added a note into the admin guide.
icon5.gif   elog.exe , posted by Etienne Van Caillie on Wed Nov 12 07:52:45 2003 
impossible to create the moptions with 

-a Type#0="%D1%"
-a Itel#0="%zItel%"

the variable are set to 
set D1=Tel
set zItel=Tel.gif

other standard option work fine

does anybody has good experience with elog.exe command ?

elog -h 'my site elo' -p 83 -l 'my logbook' -a Phone="%2" -a Contact="%3 %
4" -a Type#0="%D1%" -a Cat="%5" -a Itel#0="%zItel%" "%6 %7 %8 %9"


----------------------------- here are the config in elog
[titiPHONE]
Comment = PhoneList 
Find menu text = menu/titiphone_top.html

Data dir = prive_Etienne/PhoneList
Guest Menu commands = Help
Find Guest Menu Commands = Help
Attributes = Phone, Itel, Dossier, Ext_direct, Societe, Contact, Cat,Type, 
Prive, Email, Adress, City, Relation, By

Quick filter = Itel,Type,Dossier,Date,Prive
Roptions Prive = no,CD,EC,MD,NB,TR,TV,AH,NW,JW,Manon

IOptions Itel = Tel.gif, TelDirect.gif, Fax.gif, Gsm.gif, Tel2.gif, 
TelHome.gif,TelFax.gif,TelHelp.gif
ROptions Type = Tel,TelDirect,Fax,Gsm,Tel2,Home,Combine,TelHelp

Preset Itel = Tel.gif
Preset Type = Tel
Preset Prive = no
Preset Email = 
Display mode = Summary
Thread Icon = Itel
Thread display = $Phone,$Contact,$Dossier,$Societe($Type/$prive)
    icon2.gif   Re: elog.exe , posted by Stefan Ritt on Wed Nov 19 09:06:11 2003 
> impossible to create the moptions with 
> 
> -a Type#0="%D1%"
> -a Itel#0="%zItel%"
> 
> the variable are set to 
> set D1=Tel
> set zItel=Tel.gif
> 
> other standard option work fine

Sure it works. But in your elogd.cfg, you have ROptions, not MOptions! I 
changed this to 

...
IOptions Itel = Tel.gif, TelDirect.gif, Fax.gif, Gsm.gif, Tel2.gif, 
TelHome.gif,TelFax.gif,TelHelp.gif
MOptions Type = Tel,TelDirect,Fax,Gsm,Tel2,Home,Combine,TelHelp
...

Then I added a batch file elog_submit.bat with following contents:

elog -h 'my site elo' -p 83 -l 'my logbook' -a Phone=%1 -a Contact="%2 %3" -a 
Type#0="%TYPE% -a Cat="%4" -a Itel#0="%ITEL%" %5 %6 %7

Then I made a 

set TYPE=Tel
set ITEL=Tel.gif

and a 

elog_submit 123 a b CAT Test Message

ans all worked fine. Please change your ROptions to MOptions and try again.
ELOG V3.1.5-3fb85fa6