Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 712 of 808  Not logged in ELOG logo
ID Date Icon Author Author Email Category OSdown ELOG Version Subject
  67771   Tue Jan 27 17:03:53 2015 Reply Stefan Rittstefan.ritt@psi.chQuestionAll3.0.0Re: Link to full resolution image attachments

Strange. If I attach a big image to this post (see below), I see the thumbnail, but when I click on it it, I get redirected to the full resolution image. No idea why it is not working for you.

Eric Quintero wrote:

Hi all,

It's possible my question is entirely within the domain of CKeditor, but I figure it may also have something to do with how it's plugged into ELOG. 

In essence, when attaching a PDF to an ELOG post as an image, the post body shows the generated thumbnail and there is a link to the full resolution PDF at the bottom of the post. 

However, if instead, I attach a JPG or PNG, the link to the full resolution image is not present in the post (though it can be accessed through the small paperclip icon).

Is there a way to show links to the thumbnailed images, or even for the thumbnail itself to be a hyperlink to the full resolution source?

Thanks for your time,

Eric Q. 

 

Attachment 1: flower.jpg
flower.jpg
  67773   Tue Jan 27 17:18:17 2015 Reply devjoshi868b@gmail.comQuestionAll3.3Re: calculate the value of one attribute depending upon the value of other attribute.

I am working in window system.Itries using elogd  stop and start  command  but it is always showing it is running.Kindly help  me  thanking you.

Andreas Luedeke wrote:

Yes, I forgot to mention that you need to enable shell script execution by starting the server with "elogd -x".

Before you start elogd from the command line you need to shutdown any running elogd; otherwise the port is blocked and the command line elogd cannot start: "sudo /sbin/service elogd stop"

From Linux you can edit instead /etc/init.d/elogd and add there the option "-x" to the line where "elogd" is started and then restart the service: "sudo /sbin/service elogd restart".

dev wrote:

I tried that It is not calculating  and it is giving the error "Shell execution not enabled via -x flag ".I started elogd -x from command prompt  it still gives the same error.

Andreas Luedeke wrote:

If you have the following elogd.cfg:

Attributes = START, END, DURATION
subst DURATION = $shell( /usr/local/elog/diff.sh \"$START\" \"$END\")
Show Attributes Edit = START, END

And the shell script /usr/local/elog/diff.sh is:

#!/bin/sh
s1=$(date -d "$1" +%s)
s2=$(date -d "$2" +%s)
d=$(echo "($s2-$s1)/3600"|bc -lq)
printf "%.0f hours" $d

Then DURATION is calculated from START and END in full hours.

It appears that if you define START and END as "datetime", then only the date part would be passed to the script. This may is a bug of elogd: Stefan, have you ever tried?

dev wrote:

I HAVE A LOGBOOK WHICH KEEPS THE RECORD OF ALL FAULT BOOKED BY DIFFERENT SUBSCRIBER.THIS LOGBOOK HAS THREE ATTRIBUTE DOWNTIME,UPTIME & TOTAL DURATION (DATE &TIME FORMAT) . I WANT TO CALCULATE THE TOTAL DURATION AUTOMATICALLY WHENEVR UPTIME VALUE IS GIVEN AND IF THE UPTIME IS NOT GIVEN IT SHOULD CALCULATE DEPENDING UPON THE SYSTEM PRESENT TIME.PLEAS EXPLAIN IT WITH EXAMPLE.

PS: Please do NOT write all capital text in a forum. Thank you!

 

 

 

  67774   Wed Jan 28 09:57:11 2015 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionAll3.3Re: calculate the value of one attribute depending upon the value of other attribute.

Unfortunately I cannot help you with Windows. But you must have started the service somehow in the first place: that is where I would expect you can stop it as well.

dev wrote:

I am working in window system.Itries using elogd  stop and start  command  but it is always showing it is running.Kindly help  me  thanking you.

Andreas Luedeke wrote:

Yes, I forgot to mention that you need to enable shell script execution by starting the server with "elogd -x".

Before you start elogd from the command line you need to shutdown any running elogd; otherwise the port is blocked and the command line elogd cannot start: "sudo /sbin/service elogd stop"

From Linux you can edit instead /etc/init.d/elogd and add there the option "-x" to the line where "elogd" is started and then restart the service: "sudo /sbin/service elogd restart".

dev wrote:

I tried that It is not calculating  and it is giving the error "Shell execution not enabled via -x flag ".I started elogd -x from command prompt  it still gives the same error.

Andreas Luedeke wrote:

If you have the following elogd.cfg:

Attributes = START, END, DURATION
subst DURATION = $shell( /usr/local/elog/diff.sh \"$START\" \"$END\")
Show Attributes Edit = START, END

And the shell script /usr/local/elog/diff.sh is:

#!/bin/sh
s1=$(date -d "$1" +%s)
s2=$(date -d "$2" +%s)
d=$(echo "($s2-$s1)/3600"|bc -lq)
printf "%.0f hours" $d

Then DURATION is calculated from START and END in full hours.

It appears that if you define START and END as "datetime", then only the date part would be passed to the script. This may is a bug of elogd: Stefan, have you ever tried?

dev wrote:

I HAVE A LOGBOOK WHICH KEEPS THE RECORD OF ALL FAULT BOOKED BY DIFFERENT SUBSCRIBER.THIS LOGBOOK HAS THREE ATTRIBUTE DOWNTIME,UPTIME & TOTAL DURATION (DATE &TIME FORMAT) . I WANT TO CALCULATE THE TOTAL DURATION AUTOMATICALLY WHENEVR UPTIME VALUE IS GIVEN AND IF THE UPTIME IS NOT GIVEN IT SHOULD CALCULATE DEPENDING UPON THE SYSTEM PRESENT TIME.PLEAS EXPLAIN IT WITH EXAMPLE.

PS: Please do NOT write all capital text in a forum. Thank you!

 

 

 

 

  67775   Wed Jan 28 17:18:08 2015 Reply Eric Quinteroericq@caltech.eduQuestionAll3.0.0Re: Link to full resolution image attachments
Stefan Ritt wrote:

Strange. If I attach a big image to this post (see below), I see the thumbnail, but when I click on it it, I get redirected to the full resolution image. No idea why it is not working for you.

Sorry, I wasn't sufficiently clear. The issue I mentioned only applied to images that are inlined in the body of the post using the "Image" button in the CKeditor toolbar.

Oddly enough, on this logbook, I am not able to upload an image in that way; after selecting the image and pressing "Send it to the Server," nothing happens.

  67793   Fri Jan 30 22:45:02 2015 Reply Eric Quinteroericq@caltech.eduQuestionAll3.0.0Re: Link to full resolution image attachments

Since I am unable to attach an image to this logbook, I made a post over the the Linux Demo logbook showing an image that was uploaded with the CKeditor toolbar "Image" button that doesn't link to the full resolution image. 

Incidentially, Dario Milicic's recent commit to the git repository (83a10a5), adds the exact functionality I'm looking for to drag-and-drop attachments with the "dndfiles" CKeditor plugin. I've looked througe the "image2" code myself, but I don't have much experience with javascript, and haven't figure out how to do the equivalent for that plugin. 

Thanks for your time.

  67797   Mon Feb 2 10:40:38 2015 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionAll3.0.0Re: Link to full resolution image attachments
If you add the picture in the HTML editor, then you can add any link you like.
I don't see why the specific link to the full resolution picture should be the default.
If you want to have it, why not just add it by hand?
I took the liberty to edit your Linux Demo post accordingly.

For attachments that is a completely different story, since you cannot add any links there, only ELOG can do this for you.

Eric Quintero wrote:

Since I am unable to attach an image to this logbook, I made a post over the the Linux Demo logbook showing an image that was uploaded with the CKeditor toolbar "Image" button that doesn't link to the full resolution image. 

Incidentially, Dario Milicic's recent commit to the git repository (83a10a5), adds the exact functionality I'm looking for to drag-and-drop attachments with the "dndfiles" CKeditor plugin. I've looked througe the "image2" code myself, but I don't have much experience with javascript, and haven't figure out how to do the equivalent for that plugin. 

Thanks for your time.

 

  67800   Wed Feb 4 08:51:37 2015 Reply Eric Quinteroericq@caltech.eduQuestionAll3.0.0Re: Link to full resolution image attachments

You make a valid point!

My perspective is from my lab's specific use case, in which we often post plots of data in the body of the text, and it is useful for the ELOG-generated thumbnails to link to the full resolution plot. In previous versions, I believe this was the behavior. It would be convenient for my users if this continued to be the case, but I understand that it is not neccesarily the appropriate default behavior for all users of ELOG. 

Andreas Luedeke wrote:
If you add the picture in the HTML editor, then you can add any link you like.
I don't see why the specific link to the full resolution picture should be the default.
If you want to have it, why not just add it by hand?
I took the liberty to edit your Linux Demo post accordingly.

For attachments that is a completely different story, since you cannot add any links there, only ELOG can do this for you

 

  67805   Wed Feb 4 13:32:21 2015 Reply Stefan Rittstefan.ritt@psi.chQuestionAll3.0.0Re: Link to full resolution image attachments

I put the functionality you requested into the current GIT version of ELOG. It works now with Drag & Drop, but not (yet) with the toolbar uploader.

Eric Quintero wrote:

You make a valid point!

My perspective is from my lab's specific use case, in which we often post plots of data in the body of the text, and it is useful for the ELOG-generated thumbnails to link to the full resolution plot. In previous versions, I believe this was the behavior. It would be convenient for my users if this continued to be the case, but I understand that it is not neccesarily the appropriate default behavior for all users of ELOG. 

Andreas Luedeke wrote:
If you add the picture in the HTML editor, then you can add any link you like.
I don't see why the specific link to the full resolution picture should be the default.
If you want to have it, why not just add it by hand?
I took the liberty to edit your Linux Demo post accordingly.

For attachments that is a completely different story, since you cannot add any links there, only ELOG can do this for you

 

 

ELOG V3.1.5-3fb85fa6