26

(10 replies, posted in Problems)

That's weird indeed.
If you want the search to be always case-insensitive, edit the file "pages/search.php" and . . .
change line 118 from:

$schString = str_replace('&', '%', "%{$schText}%");

to

$schString = strtoupper(str_replace('&', '%', "%{$schText}%"));

and change lines 124 - 128 from:

if (in_array(0, $eF) or in_array(1, $eF)) { $filter .= "e.`title` LIKE '{$schString}'"; } //Title
if (in_array(0, $eF) or in_array(2, $eF)) { $filter .= ((substr($filter, -1) == '(') ? '' : ' OR ')."e.`venue` LIKE '{$schString}'"; } //venue
if (in_array(0, $eF) or in_array(3, $eF)) { $filter .= ((substr($filter, -1) == '(') ? '' : ' OR ')."e.`text1` LIKE '{$schString}'"; } //text field 1
if (in_array(0, $eF) or in_array(4, $eF)) { $filter .= ((substr($filter, -1) == '(') ? '' : ' OR ')."e.`text2` LIKE '{$schString}'"; } //text field 2
if (in_array(0, $eF) or in_array(5, $eF)) { $filter .= ((substr($filter, -1) == '(') ? '' : ' OR ')."e.`text3` LIKE '{$schString}'"; } //text field 3

to

if (in_array(0, $eF) or in_array(1, $eF)) { $filter .= "UPPER(e.`title`) LIKE '{$schString}'"; } //Title
if (in_array(0, $eF) or in_array(2, $eF)) { $filter .= ((substr($filter, -1) == '(') ? '' : ' OR ')."UPPER(e.`venue`) LIKE '{$schString}'"; } //venue
if (in_array(0, $eF) or in_array(3, $eF)) { $filter .= ((substr($filter, -1) == '(') ? '' : ' OR ')."UPPER(e.`text1`) LIKE '{$schString}'"; } //text field 1
if (in_array(0, $eF) or in_array(4, $eF)) { $filter .= ((substr($filter, -1) == '(') ? '' : ' OR ')."UPPER(e.`text2`) LIKE '{$schString}'"; } //text field 2
if (in_array(0, $eF) or in_array(5, $eF)) { $filter .= ((substr($filter, -1) == '(') ? '' : ' OR ')."UPPER(e.`text3`) LIKE '{$schString}'"; } //text field 3

That's all.

Use cut and paste wink

Roel

27

(10 replies, posted in Problems)

I tried in our MySQL test calendars and for all fields the text search is case-sensitive.
I also looked in the PHP code and the searches in the different database fields are all done in the same way (with the MySQL "LIKE" operator).

Roel

Unfortunately LuxCal version 5.3.1 has the following problem on several pages: Clicking an event to open it doesn't work.
The solution is very simple, but since it requires a change on several pages (some10 pages), we decided to release a new version.

Users of the current version 5.3.1, who encounter these problems, are advised to upgrade to version 5.3.2.

We are sorry for the inconvenience.

Roel

29

(10 replies, posted in Problems)

Hi there,
This is not really a bug.
• For the SQLite version of the calendar the text search is always case-insensitive. That's the way the SQLite database works.
• For the MySQL version of the calendar it depends on the database. Some databases support case-sensitive text search and others don't.

Roel

When using the Search function, clicking an event in the search results to open the event does not work.

This problem can be solved by editing the file "pages/search.php" and change line 204 from . . .

$click = ($evt['mayE'] ? 'editE' : 'showE')."({$evt['eid']},'{$date}')";

to

$click = ($evt['mayE'] ? 'editE' : 'showE')."({$evt['eid']},`{$date}`)";

It's hard to see, but the single quotes around {$date} towards the end of the line have been replaced by backticks ( ` ).
(Back ticks can be found on a US/UK keyboard left upper corner next to the 1 key.)

Roel

31

(10 replies, posted in Problems)

