RSS

LuxCal Forum

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

User:   Password:   Remember Me?   
LuxCal Forum / General / Support / Where are $xx['vars'] set
Posted:  23 Jun 2011 02:17
Hi there,

Thank you for an absolutely brilliant and well written calendaring system. It is by far one of the best that I have found.

I have a question though... I am trying to integrate it into another system, but am unable to figure out where the contents of the $xx['vars'] come from, e.g. vars such as $xx['evt_description'], $xx['evt_category'], $xx['evt_notify'] etc. I can see that these are used in eventform2.php and its scope is defined in month.php, but can't see where the contents/values of each variable are coming from.

Any help would be most appreciated, as I would like to add another field into the eventform2.php to capture additional information.

Many thanks,
Denzil
Posted:  23 Jun 2011 11:50
Hi Denzil,
The $xx['vars'] are the user interface texts, which are defined in the user interface files. You can find these files in the lang/ directory, and the file names are ui-{lang}.php. One file for each language.
On the admin pages you will also find ax['vars']. These are the admin interface texts and can be found in the same lang/ directory, but the file names are ai-{lang}.php.
Hope this helps,
Roel
Posted:  23 Jun 2011 23:21
Hi Roel,

Thanks for your response. I found the details as mentioned in the files that you listed. I think though that I may have been on the wrong track.

I actually needed to know where the values of $des, $sti, $ven etc come from, when displayed inside the eventform2.php.

I have already added another field to the events table to store the status of the calendar item, e.g. provisional, cancelled, confirmed etc. Just not sure how I can read this in, when editing the appointment, i.e. where are the details of the specific appointment queried against the events table. I see the variables $des, $sti, $ven etc in the eventform1.php and eventform2.php scripts, but am unsure of how these become available, as month.php contains the $evt['vars'] and retrieve.php contains the $events['vars'].

Any input on this will be greatly appreciated.

Many thanks,
Denzil
Posted:  24 Jun 2011 10:50   Last Edited By: Roel B.
Hi Denzil,
The events table is queried in the common/retrieve.php script. On lines 127 -155 the retrieved items are stored in the "$event" array. On line156 this $event array is added to the 2-dimensional array $evtList (index is the current date).
The retrieve function is (for example) called in the month.php script where each event array is read from the $evtList and is called $evt. So thereafter for example $evt['des'] is the event description.

For the event windows (Event Details, Add Event, Edit Event) the event data is retrieved from the db on lines 133 - 168 or initialized (if Add) on lines 170 -186. The eventform1.php and eventform2.php are "required" at the end of event.php and thus are part of event.php and can access $des, $sti, $ven, etc.

The next LuxCal version, which we will release in July, will have a simplification of the db (event table and dates table merged). So you are just a bit too early ;)

Good luck!
Roel
Posted:  24 Jun 2011 11:50
Hi Roel,

Thanks again for your help- is much appreciated. Will work with the information you explained above and see how far I can go. Otherwise, may just wait for your new version, which I'm sure will be even more brilliant. ;)

Thanks again for a wonderful product and excellent support.

Regards,
Denzil