Placement of Chat Box
2 posters
Page 1 of 1
Placement of Chat Box
Hello! I recently changed to a different chat box on my forum and was wondering if there is any way I can get it placed above the "Who Is Online?" portion of the forum main page.
Here's a picture of it:
Here is the code I have for it as of now:
Your help is greatly appreciated!
Here's a picture of it:
Here is the code I have for it as of now:
- Code:
$(function() {
if (!_userdata.session_logged_in) return;
var content = '<div id=\"smartchatbox_img827631573\" style=\"width: 900px; height: 350px; overflow: hidden; margin: auto; padding: 0; border: 1px solid #000000; background: url(\'http://www.somagames.com/redwall/pitch/wp-content/uploads/Redwall_Door_Wide.png\') 50% 50%; \"><div id=\"smartchatbox827631573\" style=\"width: 900px; height: 350px; overflow: hidden; margin: auto; padding: 0; border:0; \"><iframe src=\"https://www.smartchatbox.com/shoutbox/sb.php?key=827631573\" scrolling=\"no\" frameborder=\"0\" width=\"900px\" height=\"350px\" style=\"border:0; margin:0; padding: 0;\"></iframe></div></div>;',
d = document.createElement('DIV');
d.innerHTML = content;
document.getElementById('page-body').appendChild(d);
});
Your help is greatly appreciated!
Re: Placement of Chat Box
Hi @Merenwe,
Replace your javascript by the following code :
Replace your javascript by the following code :
- Code:
$(function() {
var who = document.getElementById('i_whosonline');
if (!_userdata.session_logged_in || !who) return;
var content = '<div id=\"smartchatbox_img827631573\" style=\"width: 900px; height: 350px; overflow: hidden; margin: auto; padding: 0; border: 1px solid #000000; background: url(\'http://www.somagames.com/redwall/pitch/wp-content/uploads/Redwall_Door_Wide.png\') 50% 50%; \"><div id=\"smartchatbox827631573\" style=\"width: 900px; height: 350px; overflow: hidden; margin: auto; padding: 0; border:0; \"><iframe src=\"https://www.smartchatbox.com/shoutbox/sb.php?key=827631573\" scrolling=\"no\" frameborder=\"0\" width=\"900px\" height=\"350px\" style=\"border:0; margin:0; padding: 0;\"></iframe></div></div>;',
node = who.parentNode.parentNode.parentNode.parentNode,
d = document.createElement('DIV');
d.innerHTML = content;
node.parentNode.insertBefore(d,node);
});
Similar topics
» How to remove the @ in the Chat box/ How to make the default chat box on every page of forum?
» Hide chat/Ban all users chat (except Admin/Mods/Group)
» Placement of BB Codes
» Cell Placement on the Index
» Insert Image Placement
» Hide chat/Ban all users chat (except Admin/Mods/Group)
» Placement of BB Codes
» Cell Placement on the Index
» Insert Image Placement
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum