Sync Recurring Appingments from Google, Reminders by Text and Email, Notification with ICS file, and others

1,723 views
Skip to first unread message

Craig Tucker

unread,
Aug 3, 2015, 7:09:40 PM8/3/15
to Easy!Appointments - Support Group
Changes I have made to EA 1.0
I am not a programmer.  I am a psychotherapist who hates the calendar utilities that currently exist for the biz.  So I have jumped into Alex's great base and with the help of others on the forum, Stack Overflow, and some quick php courses on Lynda.com I have come up with this.  So, if there are problems, it is because I am flying by the seat of my pants.  But this works great nonetheless.  I hope this helps others.  I am on to 1.1.

All calendars are changed to Sunday-Saturday format.

 

The date and time is set to Month/Day/Year and AM/PM on the front end but not on the back end.  I ran in to too many conflicts on the back end, so I have kept it the way it is.

 

The default appointment time period is 60min with 30min padding allowing scheduling on the hour or half only. Modifications:

  • 60 min interval application/controllers/appointments.php, line 435

  • Changing the padding:  Lines 416-426 (to go back to 15 min padding, change 416 from 30  to 15 min, change 419 from 30 to 15 min and remove // from 420, 421, 423, and 424

 

The date picker blocks out days that are filled making it easier for clients to find open days.  The default period for booking is 60 days. To modify the default booking period:

  • Default 60 day view:  assets/js/frontend_book.js, line 18,

  • AND application/controllers/appointments.php, line 346

 

There is a field for selecting a cell carrier .  This allows for sending text message reminders of upcoming appointments.  If a sell carrier is not selected, only a email reminder is sent.  In order to use you need to manually add the following:

  • Another column in the user table for id_cellcarrier.

ALTER TABLE `ea_users` ADD `id_cellcarrier`

ALTER TABLE `ea_users` CHANGE `id_cellcarrier` `id_cellcarrier` BIGINT(20) UNSIGNED NOT NULL;


  • Another table for cell carriers in EA
CREATE TABLE ea_cellcarrier(
 id INT NOT NULL AUTO_INCREMENT
','
 PRIMARY KEY
(id)','
  cellco VARCHAR
(30)','
  cellurl VARCHAR
(30))
 
 INSERT INTO
`Easy`.`ea_cellcarrier` (`id`,`cellco`, `cellurl`) VALUES (`AT&T`','@txt.att.net`),
 ('T-Mobile','@
tmomail.net'),('3','Verizon','@vtext.com'),('4','Sprint','@messaging.sprintpcs.com'),
 ('5','Sprint PM','@
pm.sprint.com'),('6','Virgin Mobile','@vmobl.com'), ('7','Tracfone','@mmst5.tracfone.com'),
 ('8','Metro PCS','@
mymetropcs.com'),('9','Boost Mobile','@myboostmobile.com'),
 ('10','Cricket','@
sms.mycricket.com'), ('11','Nextel','@messaging.nextel.com'),
 ('12','Alltel','@
message.alltel.com'),('13','Ptel','@ptel.com'),('14','Suncom','@tms.suncom.com'),
 ('15','Qwest','@
qwestmp.com'), ('16','U.S. Cellular','@email.uscc.net')
  • Be aware that the implementation on the backend is not complete.  I will discuss this at the end in things left undone.
A reminder utility is added.  The default reminder period is 3 days out.  This requires the following to be done by hand:
  • addition of another field in the appointments table.

ALTER TABLE `ea_appointments` ADD ` is_reminded

ALTER TABLE `ea_appointments` CHANGE `is_reminded` `is_reminded` TINYINT(1) NOT NULL DEFAULT '0'; `


  • Adding a cron job

    • To automate the reminders to go out at 1:00 AM every day add the following line to your crontab file (mine is in root directory /etc/crontab

0  13  *  *  *  php  [path to EA]/index.php cli/reminders

  • If you wish to run reminders php by command line use:    php [path to EA]/index.php cli/reminders

The sync with Google Calendar is modified to accurately reflect creation of recurring appointments in Google Calendar.  So, if a client creates an appointment the provider can modify that appointment in Google Calendar to be recurring and EA will reflect that.  Modifications that you may want to play with:  The default sync time period is set to 60 days out.  Things you need to know about this:

  • In order for EA fields to sync with Google Calendar I have added them to the notes section delimitted as numbers by barrels “| |”  One number represents the customer and the other represents the service.  This should not ever be deleted.  You can use the notes field as always  but leave the delimited numbers at the end of the notes.

  • Unavailable days no longer have a default “unavailable” title.  This is to allow for the name of the client and service when recurring appointments sync back. 

  • To adjust the sync period go to libraries/google_sync.php line 301 and change 60 to what ever you want.  The longer the period the longer the sync.

Appointments are sent out with an ICS file attached.  In outlook this will automattically add an appointment to the calendar of the customer.  Also it will be deleted from the calendar when deleted in EA as well.  In Google it is not fully functioning because EA uses PHPmailer which will only allow one or the other formats.  I selected to favor outlook because EA allows a customer to select to add to their calendar when they book.  Unfortunately Google calendar users cannot get the automatic deleations.  So, in the future I will try to migrate EA over to another mailer system that will better accommodate all calendar systems. 


Things left undone:

I have not messed with the calendar formatting much on the back side much because it changing it around ended up messing up other functions on the backend.  For me this is a minor issue because I mostly will be using Goggle Calendar as my back end.  If someone else wants to get that going , wonderful.

The cell carriers combo box on the back end is just hard coded into the HTML in the customers view sheet rather than linking to the database as it should be.  This is a temporary fix.  I got frustrated trying to get the combo box to link up.  Again, for me this is a minor thing.  The front end works as it should.  This should not be an issue unless someone wants to add another cell carrier.  In which case, to be able to see it in the back end they will either need to complete the job and link it to the database or add a line of HTML to that views/backend/customers.php file around line 100.  The value should match that in the table.  It is hacky but it works.  Again, if someone who is a real coder wants to jump in and make this right that would be great.

I am not going to update this and it will be my template for 1.1.  What I hope to add there is a utility for a waiting list and the ability to book groups. I would love to work with others on these things.  I will also be changing the color scheme.  I have other models with other colors.  It is not as easy as just changing some CSS files unfortunately.
 
Where I jumped off from:
easy.zip

Craig Tucker

unread,
Aug 7, 2015, 2:15:34 PM8/7/15
to Easy!Appointments - Support Group
I did not notice the errors in the SQL notes I posted for modifying the database.  Here are more accurate descriptions:

to add an is_reminded column to the ea_appointments table for recurring reminders to work:
ALTER TABLE `ea_appointments` ADD `is_reminded` TINYINT(1) NOT NULL DEFAULT '0';


To add a `id_cellcarrier` column to `ea_users` table for text messaging to work:
ALTER TABLE `ea_users` ADD `id_cellcarrier` BIGINT(20) NOT NULL AFTER `id_roles`;


Add an ea_cellcarrier table to the database:
CREATE TABLE `YourEasyAppointmentsDB`.`ea_cellcarrier` ( `id` INT(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), `cellco` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,`cellurl` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL)

to fill the ea_cellcarrier table with data:
INSERT INTO `YourEasyAppointmentsDB`.`ea_cellcarrier` (`id`, `cellco`, `cellurl`) VALUES ('1', 'AT&T', '@txt.att.net'),
 ('2', 'T-Mobile', '@tmomail.net'), ('3', 'Verizon', '@vtext.com'), ('4', 'Sprint', '@messaging.sprintpcs.com'),
 ('5', 'Sprint PM', '@pm.sprint.com'), ('6', 'Virgin Mobile', '@vmobl.com'), ('7', 'Tracfone', '@mmst5.tracfone.com'),
 ('8', 'Metro PCS', '@mymetropcs.com'), ('9', 'Boost Mobile', '@myboostmobile.com'),

 ('10', 'Cricket', '@sms.mycricket.com'), ('11', 'Nextel', '@messaging.nextel.com'),
 ('12', 'Alltel', '@message.alltel.com'), ('13', 'Ptel', '@ptel.com'), ('14', 'Suncom', '@tms.suncom.com'),

Craig Tucker

unread,
Aug 8, 2015, 10:47:20 AM8/8/15
to Easy!Appointments - Support Group
I made two versions with the same functionality using the 1.1 pre-release files (responsive front end), one with the stock green and another with a blue theme on the front end.

and updated google_sync.php with:
     'maxResults' => 3000, //Set max results to 3000 or whatever you want to avoid Google limitation (by default, Google lets you sync only 250 events)

All modifications to the database described above need to be done for this to work. All "things left undone" are still left undone.  To view my modifications in comparison to the original what I have been using is Notepad++ with the compare plug in installed.  This way I can look at the original files and see where my edits have been.  I have made edits in the following files in both the 1.0 and 1.1 versions:
  • /application/controllers/
    • appointments.php
    • backend_api.php
    • google.php
    • I have also added a folder cli (command line interface) in which I have put my custom file for text/email reminders
  • /application/libraries/
    • google_sync.php
    • notifications.php
  • /application/libraries/external
    • class.phpmailer.php  I have used the most recent version of phpmailer.  This makes the ics file modification possible.
  • /application/models/
    • I have added reminders_model.php
  • /application/views/appointments/book.php
  • /application/views/backend/customers.php (this one is very hacky for the cell carriers field and needs to be updated to access the database to fill the combobox but works fine for now)
  • /application/views/emails/
    • appointment_details.php
    • I added iCal.php
  • /assets/js/
    • backend_calendar.js
    • backend_customers.js
    • frontend_book.js
I will describe how to change the colors in the code modifications section.

I think blue will be my production version.
easyBlue.zip
easyGreen.zip

charles dandridge

unread,
Aug 16, 2015, 8:05:08 PM8/16/15
to Easy!Appointments - Support Group
Craig,

Thank you for posting this.  I've been racking my brain to find where to make this change but cannot seem to follow the logic.  Where do you can the date format on the confirm appointment screen to view as month-day-year?  Attached is a screenshot.
Thanks
confirm.png

Craig Tucker

unread,
Aug 17, 2015, 5:11:33 PM8/17/15
to Easy!Appointments - Support Group
Thanks, I did not notice that.  It is at assessets/js/frontend_book.js
Line 494

Change
            selectedDate = Date.parse(selectedDate).toString('dd/MM/yyyy');


to
            selectedDate = Date.parse(selectedDate).toString('MM/dd/yyyy');

that should do it. 

Craig Tucker

unread,
Aug 19, 2015, 12:18:30 PM8/19/15
to Easy!Appointments - Support Group
I have updated the files with changes Charles pointed out regarding the summary on the front end and I noticed that the pre-release of 1.1 had a slight error on the html for the working plan so that was updated too.
easyBlue.zip
easyGreen.zip

Craig Tucker

unread,
Sep 24, 2015, 11:58:21 PM9/24/15
to Easy!Appointments - Support Group
I think this is ready to go live for me, it now has the essential features I was wanting.
 
Modifications I have Made:

All calendars are changed to Sunday-Saturday format.

 

The date and time is set to Month/Day/Year and AM/PM on the front end but not on the back end.  I ran in to too many conflicts on the back end, so I have kept it the way it is.

 

The default appointment time period is 60min with 30min padding allowing scheduling on the hour or half only. Modifications:

  • 60 min interval application/controllers/appointments.php, line 475

  • Changing the padding:  Lines 458-468 (to go back to 15 min padding, change 458 from 30  to 15 min, change 461 from 30 to 15 min and remove // from 462, 463, 465, and 466

 The date picker blocks out days that are filled making it easier for clients to find open days.  The default period for booking is 60 days. To modify the default booking period:

  • Default 60 day view:  assets/js/frontend_book.js, line 29,
  • AND application/controllers/appointments.php, line 388

 There is a field for selecting a cell carrier .  This allows for sending text message reminders of upcoming appointments.  If a sell carrier is not selected, only a email reminder is sent.  In order to use you need to manually make the database modifications found here:

https://groups.google.com/d/msg/easy-appointments/yuDcBbWvxa0/WCGz1SOwFQAJ

 

A reminder utility is added.  The default reminder period is 3 days out.  This is a simple plaintext email that works well in at text message too.  For this to work it requires the following to be done by hand:

 

  • Adding a cron job:

To automate the reminders to go out at 1:00 AM every day add the following line to your crontab file (mine is in root directory /etc/crontab

0  01  *  *  *  php  [path to EA]/index.php cli/reminders

 

If you wish to run reminders php by command line use:    php [path to EA]/index.php cli/reminders

The sync with Google Calendar is modified to accurately reflect creation of recurring appointments in Google Calendar.  So, if a client creates an appointment the provider can modify that appointment in Google Calendar to be recurring and EA will reflect that.  Modifications that you may want to play with:  The default sync time period is set to 60 days out.  Things you need to know about this:

  • In order for EA fields to sync with Google Calendar I have added them to the notes section delimitted as numbers by barrels “| |”  One number represents the customer and the other represents the service.  This should not ever be deleted.  You can use the notes field as always  but leave the delimited numbers at the end of the notes.
  • Unavailable days no longer have a default “unavailable” title.  This is to allow for the name of the client and service when recurring appointments sync back. 
  • To adjust the sync period go to libraries/google_sync.php line 301 and change 60 to what ever you want.  The longer the period the longer the sync.

Appointments are sent out with an ICS file attached.  In outlook this will automatically add an appointment to the calendar of the customer.  Also it will be deleted from the calendar when deleted in EA as well.  In Google it is not fully functioning because EA uses PHPmailer which will only allow one or the other formats.  I selected to favor outlook because EA allows a customer to select to add to their calendar when they book.  Unfortunately Google calendar users cannot get the automatic delegations.  So, in the future I will try to migrate EA over to another mailer system that will better accommodate all calendar systems and ics files. 

A waiting list utility is added. The client can select to be put on a waiting list for 30 days. There is a cancelation link.  I have set it up to look 60 days out.  That may be too much for some. You can change it to whatever you like on line 236 of /application/controllers/cli/waitinglist.php.  I think I will add buttons later that will select how far out a customer wants to look (7 days, 14 days, 30, and 60).  For now 60 works for my needs.  If there are openings in the calendar, clients will get a plain text notice by email or email and text, with a list of available days and times.  To use the waiting list you must set up a cron job to send out the daily notice.  Much of this is a hack of Alex’s code to fit this purpose.  Thank you Alex.

  • Adding a cron job:

To automate the reminders to go out at 11:00 PM every day add the following line to your crontab file (mine is in root directory /etc/crontab

0  23  *  *  *  php  [path to EA]/index.php cli/waitinglist
 
If you wish to run reminders php by command line use:    php [path to EA]/index.php cli/waitinglist

Colors are changed to reflect my website.  To modify colors I used this method:

https://groups.google.com/d/msg/easy-appointments/rIHeNgmt-FQ/mXbXP55rCAAJ

I changed the time picker on the back end: I used the method described here

 

What is left undone:

  • I need to work out a system for ics files that is compatible with google, iphone, and outlook so that deletions on my end are reflected on the patient end.
  • I think adding buttons to select days to look out for the waiting list would be useful.
  • The model for the reminder utility is not consistent with how the rest of the program is written.  It works but it could be better.
  • My solution for the back end cell carrier combo box is a bit of a mash up.  I had trouble with the JavaScript methods Alex uses.  I do not really understand them.  I used a method that was more clear to me.  It works but is not consistent with the rest of the program.

 

Files with my modifications.  To see what I have done compare the following in a program like Notepad++:

  • /application/controllers/

    • appointments.php

    • backend_api.php

    • google.php

    • I have also added a folder cli (command line interface) in which I have put my custom file for text/email reminders and waitinglist

  • /application/core/

    • My_Model.php (added)

  • /application/libraries/

    • google_sync.php

    • notifications.php

  • /application/libraries/external

    • class.phpmailer.php  I have used the most recent version of phpmailer.  This makes the ics file modification possible.

  • /application/models/

    • I have added reminders_model.php

    • Appointments_model.php

    • cellcarrier_model.php (added)

  • /application/views/appointments/book.php

    • book.php

    • waiting_success.php (added)

  • /application/views/backend/customers.php

easyBlue.zip

Craig Tucker

unread,
Sep 25, 2015, 5:54:46 PM9/25/15
to Easy!Appointments - Support Group
I forgot to add that changes need to be made in the database to run this file.  The following will work:

to add an is_reminded column to the ea_appointments table for recurring reminders to work:
ALTER TABLE `ea_appointments` ADD `is_reminded` TINYINT(1)  NULL DEFAULT NULL;


To add a `id_cellcarrier` column to `ea_users` table for text messaging to work:
ALTER TABLE `ea_users` ADD `id_cellcarrier` BIGINT(20) NOT NULL AFTER `id_roles`;


Add an ea_cellcarrier table to the database:
CREATE TABLE `YourEasyAppointmentsDB`.`ea_cellcarrier` ( `id` INT(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), `cellco` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,`cellurl` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL)

to fill the ea_cellcarrier table with data:
INSERT INTO `YourEasyAppointmentsDB`.`ea_cellcarrier` (`id`, `cellco`, `cellurl`) VALUES ('1', 'AT&T', '@txt.att.net'),
 ('2', 'T-Mobile', '@tmomail.net'), ('3', 'Verizon', '@vtext.com'), ('4', 'Sprint', '@messaging.sprintpcs.com'),
 ('5', 'Sprint PM', '@pm.sprint.com'), ('6', 'Virgin Mobile', '@vmobl.com'), ('7', 'Tracfone', '@mmst5.tracfone.com'),
 ('8', 'Metro PCS', '@mymetropcs.com'), ('9', 'Boost Mobile', '@myboostmobile.com'),

 ('10', 'Cricket', '@sms.mycricket.com'), ('11', 'Nextel', '@messaging.nextel.com'),
 ('12', 'Alltel', '@message.alltel.com'), ('13', 'Ptel', '@ptel.com'), ('14', 'Suncom', '@tms.suncom.com'),

Craig Tucker

unread,
Sep 30, 2015, 11:05:15 AM9/30/15
to Easy!Appointments - Support Group
Again, for this to work the database needs the modifications here:

I loaded the database with all my client data and experimented with the build live.  The waiting list and reminders are sent out fine with the cron job. Recurring appointments are reflected accurately and show up for the clients.

I found several issues and made some modifications that are updated in this build.  I was having some problems with the black out days portion of the code and I fixed that.  I was having some problems with the delete portion of the waiting list conflicting with deleted appointments.  That was fixed.  There were several others. Unfortunately I did not keep good records of the changes.  But, this build works better. 

Problems:  I have set it up for a 60 day sync with google.  This ends up making for very long sync times.  I think I would like to make the complete sync only happen when the sync button is pushed on the back end and by a cron job at least once a day.  A complete sync is only needed if a change is made in google independent of EA and for accurate reflection for any new day (allowing the new google recurring items to fill in the calendar).  Aside from that there is no need for a full 60 day sync.  What could also be done is to make a google script that will sync the calendar in the event of any change.  I think that would be best. 

Regarding sync and recurring appointments in google, unless there is a complete sync once a day, the next day will not be accurately reflected in EA.  This is because recurring appointments in Google need to be loaded for the next day.  In reality this could be just a sync for the next day but to be safe a complete sync would be wise. 

So this is not ready to go live until there is a cron job script that will sync the calendar. 

Time formatting is unchanged for back end still.  I have replaced the slider for time select with a select drop down as described here: https://groups.google.com/d/msg/easy-appointments/v9p6Bmnic_o/uXz1FxqlAAAJ
But I am not able to get the in-line formatting to work.  Perhaps it only works with AM/PM format.  And, the box is squished up. So more work is needed there. 
easyBlue.zip

Craig Tucker

unread,
Oct 3, 2015, 4:59:00 PM10/3/15
to Easy!Appointments - Support Group
I have been live with this version and it is working fine. 

Again, for this to work the database needs the modifications here:

Features: 
  • Blue color scheme
  • Three levels of synchronization, full sync, sync appointment, and daily or more cron job full sync.
  • In the date picker only days that have available appointments are highlighted in the calendar.
  • A waiting list function exists (it is set for 60 days out).
  • Three day (or what ever you set) reminders of the appointment.
  • buttons to return to book more appointments with client data filled
  • Appointments made recurring in google calendar are synchronized back and show up in the appropriate customer register and are linked to 3 day reminder notices.
  • Text messaging notices option.
  • The slider on back end is replaced with drop down select tool for date picker.
  • Date and time is in American formatting on the front end.  Calendar on the back end is Sunday through Saturday.  Time is AM/PM format.
Reminders, Daily Google Sync, and Waiting list all require a cron job to be set up in your crontab file.  Mine looks something like this: 

0   22  *   *   *   php   /<path to easy appointmtnes>/index.php cli/waitinglist
30  7  *   *   *   php   /<path to easy appointmtnes>/index.php cli/reminders
30  23  *   *   *   php  /<path to easy appointmtnes>/index.php google/sync3

So far, so good.

I have a nearly full calendar for the next 60 days with 57 different clients booked.  I have a combination of recurring Google calendar events for clients and single events that are scheduled in EA.  Full sync is taking me about 1.5 minutes.  I am using a little sinology NAS as my server and if you are on a better system it may go faster for you.

Method for recurring appointments:  First sessions or appointments are scheduled through EA's front end and synced with Google Calendar.  If I want that client on a recurring schedule, I simply set it up in Google calendar as I would any other appointment.  There is a pipe delimited sequence of two numbers in the notes portion of the google calendar event.  As long as those two pipe delimited notes are at the end of the note section, it will sync with EA accurately and show up in the Customer account after Sync.  You must sync by hand in the back end after you make a change in google calendar.

Things left to do:
  • Change the rest of the time formatting on the back end.
  • Change the appointment view on the back end to be like the front end date picker etc.
  • Use a token with the cron sync to increase security
  • Make a google script that will automatically sync to EA if there is a change in Google Calendar.

All this would be nice but this works for now and looks good.  It does exactly what I need for my business.


Thanks to:
Auto Sync all new events with Google Calendar from Glen Davis

Return to booking option from Andrew Whitaker

https://groups.google.com/d/msg/easy-appointments/PsZl_Hbp0jc/MkQsjk9PBQAJ

Getting rid of the sliders n the back end Amine Hamdi

https://groups.google.com/d/msg/easy-appointments/v9p6Bmnic_o/uXz1FxqlAAAJ

And of course to Alex Tselegidis for the great open source base to work off of, various tips and especially for pointing out the way in to the Sync function;

https://groups.google.com/d/msg/easy-appointments/OGL-1K6JDHY/0S2bXeD1BAAJ

And thanks to multiple contributors who helped straighten out the time change issue in this thread:

https://groups.google.com/d/msg/easy-appointments/fWdjQLYgNA4/H-hVG-VHdO4J


Additional help provided by StackOverflow and Lynda.com's Codigniter Tutorials (worth it).

easyBlue.zip

Craig Tucker

unread,
Oct 10, 2015, 1:30:21 AM10/10/15
to Easy!Appointments - Support Group
Some improvements:
I added a line of code to block access to sync3 function in google.php from outside of the server.  That should keep it secure from outside attacks.

I also got rid of the is_reminded column that I had added in the ea_appointments table.  I do not think it is anything I really need.  I was not using it anyway. All code associated with it was also removed.

Other things were cleaned up.  All other features remain as is.

So far so good. 

So, to run this, the following modifications are needed to the database:


To add a `id_cellcarrier` column to `ea_users` table for text messaging to work:
ALTER TABLE `ea_users` ADD `id_cellcarrier` BIGINT(20) NOT NULL AFTER `id_roles`;


Add an ea_cellcarrier table to the database:
CREATE TABLE `YourEasyAppointmentsDB`.`ea_cellcarrier` ( `id` INT(11) NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), `cellco` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,`cellurl` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL)

to fill the ea_cellcarrier table with data:
INSERT INTO `YourEasyAppointmentsDB`.`ea_cellcarrier` (`id`, `cellco`, `cellurl`) VALUES ('1', 'AT&T', '@txt.att.net'),
 ('2', 'T-Mobile', '@tmomail.net'), ('3', 'Verizon', '@vtext.com'), ('4', 'Sprint', '@messaging.sprintpcs.com'),
 ('5', 'Sprint PM', '@pm.sprint.com'), ('6', 'Virgin Mobile', '@vmobl.com'), ('7', 'Tracfone', '@mmst5.tracfone.com'),
 ('8', 'Metro PCS', '@mymetropcs.com'), ('9', 'Boost Mobile', '@myboostmobile.com'),

 ('10', 'Cricket', '@sms.mycricket.com'), ('11', 'Nextel', '@messaging.nextel.com'),
 ('12', 'Alltel', '@message.alltel.com'), ('13', 'Ptel', '@ptel.com'), ('14', 'Suncom', '@tms.suncom.com'),

 ('15', 'Qwest', '@qwestmp.com'), ('16', 'U.S. Cellular', '@email.uscc.net')


Reminders, Daily Google Sync, and Waiting list all require a cron job to be set up in your crontab file.  Mine looks something like this: 

0   22  *   *   *   php   /<path to easy appointmtnes>/index.php cli/waitinglist
30  7  *   *   *   php   /<path to easy appointmtnes>/index.php cli/reminders
30  23  *   *   *   php  /<path to easy appointmtnes>/index.php google/sync3

One thing worth noting, if you are not used to crontab, sometimes php needs to be the full path to the php binary (e.g. /usr/bin/php).  Sometimes spaces need to be tabs to work.  Sometimes you need to use "root /usr/bin/php".  So if you are using this and you are not getting the cronjob firing mess with these items.

easyBlue.zip

Sven Heirman

unread,
Oct 26, 2015, 3:24:45 PM10/26/15
to Easy!Appointments - Support Group
Where do I change the days back to Mon-Sun and the hour back to 24h display? :)

Craig Tucker

unread,
Oct 27, 2015, 5:50:40 AM10/27/15
to Easy!Appointments - Support Group
Search for:

Help with DATE/TIME Calendar Formatting

You should find a few threads on the topic. It just involves editing the js for each page. The code was made for Mon-Sun and 24 hour time. just change anything that looks otherwise.

Craig Tucker

unread,
Oct 30, 2015, 12:25:41 PM10/30/15
to Easy!Appointments - Support Group
This is an update containing a useful snippet of code from Mathias Krenek explained here:
https://groups.google.com/d/msg/easy-appointments/-1Bxb9FVTEQ/MEWLRncUDgAJ

Some observations on this build since I have been using it for a little over a month:
1.  If you disconnect the sync from google calendar and reconnect you will have duplicate appointments loaded into the calendar, most with "unavailable" subject lines but not all.  The most effective thing to do in this case is to go into phpMyAdmin and drop all the duplicates formed on the date of the reconnection.  I found this out the hard way.  I accidentally disconnected the google sync and reconnected.  Clients complained of getting two reminders, one saying unavailable.  Watch out.  I a code could be added to correct for this.  That is down the line.  This fix is easy enough for me.
2.  I am running this on a Synology NAS.  It is a little slow when used as a server.  But it is cheep and it works.  The load time for the calendar is about 3 to 4 seconds on the front end.  I do not know if others notice this lag or if it is just my NAS.  That can be frustrating for users.  I think I need a little load wheal to let people know to wait for the full calendar to load. That should be simple to add but I have not time for that right now. 
3.  I have had some complaints from some people (not all) running windows 10 that the calendar will not advance for them on the front end.  I have looked to see if others are complaining about this with jquery and I have not seen any complaints there.  So, there may be a bug in the code that I have modified for the datepicker somewhere that is not playing nice with windows 10.  What ever it is, is likely in the blackout portion of the code.  I do not have time to pick through this.  And I have only had one complaint about this so it may be that one person's computer.  Let me know of others notice this.  I will bump it up on my things to do list.
4. When creating recurring events in google calendar, if the first appointment in the cycle was created in EA, that hash will be changed when the recurring cycle starts.  So, if a person uses the email to edit that appointment it will appear to be gone and they will not be able to edit it.  So, to work around that, In google calendar, I make a duplicate appointment for the next available time slot and then create the recurring appointment sequence.  They will only get a google notice of the addition.  The reminders will work fine with this.
5. In the EA backend, Full Calendar View, only appointments created in EA are visible, the appointments created by Google calendar (recurring appointments) are not.  This is not a problem in day or week view.  I think this would be easy to change. It would be nice if the client appointments created in Google Calendar were a different color than the Unavailable spots.
6.  I blacked out some days for vacation time.  However, recurring appointments were also posted on that week.  I neglected to delete them.  As a result appointment reminders were sent out for them one day (I caught it at that point).  So, be sure to delete appointments on your vacation time or you will have a bunch of disappointed and frustrated clients.  It would be nice to add a code that would block reminders where ever there is a concurrent vacation block.

So far, clients are really liking the waiting list function.  I normally run fully booked but with about a 10-20% cancelation rate.  The waiting list has dropped down the empty spots from cancelation to zero over the past 3 weeks.  Overall, clients are preferring EA over my other system, Lattiss, for scheduling.  Lattiss had nicer ICS file support that played nice with almost every calendar system.  I want to be able to duplicate that.  But, so far, I have no complaints from my Outlook users who depend on the automatic adding of calendar events.  The main problem is with Mac users.  They handle the ICS files differently.  But.  I have had no complaints from the 80 people I have dealt with over the past month using EA regarding this ICS file issue. 

Craig

easyBlue.zip

Craig Tucker

unread,
Nov 4, 2015, 1:45:47 AM11/4/15
to Easy!Appointments - Support Group
I just noticed a problem with the reminder script. I have one too many / marks and this blocks the edit page.  The fix:

/application/controllers/cli/reminders.php

Line 33 should be:

  $appointment_link = $this->config->base_url().'appointments/index/';

Noris Lee

unread,
Nov 5, 2015, 5:43:46 PM11/5/15
to Easy!Appointments - Support Group
Thanks for all the code. I really appreciate it. I am looking at the code and wandering if there is a workaround for Book Advance Timeout. Is it possible to block out the next day (i.e., users will not be able to schedule an appointment on the following day)?

Thanks,
Noris

Craig Tucker

unread,
Nov 6, 2015, 6:36:19 AM11/6/15
to Easy!Appointments - Support Group
Yes, I want something like this too. I want a way to block being able to schedual a second appointment within an callendar week. So, that is my next project. When that is done it should not be too difficult to modefy to 24 hours. But wont be on that for a few weeks.

Ross Cohen

unread,
Nov 7, 2015, 9:33:04 AM11/7/15
to Easy!Appointments - Support Group
Can we tag users?

Craig Tucker

unread,
Nov 8, 2015, 4:33:12 AM11/8/15
to Easy!Appointments - Support Group
I'm not sure what you mean.

Sam Filo

unread,
Nov 10, 2015, 5:55:55 AM11/10/15
to Easy!Appointments - Support Group
Dear Craig,
i downloaded youe easyBlue and installed it but I have a blank page.
Sam

Craig Tucker

unread,
Nov 10, 2015, 10:30:01 AM11/10/15
to Easy!Appointments - Support Group
You have filled out the config.php file I presume? And you made the necessary database modifications?

Craig Tucker

unread,
Nov 10, 2015, 11:20:44 AM11/10/15
to Easy!Appointments - Support Group
Update to the file:  In this
  • I have corrected the path problem in the reminder email. 
  • I have also added some code to the waiting list email that specifically states that there are no available appointments when I am fully booked.
  • I have added a load spinner under the calendar on the front end.  On my system, when I have 60 days fully booked it takes about 7 seconds for the calendar data to fully load at first.  If a client stays at step 1 for a while they will never notice but if they quickly move to step 2 then the navigation buttons on the calendar will seem unresponsive.  So, the spinner helps.  You may have a faster system and this may not be an issue for you. The spinner is at \application\views\appointments\book.php lines 292-295, and 509-511 .  Feel free to remark out or delete.
Of those clients who were complaining that they were not able to use EA on windows 10, I found that they were trying to go to my calendar directly rather than through my site.  They were not using https to connect. That was the issue there. I now have a redirect for https.  No problems now.
The database and crontab modifications listed here are still needed for this to run:

The following issues still apply:
1.  If you disconnect the sync from google calendar and reconnect you will have duplicate appointments loaded into the calendar, most with "unavailable" subject lines but not all.  The most effective thing to do in this case is to go into phpMyAdmin and drop all the duplicates formed on the date of the reconnection.  I found this out the hard way.  I accidentally disconnected the google sync and reconnected.  Clients complained of getting two reminders, one saying unavailable.  Watch out.  I a code could be added to correct for this.  That is down the line.  This fix is easy enough for me.
2. When creating recurring events in google calendar, if the first appointment in the cycle was created in EA, that hash will be changed when the recurring cycle starts.  So, if a person uses the email to edit that appointment it will appear to be gone and they will not be able to edit it.  So, to work around that, In google calendar, I make a duplicate appointment for the next available time slot and then create the recurring appointment sequence.  They will only get a google notice of the addition.  The reminders will work fine with this.
3. In the EA backend, Full Calendar View, only appointments created in EA are visible, the appointments created by Google calendar (recurring appointments) are not.  This is not a problem in day or week view.  I think this would be easy to change. It would be nice if the client appointments created in Google Calendar were a different color than the Unavailable spots.
4.  I blacked out some days for vacation time.  However, recurring appointments were also posted on that week.  I neglected to delete them.  As a result appointment reminders were sent out for them one day (I caught it at that point).  So, be sure to delete appointments on your vacation time or you will have a bunch of disappointed and frustrated clients.  It would be nice to add a code that would block reminders where ever there is a concurrent vacation block.

This is designed for a psychotherapy practice that runs on the hour for appointments.  If you want to make changes regarding the default structure back to every 15 min: All that is done in /volume1/web/craigtuckerlcsw/easy/application/controllers/appointments.php lines 480-500.

For example Alex's default 15 min interval code is:

                if ($minutes % 15 != 0) {
                    // Change the start hour of the current space in order to be
                    // on of the following: 00, 15, 30, 45.
                    if ($minutes < 15) {
                        $start_hour->setTime($start_hour->format('H'), 15);
                    } else if ($minutes < 30) {
                        $start_hour->setTime($start_hour->format('H'), 30);
                    } else if ($minutes < 45) {
                        $start_hour->setTime($start_hour->format('H'), 45);
                    } else {
                        $start_hour->setTime($start_hour->format('H') + 1, 00);
                    }
                }
                $current_hour = $start_hour;
                $diff = $current_hour->diff($end_hour);
                while (($diff->h * 60 + $diff->i) >= intval($_POST['service_duration'])) {
                    $available_hours[] = $current_hour->format('H:i');
                    $current_hour->add(new DateInterval("PT15M"));
                    $diff = $current_hour->diff($end_hour);

easyBlue.zip

The Psychotherapy

unread,
Nov 10, 2015, 2:08:54 PM11/10/15
to Easy!Appointments - Support Group
yes I did and I create a new database
but you can give more detailed instructions.
Alos we are colleague
Sam

Craig Tucker

unread,
Nov 10, 2015, 6:03:06 PM11/10/15
to Easy!Appointments - Support Group
So, did you already install the 1.0 or 1.1 build by Alex?  If first install that and you follow his instructions for that found here:

You should then be able to take your config file for 1.1 and then use it to run this.   The configuration file in 1.0 is different but you plug the same information in to the 1.1 file.  So, I would start by installing the standard system and then replace that with easyBlue. 

For practice management check out OpenEMR, if you are not already using it.  I love that thing.  Someone else has already made a Wordpress plug in for it to fill out all intake paperwork.  Very cool.  I made a modification of that plug in as well to work with Contact Form 7.  It is fantastic.  I hope to get the plugin working for Easy!Appointments and then have appointments imported into OpenEMR through the patient portal plugin.  That will be sweet.   

I am very happy with easyBlue and running my practice.  It is not as smooth as I would like on the back end in reference to setting up recurring appointments but if you get used to the process it is no big deal.  The waiting list has made the biggest difference.  Good luck.

The Psychotherapy

unread,
Nov 11, 2015, 12:56:03 AM11/11/15
to Easy!Appointments - Support Group
I have been using the program for a couple of years 1.0
I downloaded the Alex version 1.1 and used composer to estract the dependencies, changed the config.
Downloaded Easy blue.
I have to do msomething else?
What about bower, I read a comment of Alex on that.?

Craig Tucker

unread,
Nov 11, 2015, 2:05:08 AM11/11/15
to Easy!Appointments - Support Group
That all should be sufficient.  The config file should work with easyblue.

The Psychotherapy

unread,
Nov 11, 2015, 2:17:38 AM11/11/15
to Easy!Appointments - Support Group
Hi I am using also simpleinvoices very interesting 
If you can explain to me all the steps:
download the master version, unzip it
install composer 
exstract the dependency
change config
import easy blue
change the database 

Craig Tucker

unread,
Nov 11, 2015, 8:49:37 PM11/11/15
to Easy!Appointments - Support Group
That should do it.  If you have easy appointments running with the original easy appointments system, and you add the table for cell carriers this should just layer on.  You should be able to delete your old install and put easyblue in its place with the old config file.  What happens when you do this?

Craig Tucker

unread,
Nov 11, 2015, 8:52:58 PM11/11/15
to Easy!Appointments - Support Group
One thought may be ownership.  If you are getting a blank page, it may be that the ownership structure of easy blue is not consistent with your original install. 

The Psychotherapy

unread,
Nov 12, 2015, 7:37:52 AM11/12/15
to Easy!Appointments - Support Group
 php composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
  - Installing gregwar/captcha (v1.1.1)
    Loading from cache

  - Installing phpmailer/phpmailer (v5.2.13)
    Loading from cache

  - Installing tracy/tracy (v2.3.5)
    Loading from cache

  - Installing symfony/yaml (v2.7.5)
    Loading from cache

  - Installing symfony/options-resolver (v2.6.11)
    Loading from cache

  - Installing symfony/console (v2.7.5)
    Loading from cache

  - Installing nette/safe-stream (v2.3.1)
    Loading from cache

  - Installing nette/utils (v2.3.6)
    Loading from cache

  - Installing nette/finder (v2.3.1)
    Loading from cache

  - Installing nette/caching (v2.4.2)
    Loading from cache

  - Installing nette/robot-loader (v2.3.1)
    Loading from cache

  - Installing nette/neon (v2.3.3)
    Loading from cache

  - Installing nette/mail (v2.3.3)
    Loading from cache

  - Installing nette/php-generator (v2.3.4)
    Loading from cache

  - Installing nette/di (v2.3.6)
    Loading from cache

  - Installing nette/bootstrap (v2.3.3)
    Loading from cache

  - Installing nette/security (v2.3.1)
    Loading from cache

  - Installing nette/reflection (v2.3.1)
    Loading from cache

  - Installing nette/http (v2.3.3)
    Loading from cache

  - Installing nette/component-model (v2.2.4)
    Loading from cache

  - Installing nette/application (v2.3.7)
    Loading from cache

  - Installing michelf/php-markdown (1.5.0)
    Loading from cache

  - Installing latte/latte (v2.3.6)
    Loading from cache

  - Installing kukulich/fshl (2.1.0)
    Loading from cache

  - Installing kdyby/events (v2.4.0)
    Loading from cache

  - Installing herrera-io/version (1.1.1)
    Loading from cache

  - Installing seld/jsonlint (1.3.1)
    Loading from cache

  - Installing justinrainbow/json-schema (1.5.0)
    Loading from cache

  - Installing herrera-io/json (1.0.3)
    Loading from cache

  - Installing herrera-io/phar-update (2.0.0)
    Loading from cache

  - Installing apigen/theme-default (v1.0.2)
    Loading from cache

  - Installing apigen/theme-bootstrap (v1.1.3)
    Loading from cache

  - Installing andrewsville/php-token-reflection (1.4.0)
    Loading from cache

  - Installing apigen/apigen (v4.1.1)
    Loading from cache

phpmailer/phpmailer suggests installing league/oauth2-client (Needed for Gmail's XOAUTH2 authentication system)
symfony/console suggests installing psr/log (For using the console logger)
symfony/console suggests installing symfony/event-dispatcher ()
symfony/console suggests installing symfony/process ()
nette/utils suggests installing ext-intl (for script transliteration in Strings::webalize() and toAscii())
nette/utils suggests installing ext-mbstring (to use Strings::lower() etc...)
nette/mail suggests installing ext-fileinfo (to detect type of attached files)
nette/http suggests installing ext-fileinfo (to detect type of uploaded files)
nette/application suggests installing nette/forms (Allows to use Nette\Application\UI\Form)
latte/latte suggests installing ext-fileinfo (to use filter |datastream)
latte/latte suggests installing ext-mbstring (to use filters like lower, upper, capitalize, ...)
Generating autoload files
psi...@psicote.org [~/www/sam/easyappointments-develop]#

Craig Tucker

unread,
Dec 1, 2015, 3:57:41 AM12/1/15
to Easy!Appointments - Support Group
I noticed a problem with the disabled days in the date picker.  When selecting nav buttons or disabled days in the date picker, the old times remain on the screen.  That can be confusing.  To fix this I added this bit of code to the frontend.js file:

  $('#select-date').on('click', function(){
   $
('#available-hours').text(EALang['no_available_hours']);
 
});

I added this right around line 62 above this line of code:
        $('#select-date').datepicker({

This refreshes now just fine.

Thomas Gregory

unread,
Dec 22, 2015, 4:42:09 PM12/22/15
to Easy!Appointments - Support Group
i had the 1.0 working on my server and then put the 1.1 easyblue files in and none of my email notifications work anymore....where do i plug in my smtp email settings?
i had the email notifications working before i put the easyblue files in

Craig Tucker

unread,
Dec 22, 2015, 7:27:32 PM12/22/15
to Easy!Appointments - Support Group
Hello Thomas,

You should not have to plug in the stmp settings in EA.  That should all be set on your server.  There are many iterations of EasyBlue in this string and some are better than others. Try this build

It is the most recent one and has been working live with my clients now for three months with no problems.  You should be able to just layer it on your current installation and all should be as it was.  Let me know what you notice. 


Thomas Gregory

unread,
Dec 22, 2015, 8:27:49 PM12/22/15
to Easy!Appointments - Support Group
What do you mean layer it on....and do I have to put any SMTP settings in the new config.php file?

Thomas Gregory

unread,
Dec 22, 2015, 10:13:38 PM12/22/15
to Easy!Appointments - Support Group
I GOT it to work now...my variables were not setup correctly

Thomas Gregory

unread,
Dec 22, 2015, 10:25:52 PM12/22/15
to Easy!Appointments - Support Group
ok so it won't send texts alerts if i select carrier, and when an appointment gets cancelled, there is an error produced about sending emails


Screenshot (2).png

Craig Tucker

unread,
Dec 23, 2015, 4:55:29 PM12/23/15
to Easy!Appointments - Support Group
I am not sure what is going on there.  Are you using my newest build?  As I have said there are problems with this one, this string is not regarding the latest work it would be best to use
And then we should discuss it in that string.

I have rather detailed instructions there. 
Reply all
Reply to author
Forward
0 new messages