Bonjour,
You found a bug!
This problem can be solved by editing the file "pages/search.php" and change line 204 from . . .

$click = ($evt['mayE'] ? 'editE' : 'showE')."({$evt['eid']},'{$date}')";

to

$click = ($evt['mayE'] ? 'editE' : 'showE')."({$evt['eid']},`{$date}`)";

It's hard to see, but the single quotes around {$date} at the end of the line have been replaced by backticks ( ` ).
(Back ticks can be found on a US/UK keyboard left upper corner next to the 1 key.)

Roel

If you have the SQLite version of the calendar installed and after upgrading you get an "Invalid calendar ID error, this can be solved as follows:

• In the database folder (default "db") change the uppercase characters in the database file name to lowercase characters
• In the lcconfig.php file in the calendar root folder, if uppercase characters are present in the default calendar name, change them to lowercase.
• Start the calendar (just once) with the ?cal=<calendar name> URL parameter. Where <calendar name> is the calendar name changed above.

Thereafter the problem should be solved.

Roel

When on the Settings page the 12-hour time format (am/pm) has been selected, then on the Add / Edit Event page the time picker doesn't work anymore.
This can be solved by editing the file /common/dtpicker.js and on lines 152 and 153 replace "const" by "var", as indicated below:

var am = apm[0].replace("a","am").replace("A","AM");
var pm = apm[0].replace("a","pm").replace("A","PM");

Roel

The Spanish language files have been updated by Wilfredeo and can be downloaded from the Download page.
Thank you Wilfredo!

35

(4 replies, posted in Need Help)

Hi there.
There are various possibilities to embed the LuxCal calendar in a webpage. It's all explained in the installation_guide.html, section 6.
If you need help, you should give us a detailed description f what goes wrong.
Roel

Because the LuxCal version 5.3.0 MySQL had some problems, both the MySQL and the SQLite versions have been withdrawn and replaced by version 5.3.1.
If you have downloaded LuxCal version 5.3.0, you should replace it by the new version 5.3.1.

We are sorry for the inconvenience.

In this new LuxCal version 5.3.1 you will find some interesting new features and improvements. Furthermore a number of technical issues have been addressed and a few bugs have been fixes.

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

As always, John from Denmark spent a lot of time beta testing this new version and helped to make the LuxCal Web Calendar a better product. Thanks again John!

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

New features / improvements
• When enabled on the Settings page, in the Event and Day Marker windows an emoji picker can be opened, which can be used to add emojis to the title and description fields.
• The event notification system has been revised. In addition to email and SMS notifications now also Telegram notifications are possible. Which service for notification is used is now determined by each individual user, rather than by the sending script. The user can select from the message services enabled on the Settings page via which service to receive notifications. The user can also select to receive notifications via more than one service, for instance both via email and Telegram messages. For more details see the admin_guide.html document.
• To give certain users calendar access for a limited duration, for each user account an expiry date can be specified. To do so one needs manager rights or up.
• On the admin's Edit Categories page you can now add a list with notification recipients to an event category. When on the calendar an event is added, edited or delete in this category, a notification will be sent to the recipients specified for the category. If the event editor is part of the recipients list, he/she will be excluded from the notifications to be sent. If the editor wants a notification as well, he/she can check "send notification now" in the Event window.
• On narrow displays in Month view the "Previous year" and "Next year" arrows in the navigation bar will float left and right respectively, so that they are further away from the normal "Previous" and "Next" arrows.
• The settings specifying the view buttons on the navigation bar for public and logged in users have been split in settings for large displays and settings for small displays. This way the admin can specify less buttons for small displays, so that the navigation bar on small displays fits on one line.
• As background information, on the Manage Database page a list with useful totals of database records is shown. Furthermore the length of the date fields have been limited to 10 characters.
• When not used the 'To approve', 'Upcoming' and 'Todo' side lists can now be disabled on the Settings page. This will result in less database accesses and faster calendar load times.
• When specified on the Settings page, a calendar logo will be displayed on the Log In page just below the Log In dialog box. The height of the logo can also be specified. The maximum width is 80% of the window width.
• The calendar can now remember multiple user log-ins from different devices. So for example when you log in from your mobile phone and from your desktop computer, while in both cases selecting "Remember me", the calendar will remember both log ins.
• When on the Thumbnails page a thumbnail is clicked, a "Copied to clipboard" notification is shown for some seconds.
• On the Thumbnail Images page, the Manage Thumbnails box has been given a bit more padding and the Submit button is horizontally centered now. Embellishment.
• The form on the Contact page has been redesigned. Embellishment

