Chatbox
3 posters
Page 1 of 1
Chatbox
Dear members of fm,
I would like to ask you why the conversations are not in the chat box field after 15-20 min. of my last conversation? I would like to explain that the chat box is empty after a while and i need to go to the archives to review last messages. Is there any way the conversations to stay on the chat box without automatically been send to the archives?
Thank you in advance
Many regards and respect!!
I would like to ask you why the conversations are not in the chat box field after 15-20 min. of my last conversation? I would like to explain that the chat box is empty after a while and i need to go to the archives to review last messages. Is there any way the conversations to stay on the chat box without automatically been send to the archives?
Thank you in advance
Many regards and respect!!
smejker- Forumember
- Posts : 167
Reputation : 4
Language : serbo-croatian/english/macedonian/bulgarian
Re: Chatbox
Hello,
No I do not believe it is possible to do this. The system is simply set up that way from FM's Server side. Sorry
-Brandon
No I do not believe it is possible to do this. The system is simply set up that way from FM's Server side. Sorry
-Brandon
Remember to mark your topic when a solution is found.
General Rules | Tips & Tricks | FAQ | Forgot Founder Password?
Team Leader
Review Section Rules | Request A Review | Sticker Points
smejker- Forumember
- Posts : 167
Reputation : 4
Language : serbo-croatian/english/macedonian/bulgarian
Re: Chatbox
Well I meant legally it is not possible... of course if there is a will there is a way... but legally... there is no way and it is not possible unless you have access to FM's server (which I would very very much assume you don't), or can write your own scripts.
-Brandon
-Brandon
Last edited by brandon_g on March 21st 2015, 1:30 am; edited 1 time in total
Re: Chatbox
OK... But it's very bad when you going on site, and U see emptu chatbox... If U understend me!
smejker- Forumember
- Posts : 167
Reputation : 4
Language : serbo-croatian/english/macedonian/bulgarian
Re: Chatbox
Oh I understand perfectly... I would love for there to be a way to do away with it (as well possibly the option to disable the chat timeout). Unforunately it is FM'S call in the end and there is very little if anything we can do besides make suggestions and put up with it.
-Brandon
-Brandon
Remember to mark your topic when a solution is found.
General Rules | Tips & Tricks | FAQ | Forgot Founder Password?
Team Leader
Review Section Rules | Request A Review | Sticker Points
Re: Chatbox
Yes, you're absolutely right!!!smejker wrote:Hmmm.... Nothing is imposssible...
The impossible is just a matter of opinion.
Try this code below, placement only "In the home page":
New code: https://help.forumotion.com/t139727-chatbox#949784
So long,
JS
Last edited by JScript on March 24th 2015, 2:23 pm; edited 1 time in total (Reason for editing : New code!)
Re: Chatbox
Thanks jscript... but not working,
I try with something else... In index_body I erasure {CHATBOX_TOP}... after that in overall_header I put:
and now Chatbox is visiable from every page and I see last messages, but (everytime but...)
In Chatbox I can't see message box and buttons (Bold, Underline, Italic, Strike, Fontcolor and Emoticons) See Picture:
If I put:
I can see buttons, but Chatbox after 15-20 min. is empty... Still have problem...
And my question is How to put the first code, and have message box and buttons?
Thanks in advance!
Regards & Respect
I try with something else... In index_body I erasure {CHATBOX_TOP}... after that in overall_header I put:
- Code:
<iframe src="/chatbox/index.forum?archives=1" id="frame_chatbox" width=100% height=350 scrolling=no frameborder=0></iframe>
and now Chatbox is visiable from every page and I see last messages, but (everytime but...)
In Chatbox I can't see message box and buttons (Bold, Underline, Italic, Strike, Fontcolor and Emoticons) See Picture:
If I put:
- Code:
<iframe src="/chatbox/index.forum?" id="frame_chatbox" width=100% height=350 scrolling=no frameborder=0></iframe>
I can see buttons, but Chatbox after 15-20 min. is empty... Still have problem...
And my question is How to put the first code, and have message box and buttons?
Thanks in advance!
Regards & Respect
smejker- Forumember
- Posts : 167
Reputation : 4
Language : serbo-croatian/english/macedonian/bulgarian
Re: Chatbox
@smejker
Ok, so keep this format:
And replace the previous code for this below with placement only "In the home page":
New code: https://help.forumotion.com/t139727-chatbox#949784
So long,
JS
Ok, so keep this format:
- Code:
<iframe src="/chatbox/index.forum?archives=1" id="frame_chatbox" scrolling="no" width="100%" height="100%" marginwidth="0" marginheight="0" frameborder="0"></iframe>
And replace the previous code for this below with placement only "In the home page":
New code: https://help.forumotion.com/t139727-chatbox#949784
So long,
JS
Last edited by JScript on March 24th 2015, 2:25 pm; edited 1 time in total
Re: Chatbox
Oooo It's work...
jscript
Recpect!
jscript
Recpect!
smejker- Forumember
- Posts : 167
Reputation : 4
Language : serbo-croatian/english/macedonian/bulgarian
Re: Chatbox
@smejker
Ok, try this new code because I made small changes that will leave it more faster and fixes a bug when disconnected:
So long,
JS
Ok, try this new code because I made small changes that will leave it more faster and fixes a bug when disconnected:
- Code:
// Redefine function!
function insertChatBox(chatbox_id, chatbox_url) {
return insertChatBoxNew(chatbox_id, chatbox_url);
}
// Redefine function!
function insertChatBoxNew(chatbox_id, chatbox_url) {
document.getElementById(chatbox_id).innerHTML = '<iframe src="/chatbox/index.forum?archives=1" id="frame_chatbox" scrolling="no" width="100%" height="100%" marginwidth="0" marginheight="0" frameborder="0"></iframe>';
}
$(function() {
if (_userdata.session_logged_in) {
$('#frame_chatbox').load(function () {
chat_archives();
});
}
});
function chat_archives() {
var oIframe = (document.getElementById("frame_chatbox").contentWindow.document || document.getElementById("frame_chatbox").contentDocument),
script = oIframe.createElement("script"),
chatbox_script = function () {
// "For" asynchronous loop, faster and does not lock the browser interface when you have many messages!
(function ($) {
$.assyncFor = function (arr, callback) {
for (var i = 0, len = arr.length; i < len; ++i) {
var boundCallback = callback.bind(null, i, arr[i]);
setTimeout(boundCallback, i);
}
return this;
};
}(jQuery));
var interval = 0;
$("#chatbox_option_co, #chatbox_option_disco").bind("click", function () {
$("#chatbox").empty();
});
Chatbox.prototype.refresh = function (data) {
if (data.error) {
$("body").html(data.error)
} else {
if (this.connected) {
$("#chatbox_display_archives").show();
$("#chatbox_option_co").hide();
$("#chatbox_option_disco, #chatbox_footer").show();
$("#chatbox_messenger_form").css('display', 'block');
$("#chatbox_messenger_form").css('visibility', 'visible');
$(".format-message").each(function () {
var name = $(this).attr('name');
var value = my_getcookie('CB_' + name);
$(this).prop('checked', parseInt(value) ? true : false)
});
this.format();
if (data.lastModified) {
this.listenParams.lastModified = data.lastModified
}
if (!interval) {
interval = setInterval(function () {
chatbox.init();
}, 5000);
}
} else {
clearInterval(interval);
interval = 0;
$("#chatbox_option_co").show();
$("#chatbox_option_disco, #chatbox_footer").hide();
$("#chatbox_display_archives").hide();
$("#chatbox_messenger_form").css('display', 'none');
$("#chatbox_messenger_form").css('visibility', 'hidden');
}
if (data.users) {
this.users = [];
$(".online-users, .away-users").empty();
$(".member-title").hide();
for (var i in data.users) {
var user = data.users[i];
this.users[user.id] = user;
var username = "<span style='color:" + user.color + "'>" + (user.admin ? "@ " : "") + "<span class='chatbox-username chatbox-user-username' data-user='" + user.id + "' >" + user.username + "</span>" + "</span>";
var list = user.online ? '.online-users' : '.away-users';
$(list).append('<li>' + username + '</li>')
}
if (!$(".online-users").is(':empty')) {
$(".member-title.online").show()
}
if (!$(".away-users").is(':empty')) {
$(".member-title.away").show()
}
}
if (data.messages) {
var scroll = !this.messages || this.messages.length != data.messages.length;
this.messages = data.messages;
if (this.messages) {
var oThis = this; // Here we save the current "this" for use inside "For" asynchronous loop!
$.assyncFor(oThis.messages, function (index, content) { // The "For" asynchronous loop...
// Here checks if there is already a message in the DOM, if already, not need to process the same message!
if ($(".shout-" + index).length) {
return oThis;
}
var message = content, // |ClassName index|
html = "<p class='chatbox_row_" + (index % 2 == 1 ? 2 : 1) + " clearfix shout-" + index + "'>" + "<span class='date-and-time' title='" + message.date + "'>[" + message.datetime + "]</span>";
if (message.userId == -10) {
html += "<span class='msg'>" + "<span style='color:" + message.msgColor + "'>" + "<strong> " + message.msg + "</strong>" + "</span>" + "</span>"
} else {
html += "<span class='user-msg'>";
if (oThis.avatar) {
html += " <span class='cb-avatar'><img src='" + message.user.avatar + "' /></span>"
}
html += " <span class='user' style='color:" + message.user.color + "'>" + "<strong> " + (message.user.admin ? "@ " : "") + "<span class='chatbox-username chatbox-message-username' data-user='" + message.userId + "' >" + message.username + "</span> : " + "</strong>" + "</span>" + "<span class='msg'>" + message.msg + "</span>" + "</span>"
}
html += "</p>";
/**
* Here the "append" will not make slow the code execution since it is not within a synchronous loop,
* but instead in an asynchronous loop that schedules the execution later!
*/
$("#chatbox").append(html);
if ((index + 1) == oThis.messages.length) {
if (scroll) {
$("#chatbox")[0].scrollTop = $("#chatbox").prop("scrollHeight") * 2
}
}
});
}
}
}
};
$("#chatbox").empty();
chatbox.init();
interval = setInterval(function () {
chatbox.init();
}, 5000);
};
script.type = "text/javascript";
script.innerHTML = "(" + chatbox_script.toString() + ")();";
oIframe.getElementsByTagName("head")[0].appendChild(script);
}
So long,
JS
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum