Anyone have experience in plugin coding for Roundcube?
I am in the process of creating a light weight plugin for adding a stay-logged-in checkbox on the login page. It doesn't use/add any DB columns or create extra cookies. It only modifies the existing two cookies that roundcube already sets by extending their expiration from session-only to several days.
The part i could use help with, is the template for adding the html checkbox is in javascript. I am not seeing how to get a value from config.inc.php into javascript. As of now i have to set the same value in both the php and javascript files. Or if there is a way to inject the HTML from the PHP instead of needing to use JS i would prefer that.
PHP: function loginTemplate($args) { $this->add_texts('localization', true); $this->include_script('stay_loggedin.js'); return $args; }
JAVASCRIPT: $(document).ready(function () { if (window.rcmail && window.rcmail.env.skin == 'elastic') { rcmail.addEventListener('init', function () { ... ... let days = ???_config.inc.php_VALUE_???; ... ... }); } });