ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
68499
|
Mon Dec 12 14:04:32 2016 |
| Aaron James Long | al876@york.ac.uk | Question | Windows | 3.1.1-3f311c5 | Re: Highlight code? | 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
|
|
|
|
|
|
|
|
|
|
68698
|
Mon Nov 13 12:58:41 2017 |
| Sara Vanini | vanini.sara@gmail.com | Bug report | Linux | 3.1.1-1-1 | drop-down list not working | Hi,
after ubuntu 16 system upgrade, elog version (3.1.1-1-1) on firefox version 56.0+build6-0ubuntu0.16.04.2 , the drop-down menus (Styles, Font, Size, etc) don't work anymore.
How can I fix it?
Many thanks!
Sara |
68267
|
Fri Feb 26 08:47:22 2016 |
| Nigel Warr | warr@ikp.uni-koeln.de | Bug report | Linux | 3.1.1-1 | Possible bug in elogd execute_shell | I was just playing around with gcc6's new feature for warning about misleading indentation (which can often hide real bugs) and I think it found one in elog-3.1.1-1 at src/elogd.c:22538. Here there is an if statement, which looks as though it should be inside a loop, but it isn't. The code is:
for (i = 0; i < MAX_ATTACHMENTS; i++)
generate_subdir_name(att_file[i], subdir, sizeof(subdir));
if (att_file[i][0] && strlen(shell_cmd) + strlen(lbs->data_dir) + strl$
< sizeof(shell_cmd) + 1) {
strcpy(p, "\"");
strcat(p, lbs->data_dir);
strlcat(str, subdir, sizeof(str));
strlcpy(str, att_file[i], sizeof(str));
str_escape(str, sizeof(str));
strcat(p, str);
strcat(p, "\" ");
p += strlen(p);
}
and the if statment is accessing the loop variable i but it is actually outside the loop. Presumably, there should be some more curly brackets here. gcc6 gave the warning:
src/elogd.c: In function ‘execute_shell’:
src/elogd.c:22538:10: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation]
if (att_file[i][0] && strlen(shell_cmd) + strlen(lbs->data_dir) + strlen(subdir) + strlen(att_file[i])
^~
src/elogd.c:22536:7: note: ...this ‘for’ clause, but it is not
for (i = 0; i < MAX_ATTACHMENTS; i++)
^~~
|
68268
|
Fri Feb 26 09:09:03 2016 |
| Stefan Ritt | stefan.ritt@psi.ch | Bug report | Linux | 3.1.1-1 | Re: Possible bug in elogd execute_shell | Absolutely correct! Nice to see compilers getting better and better. I changed the code and committed it.
Nigel Warr wrote: |
I was just playing around with gcc6's new feature for warning about misleading indentation (which can often hide real bugs) and I think it found one in elog-3.1.1-1 at src/elogd.c:22538. Here there is an if statement, which looks as though it should be inside a loop, but it isn't. The code is:
for (i = 0; i < MAX_ATTACHMENTS; i++)
generate_subdir_name(att_file[i], subdir, sizeof(subdir));
if (att_file[i][0] && strlen(shell_cmd) + strlen(lbs->data_dir) + strl$
< sizeof(shell_cmd) + 1) {
strcpy(p, "\"");
strcat(p, lbs->data_dir);
strlcat(str, subdir, sizeof(str));
strlcpy(str, att_file[i], sizeof(str));
str_escape(str, sizeof(str));
strcat(p, str);
strcat(p, "\" ");
p += strlen(p);
}
and the if statment is accessing the loop variable i but it is actually outside the loop. Presumably, there should be some more curly brackets here. gcc6 gave the warning:
src/elogd.c: In function ‘execute_shell’:
src/elogd.c:22538:10: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation]
if (att_file[i][0] && strlen(shell_cmd) + strlen(lbs->data_dir) + strlen(subdir) + strlen(att_file[i])
^~
src/elogd.c:22536:7: note: ...this ‘for’ clause, but it is not
for (i = 0; i < MAX_ATTACHMENTS; i++)
^~~
|
|
68358
|
Tue Jul 12 21:23:13 2016 |
| Austin Reid | arreid3@ncsu.edu | Bug report | Other | 3.1.1- | Email report has incorrect pictures | My group uses the precompiled Debian binary, and I use ELCode to format my log reports. (I've found it to be the easiest way to generate inline images)
Yesterday, I submitted an entry that renders correctly on the elog itself, but the email report that was sent to my collaborators was quite confusing, because every picture in it was the same. Interestingly, all the images used inline in the report were attached to the original, but they were stripped of their context.
I've attached screen shots of both reports. |
Attachment 1: emailedversion.jpg
|
|
Attachment 2: okversion.jpg
|
|
68919
|
Mon Mar 25 12:31:34 2019 |
| gibelin julien | gibelin@unicaen.fr | Question | Linux | 3.1.1 revision | elog client through proxy | Dear users,
we started an elog serveur (using ssl) and open to the world which is working fine.
However I am trying to access it via the command line client, from a computer that uses a proxy to connect to internet.
The environnment variable are set :
declare -x ftp_proxy="ftp://myproxy:3128/"
declare -x http_proxy="http://myproxy:3128/"
declare -x https_proxy="https://myproxy:3128/"
declare -x socks_proxy="socks://myproxy:3128/"
but when I try to connect
elog -h myelog -p 443 -l lognote -s 1 -u username passwd -w last
I have the following message :
Cannot connect to host myelog, port 44
How should I proceed ?
Best regards
JG
:
|
68923
|
Thu Apr 4 11:57:46 2019 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Linux | 3.1.1 revision | Re: elog client through proxy | The "elog" client does unfortunately not support proxies. You could however achieve the same with the "curl" tool. Have a look at elog:68597
Stefan
gibelin julien wrote: |
Dear users,
we started an elog serveur (using ssl) and open to the world which is working fine.
However I am trying to access it via the command line client, from a computer that uses a proxy to connect to internet.
The environnment variable are set :
declare -x ftp_proxy="ftp://myproxy:3128/"
declare -x http_proxy="http://myproxy:3128/"
declare -x https_proxy="https://myproxy:3128/"
declare -x socks_proxy="socks://myproxy:3128/"
but when I try to connect
elog -h myelog -p 443 -l lognote -s 1 -u username passwd -w last
I have the following message :
Cannot connect to host myelog, port 44
How should I proceed ?
Best regards
JG
:
|
|
68070
|
Tue Aug 4 15:35:39 2015 |
| Stefan Ritt | stefan.ritt@psi.ch | Info | All | 3.1.1 | Version 3.1.1 of elog has been released | Version 3.1.1, released August 4th, 2015
-
Updated CKEditor to version 4.5.1
-
Implemented "Date/Time format <attribute> = ..."
-
Implemented "Use Email Subject Edit = ..."
-
Replaced "Back" by "Delete" button
-
Fixed many issues with Draft Messages
-
CSS file is now in *addition* to the default file elog.css
-
Added LDAP documentation
-
Added "Logout to URL = ..." option
-
Added description of Apacher server authentication
|
|