Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 213 of 807  Not logged in ELOG logo
ID Date Icon Author Author Email Category OS ELOG Version Subjectdown
  67322   Wed Aug 29 10:37:44 2012 Reply Stefan Rittstefan.ritt@psi.chQuestionLinuxV2.8.1-235Re: dynamic preset text

Zbigniew Reszela wrote:

Dear all,

Is it possible to have a dynamic "preset text" option?

I would like to switch the template file depending on the attribute value. (Of course this attribute values will be a fixed list of options, not extandable). 

I see there one difficulty, that: if user already started editing the text body, he could lose this data. But I think that this could be left on user responsibility to take care about it.

Another option could be to always insert the template text on the very beginning of the text body.

Is this feature implemented, or maybe someone have done it by changing the server code?

Cheers

This is possible with conditional attributes. An additional trick would be to not show the text body of an attribute is not selected. This way the user first has to select the attribute, then the text field with the specific preset will show up. The configuration would be something along these lines:

Attributes = Type, Subject
Options Type = One{1}, Two{2}, Three{3}
Show text = 0

{1} Preset text = text1
{2} Preset text = text2
{3} Preset text = text3
{1,2,3} Show text = 1

 

Of course you have to supply proper text files text1, text2, text3.

- Stefan

  67325   Wed Aug 29 17:55:37 2012 Agree Zbigniew Reszelareszelaz@gmail.comQuestionLinuxV2.8.1-235Re: dynamic preset text

Stefan Ritt wrote:

Zbigniew Reszela wrote:

Dear all,

Is it possible to have a dynamic "preset text" option?

I would like to switch the template file depending on the attribute value. (Of course this attribute values will be a fixed list of options, not extandable). 

I see there one difficulty, that: if user already started editing the text body, he could lose this data. But I think that this could be left on user responsibility to take care about it.

Another option could be to always insert the template text on the very beginning of the text body.

Is this feature implemented, or maybe someone have done it by changing the server code?

Cheers

This is possible with conditional attributes. An additional trick would be to not show the text body of an attribute is not selected. This way the user first has to select the attribute, then the text field with the specific preset will show up. The configuration would be something along these lines:

 

Attributes = Type, Subject
Options Type = One{1}, Two{2}, Three{3}
Show text = 0

{1} Preset text = text1
{2} Preset text = text2
{3} Preset text = text3
{1,2,3} Show text = 1

 

Of course you have to supply proper text files text1, text2, text3.

- Stefan

 

 Thanks, it works perfectly!

  1557   Wed Dec 21 20:24:14 2005 Reply Stefan Rittstefan.ritt@psi.chQuestion ELOG V26b5Re: duplicate & presets
> I'm (mis)using elog as a database. I like the fact that I can have presets for fields, but I also like the fact 
> that I can make a duplicate of an entry. Now when I make a duplicate, all the fields get overwritten with the 
> preset-value. Is there a way to get the preset-values only on entering a NEW reord and NOT on a duplicate ?

I fixed that in the SVN revision 1583. The fix will be contained in the upcoming version 2.6.1.
  836   Tue Dec 7 16:15:28 2004 Entry Stefan Rittstefan.ritt@psi.chBug reportOther2.5.5-2Re: dropdown-lists display only the first 100 entries
Right. Number of options is limited to 100.
  837   Thu Dec 9 11:30:07 2004 Entry Guenter NowakGuenter.Nowqak@t-systems.atBug reportOther2.5.5-2Re: dropdown-lists display only the first 100 entries
> Right. Number of options is limited to 100.
hi, i found the MAX_N_LIST macro and increased it
  839   Thu Dec 9 11:40:05 2004 Reply Stefan Rittstefan.ritt@psi.chBug reportOther2.5.5-2Re: dropdown-lists display only the first 100 entries
> > Right. Number of options is limited to 100.
> hi, i found the MAX_N_LIST macro and increased it

Please note that if you make it too big, you will get a stack overflow and
elogd will crash.
  66846   Thu Jun 10 15:19:51 2010 Reply Stefan Rittstefan.ritt@psi.chQuestionLinux2.7.8Re: drop in replacement for FCKeditor?

Bill Pier wrote:

Is it possible to use a drop-in replacement for the FCKeditor? 

What is a drop-in replacement? 

  66848   Thu Jul 1 22:59:41 2010 Reply Bill Pierbpier@clove.orgQuestionLinux2.7.8Re: drop in replacement for FCKeditor?

Stefan Ritt wrote:

Bill Pier wrote:

Is it possible to use a drop-in replacement for the FCKeditor? 

What is a drop-in replacement? 

 A configuration option to specify a different/alternate javascript based editor.

ELOG V3.1.5-3fb85fa6