1 (edited by lucas 2020-08-23 11:52:07)

Topic: missing parentheses when displaying birthdays ...

Hi Roel,

Recently, I have installed the latest 4.7.9 version of luxcal.
The result can be seen here: https://bruedergrimmschule.de/terminkalender/.
Updating from 4.7.8 version went really smooth and the script runs stable & fine.

There is one small question I have:
I have followed your instructions to get a birthday displayed in the calendar.
If you look at 28th of August you will see that Abraham Lincoln gets displayed,
showing "50" without parentheses, where it should be "(50") with parentheses.

It probably will be a small change to get the parentheses displayed as well,
so the result will look like "Abraham Lincoln (50).
How could this be achieved?

Furthermore, if you look in the display, check https://bruedergrimmschule.de/,
ideally in case of a birthday, only "Abraham Lincoln (50)" should be displayed,
instead of:
Ganztags
Abraham Lincoln
Kategorie: Geburtstage
((1970))


Regards, Lucas

Re: missing parentheses when displaying birthdays ...

Hello Lucas
In settings you have to specify the paranthesis - like this : #ts #e (#a)

In the event you specify the birth like this :  born (1970)
If you don't specify the paranthesis in the settings the birthday will be shown as a number.
If you wrap the #a parameter in paranthesis (#a) then the paranthesis is shown as text.

3 (edited by Schwartz 2020-08-23 16:07:45)

Re: missing parentheses when displaying birthdays ...

You could also have a text like : (age: #a)

The result will be  : (age: 50)
If (1970) in the eventtext

Re: missing parentheses when displaying birthdays ...

Hi,

I followed your instructions.
But if you would check https://bruedergrimmschule.de/terminkalender/,
you will see that evry event in the calender now gets an extra () displayed ...
Any ideas how to solve?

Regards, Lucas

5 (edited by Schwartz 2020-08-23 19:51:00)

Re: missing parentheses when displaying birthdays ...

If you use the section character|

then - what is in the section will only be shown when data is present.
Meaning that the paranthesis should  only be shown when the event has data for the #a parameter.

Maybe you will need to have the time also in a section -to avoid problems with events having starttimes and all-day events.

Re: missing parentheses when displaying birthdays ...

Hi Lucas,

I remember that I've sent you some changed files in the past to display the age of persons having their birthday.
As Schwartz explained above, this feature has changed a bit to make it more flexible. This had to be done because not everybody was happy the age in parentheses. There are basically two changes:
1. To make the feature work, the year of birth should be present in the events description field enclosed in parenthesis
2. On the Settings page, under Views, in the "Event layout in Month, Week and Day view" templates you have now the freedom to specify how you want the age to be shown (e.g. "(#a)", "age: #a", "#a years old",etc. However, to ensure that the extra characters are only shown when #a results in a value, you should make it a section, by using the new section separators (vertical bar). So in your case you should put "|(#a)|" in the template .
Thereafter it should be fine.

I know that this means you will have to change a few descriptions (put parentheses around the year of birth) and I'm sorry for that. But I promise that I will not change this again in the future wink


Roel

7 (edited by lucas 2020-08-23 22:53:13)

Re: missing parentheses when displaying birthdays ...

Hi Roel,

Thanks for the extra explanation.
Initially I was still on the old track wink.
However, when following your instructions, by using "|(#a)|",
the result in the calendar is:
-- that I only get to see "(50 )", so the name is not displayed
-- and I can not "change" the event any longer by clicking on it.

Lucas

Re: missing parentheses when displaying birthdays ...

Hi Lucas,

Sorry, I was not clear enough in my previous post . . .
"|(#a)|" should not be the only thing in the templates, it should be part of the templates! It is the "age" part.
So if you want for instance the event time , the event title and the age to be displayed, your templates should look as follows: "#ts #e| (#a)|"

When you only put "|(#a)|", the event title is not included and if there is no title, you can't click it to edit the event. So the event title "#e" should always be part of the templates.

You can see all possibilities on the Settings page, under Views, when you hover the label "Event layout in Month, Week and Day view".

Roel