..
Hi, How to put this in the CP?By default, this https://github.com/pfsense/pfsense/blob/master/src/etc/inc/captiveportal.inc#L294 IS present in the default 'login page'.
If you build your own login page, reuse the code ;)
You mean, I will copy and paste the whole code and upload it in the captive portal login page?
You don't need to upload the 'html page' that is already there.
Only if you decide to make your own login page (html, some PHP, some Javascripts, whatever) THEN you should make one, and upload it.
If it doesn't work, make it work (or go back to the default page).
Btw : You can never ever force a browser to show a popup page - most users have this disabled, and YOU can NOT control THEIR browser.
You could try to explain to your visitors that they should accept popups when using YOUR portal page - but guess what ? :
-> People don't read
-> If they read, then they don't know how to make an exception for your portal page …
-> So yes, they can't logout. (pfSEnse will end the session after a idle timeout or the HARD time out for sure).
A simple solution might be (if you need them to disconnect because your are selling the access for big bucks) :
Set the idle time very low (a couple of minutes).
Explain people that they should deactivate their wifi (just de wifi access - most devices have a slider or a button for that) a couple of minutes, then pfSense well ditch their session (connection). Most people can handle that.
If not, well, THEY will consume some more time ...... (so they loose some more money ..... and NOW you have their attention ! )