RSS

LuxCal Forum

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

User:   Password:   Remember Me?   
LuxCal Forum / General / Support / Best approach to simplify luxcal?
Posted:  17 Oct 2014 15:18
Hi,

LuxCal is a powerful and sophisticated tool that works as 'advertised'. Having said that, I would like to simplify it, and adapt it to a more narrow use case.

As succinctly as possible: this use case is to convert LuxCal into an event booking calendar that will be used by schools to connect with a pool of industry speakers for classroom presentations, in a very large province that has ~1500 schools.

Instead of "categories" table, I have set up "regions" and "schools" tables. User Groups are defined as Super admin, School admins, Teachers and Speakers.

School admins and Teachers have associated schoolID and regionID (by JOIN function), and Speakers have a regionID.

Only Super admin can register School admins and Speakers, only School admins can register Teachers (for their school).

There is no self-registration function, only login.

I have had some success with making the above modifications.

Now comes the tricky part: the Events.

My intention is to have events posted only by Teachers. School admins and Teachers may view events for their own school only. Speakers may only view events in their assigned region(s), and click a checkbox to indicate availability for an event (event confirmation to take place via emails between Teacher and Speaker). I want it to be a bit more granular than described, but this is the rough idea.

I have started on these modifications by trying to simplify the "events" table to eliminate as many extraneous luxcal functions as possible. For example, repeat, all day and multi-day events. So the assumption is that all events take place on the same day, with a start time and end time (no end date).

Here's a screen grab of the "Add event" popup to illustrate intended functionality:

http://205.207.168.174/add-event-popup.gif

At this point, the Add event function is working, in that the event is successfully added to the "events" table (checked by phpliteadmin).

However, I may have gone too far in my simplification efforts (I don't have a real deep understanding of php), because posted events are no longer being displayed in the Calendar (I believe the functions for this may be found in common/retrieve.php ?). I'm guessing that eliminating "eDate" column and associated code is the immediate culprit here.

What I'm looking for are some broad guidelines to assist in this endeavor. Perhaps there's a 'modular' aspect to luxcal coding that I've misunderstood or overlooked.

Perhaps a 'safer' strategy to avoid this kind of breakage is not to remove table columns and associated code which I don't want to use, but to just hide those functions from my end users?

Any insights and suggestions are greatly appreciated!

Thanks
Posted:  17 Oct 2014 22:05   Last Edited By: Roel B.
Hi there,

If you've already implemented changes to make the Add Event function work as described, your knowledge of PHP is quite alright!

If it's certain you won't need the repeat and multi-day functionality I would continue on the road you've taken and leave out the unused columns in the events table.

I can offer one of the following:
1. If you send me by email (see Contact Us page) the new structure of your events table, I can modify (simplify) the retrieve function for you. The only drawback is that I can't test this function because I don't have your changed code.
2. Same as 1, but you send me the URL of the calendar under test and give me FTP access to your server. I will then modify the retrieve function and test it with your changed code. Drawback: you will have to give me access to your server and I might be a lunatic wink
3. You send me a copy of your modified PHP scripts and I will simplify the retrieve function and test it on our LuxSoft server. A prerequisite is that your modified code should (basically) work, because I've no time to debug all of your changes.
Regards,
Roel
Posted:  18 Oct 2014 15:49
Hi Roel,

I'm having a number of issues with 4.0.1. When I went to install it there was an issue with sessions not being enabled. I fixed that in my php.ini and then did the installation.

After the installation I had a mistake for the admin email address and after I updated it I couldn't log in.

I deleted the database and the lcconfig.php file and reinstalled it. After installing it and logging out when I click on the arrow keys to change the month it takes me to the admin area and says I'm not authorized. I should mention it is happening with Firefox.

I'm assuming it is something with the way it is handling sessions.

Regards,
Dan
__________________
"Little Guy"
Some own motorcycles, others ride them.

Find great LuxCal examples by Schwartz at http://www.calendarforum.dk/index.html
Posted:  18 Oct 2014 21:44   Last Edited By: Roel B.
Hi Dan,

Is this version 4.0.1 you installed accessible from the web? If so, could you send me the URL, so that I can have a look and try to further analyze the problem?
Regards,
Roel
Posted:  19 Oct 2014 00:52
Hi Roel,

Yes it is 4.0.1 and accessible from the web. I've figured out the cause but the fix is a pain. As the admin if I make a change after logging out if I click the arrows to change the months it says I don't have access. As soon as I clear the history in Firefox it works fine.

I added you as an admin user and just sent you and email with your login. Feel free to make a change to the calendar, log out and then at the calendar use the arrow keys to change the date.

I've tested it with both Firefox and Internet Explorer, they both do the same thing. Initially I thought it was only Firefox but I hadn't made any admin changes with IE which is why it wasn't an issue at first.

You should also be able to test it on the demo to see if it does the same thing.

Regards,
Dan
__________________
"Little Guy"
Some own motorcycles, others ride them.

Find great LuxCal examples by Schwartz at http://www.calendarforum.dk/index.html
Posted:  30 Oct 2014 14:43
Hi Roel,

Apologies for taking so long in getting back to you as I was diverted to other projects. I appreciate your offer to look at my code! I've made a bit more progress, and managed to get events to show in the calendar (basically by restoring the code and table rows that I had over-zealously deleted), and I'm slowly moving down my TODO list of features to implement/modify. My php knowledge may be enough to get by for some of this, but writing db queries is definitely not my strong suit.

Simplifying the code and db would certainly make it easier to focus on the things I need to get working. I will contact you by email with staging url so you can have a look, later today.

Thanks