KeexyBox's forum
Connection time selection - Printable Version

+- KeexyBox's forum (https://forum.keexybox.org)
+-- Forum: System settings (https://forum.keexybox.org/Forum-System-settings)
+--- Forum: Captive portal (https://forum.keexybox.org/Forum-Captive-portal)
+--- Thread: Connection time selection (/Thread-Connection-time-selection)



Connection time selection - Vangerdahast - 10-22-2021

Hello KeexyBox-Team and users,

do you know if there is a possibility to change the selectable time durations within the time selection drop down?

I did not find any possibility within the admin section, but I don't want to change blindly and wildly any code.

So please can anyone tell me where to define the available time durations in the list and their actual milliseconds for the counter (until the user is closed out) as well?

Thanks a lot,
Vangerdahast


RE: Connection time selection - paul - 10-29-2021

Hello,

It is not possible to to it from web admin interface. 
You can change the list by editing this file : 

Code:
/opt/keexybox/keexyapp/src/Controller/Component/ConnectionDurationComponent.php

You can put comment // before durations you do not want or add some in the $durations array :

PHP Code:
class ConnectionDurationComponent extends Component
{
public function 
GetDurationList()
{
$durations = [
'15' => __('15 minutes'),
'30' => __('30 minutes'),
'60' => __('1 hour'),
'120' => __('2 hours'),
'240' => __('4 hours'),
'480' => __('8 hours'),
'720' => __('12 hours'),
'1440' => __('1 day'),
'10080' => __('1 week'),
'20160' => __('2 weeks'),
'44640' => __('1 month'),
];
return 
$durations;

}





RE: Connection time selection - Vangerdahast - 02-15-2022

Thanks Paul,

I will try as soon as possible and report back here :-)


RE: Connection time selection - Vangerdahast - 02-22-2022

Yes, this was the needed solution, thanks a lot Paul!
[attachment=14]