ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
1318
|
Mon Jul 25 23:39:16 2005 |
| Chris Green | greenc@fnal.gov | Question | Linux | 2.6.0b | Can't set Author attribute properly in reply? | Hi,
I have two problems:
1) With the configuration below, I can't set the Author attribute to be the author of the reply. As written, it gives the Author field as blank. If the Remove on Reply line is removed, it is set to the parent's author. What am I doing wrong?
2) With the Page Title line set as shown, $logbook gets expanded as "Charged+Current+Pi+Plus". If the line is left blank, the correct "Charged Current Pi Plus" gets put in the title line.
Thanks for any help,
Chris.
[global]
Top Group MiniBooNE Papers = Charged Current Pi Plus, Neutral Current Coherent Pions
<snip>
[global MiniBooNE Papers]
Password file = papers.pwd
Self register = 3
Menu commands = List, New, Last day, Download, Reply, Duplicate, Find, Config, Delete, Help
Admin user = admin1, admin2
Allow Delete = admin1, admin2
Restrict edit time = 0
Attributes = Author, Subject, Keywords
MOptions Keywords = Structure, Physics, "Spelling, grammar and typos.", Plots
Required Attributes = Subject, Keywords
Subst on reply subject = Re: $subject
Thread display = $subject, posted by $author on $Entry
Remove on reply = Author
Preset Author = $long_name
Locked Attributes = Author
Omit Email To = 1
Reverse sort = 1
Page Title = MiniBooNE papers comments page: $logbook
[Charged Current Pi Plus]
Comment = Charged current pi plus paper.
Theme = default
[Neutral Current Coherent Pions] |
1321
|
Tue Jul 26 10:00:34 2005 |
| Emiliano Gabrielli | AlberT@SuperAlberT.it | Question | Linux | 2.6.0b | Re: Can't set Author attribute properly in reply? |
Chris Green wrote: | Hi,
I have two problems:
1) With the configuration below, I can't set the Author attribute to be the author of the reply. As written, it gives the Author field as blank. If the Remove on Reply line is removed, it is set to the parent's author. What am I doing wrong?
|
Subst on reply Author = $long_name |
1322
|
Tue Jul 26 10:02:58 2005 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Linux | 2.6.0b | Re: Can't set Author attribute properly in reply? |
Chris Green wrote: | 1) With the configuration below, I can't set the Author attribute to be the author of the reply. As written, it gives the Author field as blank. If the Remove on Reply line is removed, it is set to the parent's author. What am I doing wrong? |
Hey, elog made it to MiniBooNE! I'm working on MEG...
What you need is the following:Preset on reply subject = Re: $subject
Preset Author = $long_name
Preset on Reply Author = $long_name
Locked Attributes = Author
The Subst statements work after the entry gets submitted, while the preset statements work before. So Preset on Reply <attribute> is what you need.
Chris Green wrote: | 2) With the Page Title line set as shown, $logbook gets expanded as "Charged+Current+Pi+Plus". If the line is left blank, the correct "Charged Current Pi Plus" gets put in the title line. |
The substitution $logbook originally produces a valid URL to the logbook, and thus replaces blanks by "+". I changed that so that $logbook produces the original name containing blanks, and $elogbook is the encoded one with the "+"'s. The change is in revision 1.723 |
1324
|
Tue Jul 26 10:49:12 2005 |
| Emiliano Gabrielli | AlberT@SuperAlberT.it | Question | Linux | 2.6.0b | Re: Can't set Author attribute properly in reply? |
Stefan Ritt wrote: |
Chris Green wrote: | 1) With the configuration below, I can't set the Author attribute to be the author of the reply. As written, it gives the Author field as blank. If the Remove on Reply line is removed, it is set to the parent's author. What am I doing wrong? |
Hey, elog made it to MiniBooNE! I'm working on MEG...
What you need is the following:Preset on reply subject = Re: $subject
Preset Author = $long_name
Preset on Reply Author = $long_name
Locked Attributes = Author
The Subst statements work after the entry gets submitted, while the preset statements work before. So Preset on Reply <attribute> is what you need.
|
Depending of what your paranoia level is 
Substitute is the only way I have to be assure it is as I want ... yes, in real life nobody of my users will never try to change the generated HTML ad replace by hand the Author, but ...  |
1325
|
Tue Jul 26 10:51:12 2005 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Linux | 2.6.0b | Re: Can't set Author attribute properly in reply? |
Emiliano Gabrielli wrote: | Substitute is the only way I have to be assure it is as I want ... |
No, that's not true. A
Locked attributes = Author
will do the job as well. |
1326
|
Tue Jul 26 10:55:03 2005 |
| Emiliano Gabrielli | AlberT@SuperAlberT.it | Question | Linux | 2.6.0b | Re: Can't set Author attribute properly in reply? |
Stefan Ritt wrote: |
Emiliano Gabrielli wrote: | Substitute is the only way I have to be assure it is as I want ... |
No, that's not true. A
Locked attributes = Author
will do the job as well. |
I can't argue how it works ...
The following code will assure that, if the HTML generated by elog would be modified by hand by a malicious user the server can still preset the author field with the right $long_name?
Locked attributes = Author
Preset on Reply Author = $long_name
how works in details the "Locked Attribute" parameter then ?? ... |
1327
|
Tue Jul 26 10:59:45 2005 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Linux | 2.6.0b | Re: Can't set Author attribute properly in reply? |
Emiliano Gabrielli wrote: | The following code will assure that, if the HTML generated by elog would be modified by hand by a malicious user the server can still preset the author field with the right $long_name? |
Ok, you're right. But that requires quite some knowledge to change the generated HTML by hand. So for paranoiac people the "Subst" might be better. Actually you could have both the "Preset on Reply" and the "Subst on Reply", so on the reply entry form one sees already the correct author. |
1328
|
Tue Jul 26 12:02:35 2005 |
| Emiliano Gabrielli | AlberT@SuperAlberT.it | Question | Linux | 2.6.0b | Re: Can't set Author attribute properly in reply? |
Stefan Ritt wrote: |
Emiliano Gabrielli wrote: | The following code will assure that, if the HTML generated by elog would be modified by hand by a malicious user the server can still preset the author field with the right $long_name? |
Ok, you're right. But that requires quite some knowledge to change the generated HTML by hand. So for paranoiac people the "Subst" might be better. Actually you could have both the "Preset on Reply" and the "Subst on Reply", so on the reply entry form one sees already the correct author. |
It's my actual configuration infact  |
|