In this new LuxCal version 5.2.4 a number of technical issues have been addressed and a few bugs have been fixes. In addition an "About LuxCal " option has been added to the side menu.

>>>> IMPORTANT: FOR THIS VERSION THE MINIMUM PHP VERSION REQUIRED IS 7 <<<<

As always, John from Denmark took part in the beta testing of this new version and helped to make the LuxCal Web Calendar a better product. Thank you John!

Hereafter you will find a full summary of all changes since the previous LuxCal version 5.2.3.

New features / improvements
• In the side menu an option "About LuxCal" has been added, which is available for users with administrator rights. When this option is selected, an About LuxCal overlay is shown with the current calendar version and a message if a newer version is available at the LuxSoft website with download links. In addition, if important information is available, LuxSoft can add note or warning texts to this overlay. Calendar administrators are advised to select this menu option from time to time.

Technical issues
• A cross-site scripting / SQL injection vulnerability reported by JPCERT/CC has been solved. [VN: JVN#15005948 / TN: JPCERT#97783326]. Now all calendar input data, i.e. GET, POST and COOKIE variables, are sanitized and the variables with a fixed-format are validated at the start of the code.
• The email regex ($rxEML) has been improved. In special cases, when the event description contained a URL link, which included a @-sign, the regex to create email links didn't work. This resulted in an empty description field.
• In the post-processing of the upgrade function, when searching for old "sml" email links, the offset in strpos function has been removed. PHP 8.1 didn't like offsets outside the haystack.
• On the page Event File Import - iCal format the "Check all Ignore boxes" button has been changed into a "Toggle all Ignore boxes" button.
• Code simplification. For the user menu, side menu and options panel: the JavaScript code element.style.height.slice(0,1) > '0' has been replaced replaced by element.clientHeight > 'x' and element.style.width.slice(0,1) > '0' has been replaced by element.clientWidth > 'x'.
• General code simplifications in the JavaScript toolbox. Most of the times testing on undefined is not needed. Several others.
• Code simplification. The label-tags can be put "around" the item concerned, rather than using <label for='<id>', which makes most ids redundant and the code simpler.
• Code simplification. When using the scandir function, filtering of files is now done by a PHP preg_grep function.
• Code simplification. The long array definition notation (array()) has been replaced by the short notation ([]).
• Code simplification. In the calendar <head> section "onpageshow" has been combined with "onload".
• For events in a category with "to be approved" set, the "approved" check box and label in the Event window have moved inside the color of the page body.

Bug fixes
• If on the settings page for the Event date format a separator, other than '-' had been specified, then in reminder emails, the back-link to the calendar below the email message, did not work. This is because the date 'nD' is used in DD format (with the user-defined separator). The GET-parameter validation function however, requires a '-' separator. Validation regex updated.
• In the makeE function, under case 6, there was a break; after each line (nom and nos). There should however be just one break; after both lines.
• An error in the regex to extract an email address from the event's description field and produce the mailto-link, resulted in a mailto link which didn't work and could, when editing the event, not be converted back to the originally entered email address.
• To avoid SQL errors during the upgrade process, in the pre-processing section of the upgrade function the DB fields notRecip and notMail (< V4.5) have been added to the list of possible NULL fields that must be set to NO NULL.

Hi there,
Sorry my suggested change was not complete.
Please edit again the file /common/toolbox.php and replace line 574 . . .

$html = preg_replace_callback($rxEML,function ($m) { global $tit, $sda, $xx; return "{$m[1]}<a class='link' href='mailto:{$m[2]}@{$m[3]}.{$m[4]}?subject=$sda%20-%20".str_replace(' ','%20',$tit)."'>".($m[5] ?? $xx['vws_send_mail'])."</a>{$m[6]}"; },$html);

. . .by . . .

$html = preg_replace_callback($rxEML,function ($m) { global $tit, $sda, $xx; return "{$m[1]}<a class='link' href='mailto:{$m[2]}@{$m[3]}.{$m[4]}?subject=$sda%20-%20".str_replace(' ','%20',$tit)."'>".($m[5] ?: $xx['vws_send_mail'])."</a>{$m[6]}"; },$html);

Or, which is much simpler., just replace the ?? before $xx['vws_send_mail'] by ?:

This will solve the problem.
Roel

Hi Stefan,
I'm very keen on staying compatible with the latest PHP versions and have spent a lot of time on this.
I know there are many LuxCal calendars running on PHP 8.2, like my own test calendars, and I have received not a single complaint or problem report.

So summarizing I think, if you are running one of the latest LuxCal versions, you can safely switch to  PHP 8 smile

Regards,
Roel

Hi Maxime,
This is a known anomaly and will be solved in the next LuxCal version. But in the mean time . . . .

Edit the file /common/toolbox.php and replace line 13 . . .

$rxEML = '~(^|\s)([^@\s]{1,40})@((?:[^@\s\[]{2,50})+)\.(\w{2,6})(?:\s*\[([^<>\[]*?)\])?(\.|\s|<|$)~im'; //jd@skyweb.com [title]

. . . by . . .

$rxEML = "~(^|\s)([\w!#$%&'*+/=?`{|}\^\~\-]{1,64})@((?:[a-z0-9-]{2,50})+)\.(\w{2,6})(?:\s*\[([^<>\[]*?)\])?(\.|\s|<|$)~im"; //jd@skyweb.com [title]

Use cut and paste wink

Thereafter the problem should be solved
Roel

55

(2 replies, posted in Problems)

Das ist toll André!
Roel

56

(1 replies, posted in Need Help)

Hi Carlos,
Send me an email with the pics please.
Did the upgrade itself work correctly?
Roel

57

(1 replies, posted in Need Help)

Hi Steve,
So you would need a Time Picker with only 10am, 2pm and 8pm and nothing else, am I correct?
The user however, would always be able to modify the time by just typing it! (not using the Time Picker).

If this is what you need, I could modify the time picker for you (hard coded).
If you want this, send me an email with the LuxCal version in use.
Roel

Hi Maxime,
I tested this in our test calendar and I cannot reproduce this problem. Maybe your PHP installation is more "strict" than ours.
I suggest to try the following:
Edit the file "/common/toolboxx.php" and on lines 898, 902 and 906 delete the ",30" close to the end of the line.
In other words, change the lines from . . . .

if (strpos($row['text2'],'sml(',30)) {

to . . . .

if (strpos($row['text2'],'sml(')) {

Thereafter the problem should be gone.
Please let us know if it's OK now.
Roel

Hi there,
I assume you copied this error message from the sql.log file. Is this the full message, or is there more in the sql.log file?
If you prefer, you can also email me a copy of your database backup file (.sql) and then I will upgrade the DB and return it to you.
Roel

60

(2 replies, posted in Need Help)

Hi Fred, there is nothing special to be done to make the calendar responsive. We've tried to make it as responsive as  possible, but of course when you load the Month View page on your cell phone in portrait mode, there is not much room. But it still works.
A very good solution for a narrow display is to use one of the so called "displays". E.g. try: www.yoursite.com/calendar/display3.php.
The displays have been specially made for narrow display devices.
Roel

This new LuxCal version 5.2.3 includes important new features and improvements. Furthermore quite a number of technical issues have been addressed and a few bug have been fixes.

>>>> AS OF THIS VERSION THE MINIMUM PHP VERSION REQUIRED IS 7 <<<<

As always, this new release has been thoroughly tested with the help of John from Denmark, resulting in less bugs and a higher quality. Thank you John!

Hereafter you will find a full summary of all changes since the previous LuxCal version 5.2.2.

New features / improvements
• Drag and drop functionality has been added to the Year and Month view pages, so that events can easily be re-arranged without losing the calendar oversight. With this feature the mouse can be used to drag events from one day cell to an other day cell. Normal events, multi-day events and repeating events can be dragged and dropped. Dragged and dropped events will also have their "edited date/time" and "edited by" fields updated. If the ctrl-key is pressed while dropping the event, the event will not be moved, but a copy of the event will be dropped. If the side panel with the mini calendar is displayed, the drag and drop functionality is also present for this mini calendar and between the mini calendar and the year and month calendar. This makes the drag and drop feature very powerful. In Month view for example, one can select in the mini calendar one of the next months and drag events from the current month to the selected next month and vice versa. Day markings can also be dragged and dropped. They should be dropped in the event area of the day cell and not in the header area of the cell. In addition to the new feature described above, in a multi-calendar setup a user with at least manager rights can now also copy events from the current calendar to the other calendars. This works as follows: When the user drags an event from the Month view page, the Year view page, or the mini-calendar in the side panel and drops it on the calendar's top bar, a dialog box opens where the destination calendar(s) can be selected. If thereafter the Copy Event button is pressed, the event will be copied to the selected calendar(s). Because the other calendar(s) most likely will have different event categories, the category of the copied event will be set to "No cat".
• Since in the Options Panel the Calendar check boxes (if present), the View check boxes and the Language check boxes can have only one check box selected, they have been made auto-submit and therefore for these columns the Done button doesn't need to be pressed to submit the selection.
• On the settings page the event templates, where the fields to be shown in the general views, the upcoming view and the hover box could be specified, has been split in Event templates for public users and Event templates for logged-in users, adding more flexibility to "who should see what". By this change the previous setting "Show event details to users" has become redundant and has been removed.
• The Month, Week and Day view pages have been re-designed to avoid the misalignment of the calendar header and the calendar body, which could occur when the calendar body had no scrollbar. The header row which is now part of the calendar body table, has been made "sticky". Also, when scrolling on narrow screen devices the header will stick at the top of the screen.
• In the side panel's mini calendar, the date in the day cells is now right aligned, as in the Year and Month view calendars. Furthermore the font size of the date in the day cells has been slightly reduced".
• The "todo" events for which the "rolling" option has been set, will stop rolling when the user checks the "todo" check box.
• For events in the event base category "no cat" the "no overlap allowed" option cannot be set anymore. So, events in the "no cat" category can always overlap.
• To make maximum space available for the calendar content, the page footer is now positioned at the very bottom of the page and the footer height is fixed at 20px.
• In the Edit User Profile form the * for the note has been made class='hired'.

Technical issues
• To keep the calendar state of the art and cutting edge, in various files the calendar's PHP code has been simplified by using new features introduced in PHP 7, like e.g. the null coalescing operator and the shorthand ternary (Elvis) operator.
• To keep the calendar state of the art, in the JavaScript code the variable and constant declarations have been aligned with the ES6 JavaScript standard. In addition the deprecated JavaScript "substr" function has been replaced by the "slice" function.
• Two vulnerabilities reported by JPCERT/CC solved. A cross-site scripting and an SQL injection vulnerability. [VN: JVN#04876736, JVN#59855261 / TN: JPCERT#90779540].
• To avoid vulnerabilities, in passwords the characters <, > and ~ are not allowed. When using these characters, an error message will be shown.
• On the week and day view pages, for each time slot the date and the time are now stored in the id of the time slot <div>, rather than in a "data-" field, which makes the drag functions simpler.
• For "todo" events toggling the check box in the database is now done via the more modern and simpler "async await fetch" method, rather than using the XMLHttpRequest method (AJAX). The checkevt.php file has been integrated in the toolsaaf.php file and has been removed.
• Toggling the check box for "todo" events and editing events using the new drag and drop feature has been made more secure by applying a token.
• The parameter "dbSel" in the lcconfig.php file was redundant and has been removed. Whether in case of multiple calendars and when an administrator is logged in, the Options Panel shows a column with calendar IDs (to switch calendars), now solely depends on the setting "Options panel menus" in the section Navigation Bar on the Settings page.
• The HTML <pre> </pre> tags (spacers) have been replaced by &ensp; (if one space in between) and &emsp; (if 2 spaces in between).
• On the Settings page the event related fields have moved from the Views section to the Events section, which is more logical.
• Code simplified by using the $eDetails variable set in index.php, rather than performing the "may see details" test again.
• The bar with the left and right arrows with the time span in between has been made 4 pixels higher and the time span text is now better aligned with the arrows.
• In the head section of the mini-calendar the toolbox.js was loaded twice and the calID JavaScript calID variable was defined twice. This was no problem, but redundant.
• On the Settings page, in the general section, improved label and text of the Maintenance mode.
• For all admin pages the div with class 'scrollbox' has been removed and the scrollbar of the 'content' div will be used. This is a code simplification and the scrolling is done over the total vertical space.
• Header with arrows and date span made more responsive by switching to 3-letter months on narrow displays.
• Because of the limited space available in the Options menu and in the side bar's text field, the scroll bars have been made "thin". NOTE: for the moment this only works in the Firefox browser. We hope and expect the scrollbar-width property will be endorsed by W3C and thereafter be supported by other browsers.
• Rather than validating entered email addresses using a user-defined regular expression, now the PHP filter_var function is used, which is a simplification
• When a user logs in with an invalid email address, rather than displaying a generic error message, now the message will be "invalid email address". Furthermore the "Register" button has been made bold.
• The dates stored in the "checked' and 'xDates' fields of the events database table have been replaced by an offset number of days w.r.t. the event start date. This gives a much better user experience when events are moved with the drag and drop feature.
• During the calendar upgrade process the database tables will be compacted before the post-processing starts.
• In the upgrade section the tables post processing processes have been rearranged in the order of the calendar versions. This way it will be easier for future versions to selectively run the processes and speed up
    the overall calendar upgrade time.

Bug fixes
• Several PHP warning messages resolved, which occurred when the user asked for a pdf file. These warnings did not prevent the PDF feature from functioning.
• When exporting a .ics file, some lines in the exported file could become longer than 75 characters, which is the maximum length allowed according to the RFC 5545 specification.
• In the displays 1 - 3 empty lines in the event description were not shown due to a css error. Solved.

Hi Windo,

I'm sorry for that, but I did not receive an email from you. I also checked my spam box, but nothing!
Could you please send an email directly to rb@luxsoft.eu.

Roel

Hi Windo,

Send me your email address (via the Contact page) and then I will send you a small test script to test the PHP mail function.
If this works, the calendar mail should work as well.

Roel

Hi Windo,
Please also check if the Calendar URL on the Settings page in the General section is correct. In particular if the https (secure) part is correct.

Roel

65

(3 replies, posted in Problems)

Hi Greg,

I've completed the re-design of Month view page (and Week and Day view pages, which have the same problem).
This change will be part of the next LuxCal version (V5.2.3).

I've sent you an email with the modified files, which you can upload in your current calendar version 5.2.2.
Roel

66

(3 replies, posted in Problems)

Hi Greg,

Would it be possible to send me a link to your calendar embedded in the iframe? If you don't want to post it here, you can send it to me by email.
I would like to have a look at the whole page to see why the Full Screen button doesn't work.

The second problem you posted is a known problem. It happens when in Month view the lower part (the weeks) does fit and has no scroll bar, while the header with the day names has a (tiny) scrollbar (The inverted V is the upper part of a tiny scroll bar).
I've planned for a long time to slightly re-design the Month view page to solve this misalignment. This is maybe the right moments to do so.
I will work on this and come back to you in a couple of days.
Roel

67

(7 replies, posted in Need Help)

Hi there,
When after having uploaded and reviewed the events from a .sql or .csv file and have selected "Add Events to Database", you can't easily remove them. That's why you can first review them before adding wink

Your 2nd question:
This is not so easy to answer; it depends on how you want it to work in detail.
The way you described it above is not possible, but maybe one of the following solutions will work for you:
1. With one calendar installation you can create as many calendars as you want, So you could for instance create a calendar per group and on the Settings page of each calendar, in the Events section, you could set "Show event details to users" to Logged in. Now you could give the Public User read access to each calendar. Group 1 can now open the calendar of group 2 and see all events, but no details.
2. If you don't want the Public User to have read access: Same as 1. above, but set Public user to group "No access" and on the Settings page, in section Events set "Show event details to users" to "disabled". Give the group members "post all" rights in their own calendar. and give the members f the other group "Read" rights

These two solutions have the disadvantage that you will have two calendars and the group members have to switch calendars to see  the calendar of the other group.
There is another possibility with just one calendar:
On the Settings page, in the Events section, set "Show event details to users" to "disabled" and give group 2 "Post all" rights and give group 1 "Post own" rights. Now group 2 can see the details of all events and group 1 can see only see the details of their own evens. (I've not tested this and don't know if this is a good solution for you)

Roel

68

(7 replies, posted in Need Help)

Hi There,
When you import your holiday calendar (in iCal format), before it is added to the LuxCal calendar, all events to be imported are shown to you. So you can make changes before importing or just cancel the import if it is not the right calendar.
Roel

Hi Mucu,
Something I forgot to mention:
Quite some internet providers only support the sending of PHP emails to the outside world if the sender email address is an address created via the ISP.
In other words: It is always a good idea to use for the calendar email address an address created via the cPanel of the provider.

I don't know if this could be the reason of your problems, but maybe it helps.
Roel

Hi Mucu,
It's hard to say why the user doesn't receive the email with the generated password. I tested this again in our test calendars and all seems to function as it should.
Could you check if on the Settings page in the section Reminders - General, the "Max. no. of recipients per email" is set? The default is 10.

The email with the generated password is sent to the calendar email address with a Bcc to the user. So if the calendar owner receives the email, it means it has been sent (as Bcc) to the user as well. Could it be that it ends up in the user's spam folder?

I'm thinking in this direction, because nobody else reported this problem.
Roel

71

(5 replies, posted in Suggestions)

Hi Pat,

I've sent you a patch by email wink

Roel

72

(5 replies, posted in Suggestions)

I see what you mean Pat.
There is a "kind of" confirmation pop-up: before deleting events, it will show the list of events matching your date selection.
I can give you a patch to have the date fields for Past Events and Inactive Users blank. Should the software test on minimum a month earlier remain?
Roel

73

(5 replies, posted in Suggestions)

Hi Pat,
I'm not sure I understand what you mean. What do you exactly mean by "can we not have the pre-loaded dates (month old) for the 'Past events' and the 'Inactive users' when opening the clean up functions panel". Do you mean just a textual change?
Some more details please wink
Roel

Hi there,
If you don't want Public Users (not logged in users) to see the calendar, then via the side menu (☰) you should open the Users page, edit Public Access and put this in the group "No access".
That's all. Now when a Public User browses to the calendar, the user will get the calendar's log in page.
Roel

75

(1 replies, posted in Problems)

Hi Duncan,
On the admin's Settings page, in the section Views, edit "Weeks to show in month view" (5th from the top) and make it 0 or 1. Thereafter you will get exactly one month.
If you select a larger value (the number of weeks to show), it will always show one week in the past and the rest in the future.
Roel