I really dont like this solution, but it should work for you as a dirty patch.
in /libs/ubbthreads.inc.php
FIND:
return "$http://{$_SERVER['HTTP_HOST']}{$url}";REPLACE WITH:
return "//{$_SERVER['HTTP_HOST']}{$url}";Protocol-relative links (PRL), also known as protocol-relative URLs (PRURL), are URLs that have no protocol specified. For example, //example.com will use the protocol of the current page, either HTTP or HTTPS