RSS

LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Support / todo list and "today colour"
Posted:  14 Dec 2015 15:45
1) I have a nice popup screen called "ToDo". I can't find how to edit this list. Anyone a hint?

2) is it possible to edit the background colour of today's field?

Richard.
Posted:  14 Dec 2015 20:03
Richard,

What do you mean by popup screen? Is it the stand-alone sidebar? Or is it the ToDo list which can be opened via the ToDo button on the navigation bar?
In the css directory you will find several theme files, which can be edited to tailor the user interface of the various calendar instances.
Roel
Posted:  15 Dec 2015 00:18
I mean the ToDo button on the navigation bar. When I open it it says "none". Where does it get its data from?

And yep, I already tweaked the colour of today's background. Thnx! :-)

I have worked with Webcalendar for many years and I wanted to switch from mysql to sqlite, but that was almost impossible due to the fact that Webcalendar uses sqlite2 and modern distro's use sqlite3. While searching for a solution I stumbled upon LuxCal and I have to admit that it really works like a charm.

One little problem I encountered during the install of 4.21 was that the install script said that it wasn't able to create the db directory. "permission denied" or something like that. The problem was that the dir already existed with the the right permissions, but the script was not able to see that this was no problem. In shell language: "mkdir db" instead of "mkdir -p db"

Anyway, the 4.21 version has only lived serveral hours, I just upgraded to 4,30 without any problems.

Great work!

R.
Posted:  15 Dec 2015 01:00
Two small issues:

1) "This file should be executed via a cronjob once a day at 2am user time" (lcalcron.php)
Jobs between 2 and 3 am will not be executed or executed twice at daylight saving changes!

2) The cronjob, should it be run as user "www-data"? If the job runs as root and files are created then permission errors might occur.

R.
Posted:  15 Dec 2015 12:04
[wishlist]

It would be nice if an extra button, called "home" e.g., would be present in the left upper corner, next to the "options" button. If the button is pressed, LuxCal gets back into the state as if it were started. In my case, LuxCal starts in "month" view, and this is the sequence I need to walk through every time LuxCal is in a different view:

button: <--
button: today
button: options
check: full month
button: done

Just my 2 cts :)

R.
Posted:  15 Dec 2015 20:32
Hello rlucassen

In fact, LuxCal has exactly the function You are asking for. ( if I understand You right )
In "standalone" view You can in settings, set up a "home button" In this setup You can use the cP parameter.

If You are using the calendar in an iframe, this button is not available, as it would make no sense. Instead You click the "link" that opened the iframe. In the installation guide is told how You can use parameters.

To embed the full LuxCal calendar in an existing web page, an inline frame (iframe) can be used. This can for example be done with the following HTML code:
<iframe id="luxcal" src="http://www.mysite.xx/luxcal/?cP=2"></iframe>
With parameter cP the default view can be set (e.g. year: cP=1, month: cP=2, . . . ,upcoming: cP=7)

I hope this was useful for You

Regards
Schwartz
Posted:  15 Dec 2015 21:17

Quote:


In "standalone" view You can in settings, set up a "home button" In this setup You can use the cP parameter.


Ok, for the "cP=" parameter, but under "Administration/Settings" I don't see an option to add a new button. The only thing I see is the option te make native buttons visible or not.

Richard
Posted:  16 Dec 2015 00:08
You have to tell the system where "home" is ( back )
You make a link to "parent page". ( call the calendar with the cP parameter )
This makes the button visible.
Again - the button will not be visible in an iframe.

When You now click the "back/home( button ) You see the calendar in the "startup" view - with only one click

Hope You get it to work.
Posted:  16 Dec 2015 11:56

Quote:


You have to tell the system where "home" is ( back )


I'm really sorry, but I have no idea what you're trying to explain. Where do I tell the system where "home" is? Could you be more specific? I'm a LuxCal newbie :-) I'm running LuxCal on my internal webserver, no iframes or whatever. I just go to https://ssl1.xaq.nl/agenda/ and that's it. It's not visible from the internet btw.

Richard.
Posted:  16 Dec 2015 12:42
Okay - Sorry Richard. Except from Roel, we have all been newbies.

It is in settings. Where You have :
Calendar version
Calendar title
Calendar URL
AND here it comes : link to parent page.

It is in the "parent page" You set up the link to Your calendar. Remember the parameter.

Hope this was more helpful.

John
Posted:  16 Dec 2015 17:07   Last Edited By: Roel B.
Hello Richard and John,

There are a couple of different topics to address here, I believe . . .
The Todo list
When adding/editing an event category, for events that need an action you can select "Check mark", specify a label and a mark. Events in such a category will have a check box displayed in front of their title in the calendar views. This check box (in front of the title) can be selected, to mark the event as "completed" (or whatever label you specified).
Those events, with there check box NOT yet checked (so, not complete) will appear in the Todo list.

Cronjobs and daylight saving
You said that cronjobs between 2 and 3am will not be executed or executed twice at daylight saving changes. Never thought about this, but I guess you are right. Although daylight saving changes only take place twice a year, we will change this and suggest to run the cronjob at for instance 3.15am. Thanks for reporting this.

www-data vs root
The cronjob, should it be run as user "www-data" rather than "root"? Could you explain why, and how can this be achieved. As far as I know I can't select this when defining cronjobs with my ISP. And why did nobody ever complain about this?

Home (back to defaults) button
I agree it's a bit cumbersome to have to go through so many steps to go back to the default view.
The following two steps . . .
- button: <--
- button: today
can be done in one step . . .
- click on the today's date in the calendar's top bar.
In the next calendar version I will introduce a setting where the admin can enable/disable individual "view" buttons on the navigation bar, next to the options button. So if someone uses mostly Month view and Week view, the admin can enable a Month view and a Week view button. So in this case the number of steps to go back "home" would be reduced to two: Click on today's date in the top bar and select the desired view button in the navigation bar. Feed back please.

Roel
Posted:  16 Dec 2015 17:32   Last Edited By: rlucassen
Yep! Great! It works like a charm :-) I use "?cP=0" as parameter, but when I get from "setting" back to "calendar" the parameter is "?lc&cP=0". What does the lc stand for?

BTW: is there an parameter to set the page back to today's page?

As far as the todo list is concerned, there is still an empty pop-up. Still no clue how to edit the todo list :-(

Richard.
Posted:  16 Dec 2015 17:45   Last Edited By: rlucassen

Quote:


www-data vs root
The cronjob, should it be run as user "www-data" rather than "root"? Could you explain why, and how can this be achieved. As far as I know I can't select this when defining cronjobs with my ISP. And why did nobody ever complain about this?


Just because I run my own server :-) And if possible I try to avoid running jobs as root. If you manage the server yourself, you can edit cron in two ways:

1) as normal user you can edit your own cron:

crontab -e

2) as root user you can edit another users cron:

crontab -e -u <user>

BTW: the todo list works, it is not very intuitive to find out, but now I know how it works :-)

R.
Posted:  16 Dec 2015 18:00
I don't know when exactly this occurred, but I saw this in the logs:


2015-12-16 16:54:21: (mod_fastcgi.c.2695) FastCGI-stderr: PHP Notice:  Undefined index: cP in /mnt/data/home/richard/share/wwws/auth/webcalendar/common/toolbox.php on line 294
2015-12-16 16:54:21: (mod_fastcgi.c.2695) FastCGI-stderr: PHP Notice:  Undefined index: cG in /mnt/data/home/richard/share/wwws/auth/webcalendar/common/toolbox.php on line 294
2015-12-16 16:54:21: (mod_fastcgi.c.2695) FastCGI-stderr: PHP Notice:  Undefined index: cU in /mnt/data/home/richard/share/wwws/auth/webcalendar/common/toolbox.php on line 294
2015-12-16 16:54:21: (mod_fastcgi.c.2695) FastCGI-stderr: PHP Notice:  Undefined index: cC in /mnt/data/home/richard/share/wwws/auth/webcalendar/common/toolbox.php on line 294
2015-12-16 16:54:21: (mod_fastcgi.c.2695) FastCGI-stderr: PHP Notice:  Undefined index: cL in /mnt/data/home/richard/share/wwws/auth/webcalendar/common/toolbox.php on line 294


It's this line:


$ sed -n -e 294p /mnt/data/home/richard/share/wwws/auth/webcalendar/common/toolbox.php
        $lastSet = array('cP' => $_SESSION['cP'],'cG' => $_SESSION['cG'],'cU' => $_SESSION['cU'],'cC' => $_SESSION['cC'],'cL' => $_SESSION['cL']);


OTOH: Everything seems to work well.

R.
Posted:  16 Dec 2015 18:30   Last Edited By: Roel B.
Hi Richard,

The Todo List is explained in the admin_guide.html, section 3a  wink

The errors in your last post were caused by the fact that the calendar tried to save the last used user selections (view, group, users, categories and language) but the values disappeared from the PHP $_SESSION array. Don't know why.

Thanks for explaining the www-date vs root user.

There is currently no parameter to set the page back to the default page. If I introduce an admin setting to enable/disable view buttons on the navigation bar, as described in my post above, would you still need such a parameter?

