I was in need of per weekday open hours. So I made a little extension to the function isChatOpen() in lib/class/AJAXChat.php. First of all change the order of the code in "Check the opening hours" and " Check the opening weekdays" as when the day is not open there is no need to check the hours.
Then replace the code under " Check the opening hours"
Now you can enter an associative array in lib/config.php like this:
// Defines the hour of the day the chat is opened (0 - closingHour):
$config['openingHour'] = array(0=>8,1=>15,2=>15,3=>15,4=>15,5=>14,6=>8);
// Defines the hour of the day the chat is closed (openingHour - 24):
$config['closingHour'] = array(0=>20,1=>18,2=>18,3=>18,4=>18,5=>20,6=>20);
The index in the array represents the week of day starting at 0 for sunday. The value is the starting resp. end hour of chat service time.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was in need of per weekday open hours. So I made a little extension to the function isChatOpen() in lib/class/AJAXChat.php. First of all change the order of the code in "Check the opening hours" and " Check the opening weekdays" as when the day is not open there is no need to check the hours.
Then replace the code under " Check the opening hours"
with
Now you can enter an associative array in lib/config.php like this:
The index in the array represents the week of day starting at 0 for sunday. The value is the starting resp. end hour of chat service time.