Technical issues
• Non-recurring events and recurring events are retrieved with one single database query, instead of two separate queries. This results in
    faster calendar load times.
• Several code optimizations to speed up calendar load times.
• In the options menu, the entries in the calendar selection table were enclosed in redundant <div>-tags. <div>-tags removed.
• On the Settings page, in the Events section, for the Event drag and drop setting, the "enabled" radio button was followed by a stray '>' character. Character removed.
• In the JavaScript "onclick", "onmouseover" code, by using the back-tick character the code has been made more consistent, better readable and less prone to interference with quotes in text strings.
• For the so-called Displays, in the <script>-tags where the toolbox.js file is loaded the calendar version number is added to the toolbox.js, to ensure the loading of the last toolbox.js version.
• In the Add / Edit Event window, both Help question mark symbols (Description and To) have been replaced by more discrete question marks.
• On the admin's Database page, the number of characters in the date input fields has been limited to 10.
• In the list of sub-categories, the first entry (None) was hard coded and consequently the same in all languages. It's now taken from the language file (ui-<lang>.php).
• In all functions the unused global variables have been deleted. Cleaning up.
• Empty and duplicate entries are removed from the recipients list, before the list is used to send notifications.
• On the User Profile page, when a field contained an invalid value, the field was reloaded from the database so that the user could not see why the value was invalid. Solved.
• The regex $rxPhone updated, so that a mobile phone number must start with a + or a 0 (zero) character.
• Both pages Import Users and Export Users have been revised. The telegram chat ID has been added to imported and exported files. Further changes: When exporting all users, the Public User is skipped. When importing users, the error handling and reporting of the file to import has been improved.
• LuxCal versions 2.7 - 3.2 (older than 10 years) are not supported anymore and have been removed from the upgrade procedure. If someone is still using a version < 4.1 and needs help, LuxSoft should be contacted.
• On the Settings page, section Reminders - SMS, the validation of the calendar phone number has been added.
• In the saveSettings function, to avoid leading and trailing spaces, the values are trimmed before saving them to the DB settings table.
• In the right upper corner, on the navigation bar, the Log In link overlapped the Full Screen symbol and the User Menu was not aligned with the User name
• The Thumbnails page was not responsive and did not show correctly on a narrow screen device
• The current date and time have been removed from the header in email notifications because it was redundant. The email client already shows the date and time of email messages.
• To cope with emoji and other special characters, for the MySQL version the database collation is set to utf8mb4.

Bug fixes
• To check the current settings against the $defSet entries in the toolboxx.php file, the 'short-ternary' operator was used instead of the 'null coalescing' operator, which could result in showing wrong check box values on the Settings page, whilst the actual $set value was correct.
• In the Upcoming view events could not be clicked anymore to open or edit event details (due to nested single quotes). Solved.
• Thumbnail images in the onmouseover pop attribute could cause strange effects. In some PHP versions < 8.1 single quotes were not converted to HTML entities because ENT_QUOTES was missing in the htmlspecialchars PHP function.
• When updating the user profile data, the "User profile updated" message was shown in the error message color, instead of the confirmation message color (green).
• When a user self registered or asked for a new password, the confirmation message was shown in the error message color, instead of the confirmation message color (green).

38

(3 replies, posted in Need Help)

