Re: Highlight code?, posted by Aaron James Long on Mon Dec 12 13:35:16 2016
|
Can I ask for some clarification; I would like to include code highlighting for some computational students who will be making use of ELOG.
In the example you showed, my understanding is that you included a "Bottom text =... " entry in the forums elog config. This included the bare minimum remote call outlined by the highlightjs site. Can you clarify (as I'm having issues setting it up) should the "Bottom text=..." entry take this as a string, or should it be contained in a seperate html file in the same local directory as the cfg?
Daniel Sajdyk wrote: |
Ok. Thanks a lot :)
Stefan Ritt wrote: |
In the HTML editor, you can select the code text, then select from the "Styles" drop-down the style "Computer Code", and on the "Normal" drop-down the formatting "Formatted". This puts the code in <pre> and <code> tags, so you don't have to manipulate HTML directly.
Daniel Sajdyk wrote: |
Looks like it works :)
Code need to be put in tags:
<pre><code class="sql">...</code></pre>
but it works.
Thank you :D
Best Regards
Daniel Sajdyk
Stefan Ritt wrote: |
I did not know about highlight.js . You can put it into any elog page with "Bottom text = ...". I tried it for this forum and put in some C code:
#include <stdio.h>
int main()
{
// printf() displays the string inside quotation
printf("C Programming");
return 0;
}
Seems like this works nicely. Thanks for that hint.
Daniel Sajdyk wrote: |
I thought so.
One more question :) I want manually add that parser (https://highlightjs.org), but I'm newby in that and don't know where ....
I know that downloaded hightlight pack I must put into folder scripts, but where to add this line:
<script>hljs.initHighlightingOnLoad();</script>
Stefan Ritt wrote: |
You can manually highlight code, but there is no automatic language parser.
Daniel Sajdyk wrote: |
Hello :)
Is there any way to highlight code (for example php, SQL) in elogs entries?
Best Regards
Daniel Sajdyk
|
|
|
|
|
|
|
|
Re: Highlight code?, posted by Aaron James Long on Mon Dec 12 14:04:32 2016
|
Thanks for the quicky reply Stefan. Yes, I had inut the same string! My error was not restarting the server; I've done this and code highlighting works fine.
Stefan Ritt wrote: |
All I did was this:
Bottom Text = <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/styles/default.min.css"><script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/highlight.min.js"></script><script>hljs.initHighlightingOnLoad();</script>
Aaron James Long wrote: |
Can I ask for some clarification; I would like to include code highlighting for some computational students who will be making use of ELOG.
In the example you showed, my understanding is that you included a "Bottom text =... " entry in the forums elog config. This included the bare minimum remote call outlined by the highlightjs site. Can you clarify (as I'm having issues setting it up) should the "Bottom text=..." entry take this as a string, or should it be contained in a seperate html file in the same local directory as the cfg?
Daniel Sajdyk wrote: |
Ok. Thanks a lot :)
Stefan Ritt wrote: |
In the HTML editor, you can select the code text, then select from the "Styles" drop-down the style "Computer Code", and on the "Normal" drop-down the formatting "Formatted". This puts the code in <pre> and <code> tags, so you don't have to manipulate HTML directly.
Daniel Sajdyk wrote: |
Looks like it works :)
Code need to be put in tags:
<pre><code class="sql">...</code></pre>
but it works.
Thank you :D
Best Regards
Daniel Sajdyk
Stefan Ritt wrote: |
I did not know about highlight.js . You can put it into any elog page with "Bottom text = ...". I tried it for this forum and put in some C code:
#include <stdio.h>
int main()
{
// printf() displays the string inside quotation
printf("C Programming");
return 0;
}
Seems like this works nicely. Thanks for that hint.
Daniel Sajdyk wrote: |
I thought so.
One more question :) I want manually add that parser (https://highlightjs.org), but I'm newby in that and don't know where ....
I know that downloaded hightlight pack I must put into folder scripts, but where to add this line:
<script>hljs.initHighlightingOnLoad();</script>
Stefan Ritt wrote: |
You can manually highlight code, but there is no automatic language parser.
Daniel Sajdyk wrote: |
Hello :)
Is there any way to highlight code (for example php, SQL) in elogs entries?
Best Regards
Daniel Sajdyk
|
|
|
|
|
|
|
|
|
|
field selections persist across new log entries?, posted by Anthony Krishock on Tue Sep 8 14:22:11 2020
|
All,
I am using elog as an observation log for amateur astronomy. I have a form configured, but I would like to know if it is possible to make certain fields persist across new entries.
What I mean is this:
When I make an new observation, I select a value for sky conditions (say.. "1"). When I make another observation, "1" is already selected.
Is this possible? If so, how?
Thanks |
Field values dependent on other selections, posted by Anthony Krishock on Tue Oct 20 02:34:46 2020
|
All,
I would like to know if there is a way in elog to populate a field based on the value of another field. What I want to do is have a field with a few selections (a menu) and another text field that populates based on what I select from the menu.
Is this possible? |
Re: Field values dependent on other selections, posted by Anthony Krishock on Wed Oct 21 02:26:32 2020
|
Thanks for your suggestion.. Is it possible to, once
Stefan Ritt wrote: |
Look in the manual under "conditional attributes"
Stefan
Anthony Krishock wrote: |
All,
I would like to know if there is a way in elog to populate a field based on the value of another field. What I want to do is have a field with a few selections (a menu) and another text field that populates based on what I select from the menu.
Is this possible?
|
|
|
Re: Field values dependent on other selections, posted by Anthony Krishock on Wed Oct 21 02:27:43 2020
|
Thanks for your suggestion. Right now, my log is configured as follows:
Options Eyepiece = Pentax{a}, TeleVue{b}, Meade{c}
{a} Options Pentax = 5mm, 20mm, 30mm
{b} Options TeleVue = 7mm Nagler, 10mm Radian, 24mm Panoptic
{c} Options Meade = 8.8mm UWA, 14mm UWA, 26mm QX
If I select "Pentax", I would like the other two options to be unavailable. Instead, all three options are shown. Can I mask the other unused options?
Stefan Ritt wrote: |
Look in the manual under "conditional attributes"
Stefan
Anthony Krishock wrote: |
All,
I would like to know if there is a way in elog to populate a field based on the value of another field. What I want to do is have a field with a few selections (a menu) and another text field that populates based on what I select from the menu.
Is this possible?
|
|
|
Dump screenshot to new elog entry, posted by Anthony J Krishock on Sun Dec 12 01:18:46 2021
|
Hello,
I am interested in finding a preferrably single-click way to capture a screenshot and posting it automatically to a new elog entry . I would be doing this from Windows. Is this possible?
Thanks |
Hiding Comments on the Logbook Selection Page, posted by Adam Blandford on Tue Mar 3 11:30:01 2009
|
Hi
I was just wondering if there was a way that the comments for a logbook could be set to be invisible on the Selection page but then displayed once a user has logged in to a particular logbook?
This is required for security purposes. I want a common login page which shows all logbooks, where the logbook names only have meaning for people who know them but then once logged in the comment provides additional information about that logbook.
Thanks
Adam |