ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
371
|
Wed Jun 4 17:44:40 2003 |
| Etienne Van Caillie | etienne.vancaillie@mba.be | Other | | | Re: syntax highligting for elog.cfg with ULTRAEDIT | > > i put the last version on this link
> > http://public.mba.be/demo/elog/u-edit-elog-syntax.txt
>
> If you don't mind I added the file to this message.
surely not but as I put some new command each time you update elog :)
it's easy for us to put on on webserver
but for each update I ll send the new version |
464
|
Sat Jan 31 09:33:35 2004 |
| Fred Hooper | fhooper@sushisoft.com | Other | Linux | Windows | Mac OSX | Other | 2.5.0 | Javascript for Bookmark Link for one-click submission to elog | 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.
|
Attachment 1: elogsubmit-template.js
|
javascript:var t=document.title;var u=document.location.href;var s=document.getSelection();var d=window.open('','d');with(d.document){write('<form method=\'POST\' action=\'http://www.domain.com/elog/notebook/?cmd=New\' enctype=\'multipart/form-data\'><input type=\'text\' name=\'Author\' value=\'you\'> <input type=\'text\' name=\'Email\' value=\'you@domain.com\'> <input type=\'text\' name=\'Title\' value=\''+t+'\' size=80> <input type=\'text\' name=\'Url\' value=\''+u+'\' size=80> <textarea name=\'Text\' rows=30 cols=80 wrap>'+s+'</textarea> <input type=\'hidden\' name=\'attfile\' value=\'cmd\'><input type=\'hidden\' name=\cmd\' value=\'Update\'><input type=\'submit\' name=\'cmd\' value=\'Submit\'><input type=\'reset\' name=\'cmd\' value=\'Clear\'></form>');void(close())}
|
465
|
Wed Feb 4 12:00:14 2004 |
| Stefan Ritt | stefan.ritt@psi.ch | Other | Linux | Windows | Mac OSX | Other | 2.5.0 | Re: Javascript for Bookmark Link for one-click submission to elog | 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 |
860
|
Wed Dec 22 12:28:22 2004 |
| Ognyan Kulev | ogi@fmi.uni-sofia.bg | Other | All | | Complete Bulgarian translation | Thanks to Recai Oktas, who encourage me to complete the Bulgarian
translation for the Debian elog package, the Bulgarian translation is
completed and attached. |
Attachment 1: eloglang.bulgarian.gz
|
861
|
Wed Dec 22 12:56:44 2004 |
| Stefan Ritt | stefan.ritt@psi.ch | Other | All | | Re: Complete Bulgarian translation | Thanks, the file will be contained in the next release. |
1433
|
Sun Oct 9 20:18:23 2005 |
| Exaos Lee | Exaos.Lee@gmail.com | Other | All | 2.6.0beta5 | The Chinese Language,Demo Configuration and Help Files | Hi, Stefan,
The days from Oct.1~7 are our Nation Day's vacation, so I delayed the translation to Chinese. I just finished these files today:
- eloglang.zh_CN-GB2312 : This is for simplified Chinese using GB2312 encoding.
- eloglang.zh_CN-UTF-8 : This is for simplified Chinese using UTF-8 encoding.
- eloghelp.zh-CN.html : Help file for elog in simplified Chinese.
- elcode_zh-CN.html : The help file for ELCode in simplified Chinese.
- elogd-zh_CN-GB2312.cfg : Demo configuration file for simplified Chinese with GB2312 encoding.
- elogd-zh_CN-UTF-8.cfg : Demo configuration file for simplified Chinese with UTF-8 encoding.
I have to provide the language files in different encodings because the elogd cannot creat new logbook file named in Chinese with GB2312 encoding under MacOS X. The default charset under MacOS X is UTF-16, and elogd works with UTF-8 while processing Chinese contents and logbooks named in Chinese.
I want to make elogd display the date in Chinese format. Please tell me howto.
Thanks. |
Attachment 1: chinese_trans.tar.gz
|
1439
|
Mon Oct 10 12:53:46 2005 |
| Stefan Ritt | stefan.ritt@psi.ch | Other | All | 2.6.0beta5 | Re: The Chinese Language,Demo Configuration and Help Files |
Exaos Lee wrote: | I want to make elogd display the date in Chinese format. Please tell me howto. |
Thank you for the files.
If you specify
Language = zh_CN
Then elogd looks for a file "eloglang.zh_CN" for the translation, for a file "eloghelp_zh.html"
for the help, and does a
setlocale("zh_CN");
to switch to Chinese date format. To retrieve the date, elogd calls strftime("%x"); |
1552
|
Thu Dec 15 15:33:04 2005 |
| Alex H | alex@synergie-inf.com | Other | Windows | 2.6.0 | Bad date format. | Hi Stefan,
I have two loogbook who are using the Type Derniere image = Date parameter, but I obtain a big
number instead of a formated date.
On my logbook "liste" (Look on the first attachement elog.gif please to watch the problem.)
I obtain this problem.
Here is the part of the elogd.cfg file for logbook "Liste" :
[Liste]
Theme = Bubble
Comment = Liste des routeurs / firewall clients
Type Dernière image = Date
List display = Client, Nom machine, Type, Equipment, Emplacement, Nom_admin, Pwd_admin, Maint, Derniere image
Link display = Client, Nom machine, Type, Equipment, Emplacement, Maint, Derniere image
Attributes = Client, Nom machine, Equipment, Type, Emplacement, Nom_admin, Pwd_admin, Maint, Derniere image
Extendable options = Client, Equipment
Options Type = FWL1{1}, FWL2{2}, FWL4{3}, VPN1{4}, VPN2{5}, CLIVPN-PROC{6}
{1} Preset text = FWL1.txt
{2} Preset text = FWL2.txt
{3} Preset text = FWL4.txt
{4} Preset text = VPN1.txt
{5} Preset text = VPN2.txt
{6} Preset text =
Preset Author = $short_name
Options Maint = Oui, Non
Required Attributes = Client, Type, Equipment, Nom machine, Maint
Locked Attributes = Author
Page Title = ELOG - $Nom machine
Reverse sort = 0
Quick filter = Client, Type, Maint
Summary lines = 2
Entries per Page = 50
Case sensitive search = 1
On my logbook "Image Routeurs" (Look on the second attachement elog2.gif)
No Problem
Here is the part of the elogd.cfg file for logbook "Liste" :
[Image Routeurs]
Theme = Bubble
Comment = Image Routeurs
Type Derniere Image = Date
Attributes = Equipment ,Client, Derniere Image
List display = Equipment ,Client,Derniere Image
Preset Author = $short_name
Locked Attributes = Author
Page Title = ELOG - $Equipment
Sort Attributes = Equipment
Reverse sort = 0
Quick filter = Equipment, Client
Reverse sort = 1
Sort Attributes = Equipment
Summary lines = 1
Display mode = Summary
What is wrong with my configuration ?
Thanks for answer. |
Attachment 1: elog.gif
|
|
Attachment 2: elog2.gif
|
|
|