Hi Chris,
Remove red shadow from links:
The line specifying "a:hover {text-shadow:0.2em 0.3em 0.2em #F88;}" cannot be line 21. I checked again and it actually is line 72 of the file css/css.php.

Curved edges:
I checked at "calendarforum", which is the website of my Danish friend who always helps testing new calendar versions, and saw no listing at all. Maybe you mean the round edges of the so called displays which you can see on the Demo -> Displays page of this site?

Thumbnails:
In the mean time I've added a notification "Copied to Clipboard" to the next LuxCal version, which will be released next month (March).

New Question:
If you want to get rid of the "Previous year" and "Next year" arrows, you should edit the file "views/month.php" and comment out (// at the start of the line) lines 84 and 85, starting with $arrowLL and $arrowRR respectively.
In the new Calendar version on narrow displays the "Previous Year" and "Next Year" arrows will will have  more distance to the inner arrows.

Roel

39

(4 replies, posted in Problems)

I think in your admin account you ave specified English, so when you log in as admin, it will be English.
or . . . .
On the Settings page, section User Accounts you have selected "Restore last user selections". If so, it will remember the last language you have selected.

Is this thread about calendar version 5.2.4?

Roel

Yes please send me the luxcal.log content and if possible a link to the calendar

What is that invalid request issue? When does it appear? and waht is the exact message?
Roel

41

(3 replies, posted in Need Help)

Hi Chris,
1. It's on line 73 of the file css/css.php. (a:hover {text-shadow:0.2em 0.3em 0.2em #F88;})
2. Which event listing? On what page? Huh, do we have a German event listing somewhere !?
3. Yeah, would be good. In the next LuxCal version there will be a "Copied to clipboard" prompt.
NOTE: I will think about this. We need the prefixes to avoid duplicate thumbnail image names.
Roel

42

(4 replies, posted in Problems)

The Default language on the Settings page is taken if a user has no language set in the user profile. For instance Public (not logged in) Users.
Roel

Hi there,

Could you go to the Settings page and click the Save Settings button t the top.
And then see if the problem is solved.

Roel

44

(1 replies, posted in Problems)

Hi Martin,
Does this concern a new installation?
What LuxCal version are you using?
Did it work  correctly before, of did the 403 error appear from the very beginning?
It looks like a folder permission error.
Roel

45

(1 replies, posted in Problems)

Hi Julia,
My best guess is that the PHP version running on your server is still 5.x.
The error on line 672 of the toolbox concerns a new operator (null coalescing operator), which was introduced in PHP version 7
Please check on you server (cPanel) if you can switch to PHP 7 or, even better, 8.

If this does not solve your problem, please let me know. and we will take it from there.
Roel

This is a bug. The solution can be found in this forum under "Known Issues and Fixes" item "A "reset to default" bug on the admin's Settings page".
Roel

A bug on the admin's settings page causes a reset of all check boxes and single-character input fields to their default values each time the Settings page is opened.
The actual settings however, are not reset, unless the settings are saved again after the "reset to default".
This problem can be solved by editing the file "/pages/settings.php" and changing line 57
from . . . .

$pSet[$key] = $set[$key] ?: $value[0];

to . . . .

$pSet[$key] = $set[$key] ?? $value[0];

In other words: by replacing ?: by ??.

This fix will be included in the next LuxCal version

Roel

Normally events (just the event time slot) are shown in the color of their category, so a colored "stripe" for each event.
The Day color check box on the Edit Category page, will color the whole day in the color of the event. This is meant to mark special days, like, for example, public holidays, birthdays, etc.
Roel

49

(3 replies, posted in Problems)

Hi Fred,
No the [at] in your email address is not the reason.
You wrote you changed to SMTP; did the emails work before you changed to SMTP?
Could you send me your current SMTP settings (e.g. a screenshot of the Reminders section of the Settings page).

If you have access to cPanel on your server, you could have a look in the Email section => track Delivery and see what happened to the test mail.

Roel

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.