Replacement code for bb code:
HTML Code:
<iframe id="watercooler" src="https://www.yourwebsite/watercooler/index.php" height="820px" width="960px" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0"></iframe>
<script type="text/javascript">
var CurrentUser = document.getElementById('lnkUsernameMenu').textContent;
var mytoken = Math.random().toString(36) + Math.round(+new Date()/1000).toString(36) + "-" + Math.random().toString(36).substr(2);
var CurrentUserName = document.getElementsByClassName("b-comp-menu-dropdown__trigger-username js-menu__username-label")[0].innerHTML;
var iframeUrl = 'https://www.yourwebsite.net/watercooler/index.php?usr=' + CurrentUserName + '@' + mytoken;
document.getElementsByTagName("iframe")[0].src = iframeUrl;
document.cookie = 'wcusername='+CurrentUserName+'; path=/';
document.cookie = 'wctoken='+mytoken+'; path=/';
</script>
For integration into vbulletin, your server should give you direct access to the $_COOKIE variable contents via php.
https://www.php.net/manual/en/reserv...es.cookies.php
Also disable your ad blockers, to allow the chat texts to be refreshed.
Stand alone demo at:
https://www.fuflixbulletin.net/water...emo/index.html