The ?lc parameter added to the URL is for internal use only (it means the call is an internal call). There is no need to add this parameter in your "home" button.

Roel
Posted:  16 Dec 2015 19:13

Quote:


There is currently no parameter to set the page back to the default page. If I introduce an admin setting to enable/disable view buttons on the navigation bar, as described in my post above, would you still need such a parameter?


The "back" button works as expected. What I was wondering if there was a parameter to set the date, something like:

https://ssl1.xaq.nl/auth/webcalendar/?cP=0&date=today

I think you really made a very nice program BTW :-) It works like a charm and the database is huge: 38912 bytes :-)

I will try add a cron script that dumps the database in a dailly round robin sequence per month or week. I hope this is possible with sqlite.

oh, just another question: when I apply "save changes" in the admin interface, it takes quite a long time, about 20 seconds or so. It is not a DNS issue AFAICS. Why is that?

R.
Posted:  16 Dec 2015 19:52   Last Edited By: rlucassen
[sqlite3 only]

Just a small script to be run from cron each day, instead of backing up the database manually. Prepare the backup dir:

mkdir -p /var/backups/webcalendar
chown <user>.<user> /var/backups/webcalendar


And copy this code into a file, e.g. "backup-webcalendar.sh":

#!/bin/dash

BACKUP_DIR=/var/backups/webcalendar
DB_DIR=/wherever/yo/have/your/webcalendar/db
TODAY=$(date +%a)

dump_db () {
sqlite3 $1 <<EOF
.dump
.quit
EOF
}

cd ${DB_DIR}/

for DATABASE in $(ls -1 *.cdb) ; do
  NAME=$(basename ${DATABASE} .cdb)
  dump_db ${DATABASE} > ${BACKUP_DIR}/${NAME}-${TODAY}.sql
done


And make it executable:

chmod 700 /path/to/your/script/backup-webcalendar.sh

crontab -e

59 1 * * * /path/to/your/script/backup-webcalendar.sh

In this case the backup created today will be overwritten next week. Note: this script does NOT accept database names other than [a-zA-Z0-9_-]+.cdb names, IOW: no spaces and other characters that the shell interprets as code!

Just my 2 cts,

R.
Posted:  16 Dec 2015 20:52   Last Edited By: Roel B.
Richard,

Yes, there is a parameter to set the date, it is "cD=yyyy-mm-dd". However, if you specify no date, the calendar will go to the current date.
So
https://ssl1.xaq.nl/auth/webcalendar/?cP=0&cD
will go to the default page (specified on the admin's Settings page) and the date of today.
Roel
Posted:  17 Dec 2015 01:46

Quote:


Yes, there is a parameter to set the date, it is "cD=yyyy-mm-dd". However, if you specify no date, the calendar will go to the current date.


Superb! That did the job :-) Excellent!

Richard.
Posted:  17 Dec 2015 11:52
BTW: your server is in Holland, but the clock says it's 1 hour later. Should it not be set to UTC?

R.
Posted:  18 Dec 2015 00:03
Richard,

This LuxCal calendar is my hobby and my satisfaction comes form "happy users". That's why I try to give instant support whenever possible. So I'm not generous, it's all for my own satisfaction wink

That's right, my server is in Amsterdam. Here in Europe we have the CET (Central European Time), which is UTC/GMT + 1 hour.

Where are you from; what's your time zone?
Roel
Posted:  18 Dec 2015 01:20   Last Edited By: rlucassen

Quote:


That's right, my server is in Amsterdam. Here in Europe we have the CET (Central European Time), which is UTC/GMT + 1 hour.


But I see UTC +2 (CEST) It's 00:20 local time here, but it shows 01:20. In UTC it's 23:20.

Quote:


Where are you from; what's your time zone?


I'm from Utrecht, Holland. And I think in the end we speak the same mother tongue ;-)

R.
Posted:  20 Dec 2015 20:56
Huh, the same mother tongue? I was born in Nijkerk, the Veluwe . . . so I'm not so sure about the same mother tongue wink
Roel
Posted:  06 Jan 2016 09:55
Zullen we het maar op Engels houden dan? smile
Posted:  07 Jan 2016 23:13   Last Edited By: Roel B.
Ja, dat is beter voor de andere lezers hier, bovendien denk ik dat Brussel ons binnenkort zal verplichten in heel Europa Engels als moedertaal in te voeren - en terecht natuurlijk wink


For the few that didn't yet master the Dutch language:

I just said to Richard that I expect the European Commission to shortly force all European countries to introduce English as mother tongue.
I suppose Asia will follow soon thereafter.

This would be good for the calendar; then we can scrap the majority of the user interface language files.