How can I add edit/delete functions for each message in chatbox?
+2
JScript
Van-Helsing
6 posters
Page 3 of 4
Page 3 of 4 • 1, 2, 3, 4
How can I add edit/delete functions for each message in chatbox?
First topic message reminder :
Hello,
How can I add edit/delete functions in chatbox messages per each message? I need to allow the members edit/delete their messages from chatbox and the staff will be able to edit/delete messages for each message of chatbox.
Example:
Hello,
How can I add edit/delete functions in chatbox messages per each message? I need to allow the members edit/delete their messages from chatbox and the staff will be able to edit/delete messages for each message of chatbox.
Example:
Last edited by Black-Shadow on May 8th 2015, 10:30 pm; edited 2 times in total
Re: How can I add edit/delete functions for each message in chatbox?
Hello @JScript,
How can I add just only the functions edit/delete(not change all of the chatbox code) in my current chatbox code? I have already added some other functions like auto-login, deleting messages user connected/disconnected etc). Furthermore some time it displays a test message how can i delete it?
How can I add just only the functions edit/delete(not change all of the chatbox code) in my current chatbox code? I have already added some other functions like auto-login, deleting messages user connected/disconnected etc). Furthermore some time it displays a test message how can i delete it?
Re: How can I add edit/delete functions for each message in chatbox?
@JScript thank you sir this was perfect!
Re: How can I add edit/delete functions for each message in chatbox?
@FrOsTyXi
I'm a
@Black-Shadow
1- I have already added some other functions like auto-login
-> The auto-login function is already included!
2- deleting messages user connected/disconnected:
->
In the code, look for: if ($(".shout-" + index).length) {
And replace with: if ($(".shout-" + index).length || message.userId == -10 {
3- "Furthermore some time it displays a test message how can i delete it?"
-> You could post a "print"?
JS
I'm a
@Black-Shadow
1- I have already added some other functions like auto-login
-> The auto-login function is already included!
2- deleting messages user connected/disconnected:
->
In the code, look for: if ($(".shout-" + index).length) {
And replace with: if ($(".shout-" + index).length || message.userId == -10 {
3- "Furthermore some time it displays a test message how can i delete it?"
-> You could post a "print"?
JS
Re: How can I add edit/delete functions for each message in chatbox?
@JScript very true friend it is very nice and glad you made this for us, amazing work friend!
Re: How can I add edit/delete functions for each message in chatbox?
@JScript can I pm you my code to check it and fix it?JScript wrote:@FrOsTyXi
I'm a
@Black-Shadow
1- I have already added some other functions like auto-login
-> The auto-login function is already included!
2- deleting messages user connected/disconnected:
->
In the code, look for: if ($(".shout-" + index).length) {
And replace with: if ($(".shout-" + index).length || message.userId == -10 {
3- "Furthermore some time it displays a test message how can i delete it?"
-> You could post a "print"?
JS
Re: How can I add edit/delete functions for each message in chatbox?
Due to the complexity of the code, we can not post it on topic, only download link!Black-Shadow wrote:@JScript can I pm you my code to check it and fix it?
But it's easy, follow the steps below:
In the code, search: if ($(".shout-" + index).length) {
And replace with: if ($(".shout-" + index).length || message.userId == -10) {
So long,
JS
Re: How can I add edit/delete functions for each message in chatbox?
@JScript i want to hide the chatbox option "logout" and "Back to Chat" when the member is connected to the chatbox and I need to remove @ from the chatbox because I have substituted with an icon.JScript wrote:Due to the complexity of the code, we can not post it on topic, only download link!Black-Shadow wrote:@JScript can I pm you my code to check it and fix it?
But it's easy, follow the steps below:In the code, search: if ($(".shout-" + index).length) {
And replace with: if ($(".shout-" + index).length || message.userId == -10) {
So long,
JS
Re: How can I add edit/delete functions for each message in chatbox?
I made some changes based on what you want, I will implement them gradually, because I lack time!Black-Shadow wrote:@JScript i want to hide the chatbox option "logout" and "Back to Chat" when the member is connected to the chatbox and I need to remove @ from the chatbox because I have substituted with an icon.
Important: Keep all that is bold and change only what is underlined!The values of the following variables can be modified:
Translations:
Remove: "Tem certeza de que deseja remover esta mensagem?",
Save: "Salvar",
Cancel: "Cancelar",
Configurations:
Title: "", // Change your chatbox title, default is "" = (locale title!)
Notice: 0, // ligns "joined" and "logged off": 1 = Remove
Prefix: "@", // Change the moderator prefix
autoLogin: 1 // Automatic login: 0 = Disable
So long,
JS
Re: How can I add edit/delete functions for each message in chatbox?
Hello @JScript,
Nice update, thank you very much my friend, I have a problem I have hide the "archives/back to the chat" and "logout" links but after a few hour are appearing again also the symbol @ appearing again after some refreshes.
Nice update, thank you very much my friend, I have a problem I have hide the "archives/back to the chat" and "logout" links but after a few hour are appearing again also the symbol @ appearing again after some refreshes.
Re: How can I add edit/delete functions for each message in chatbox?
Give me access to their forum with a temporary account with membership rights only!
JS
JS
Re: How can I add edit/delete functions for each message in chatbox?
Ok @JScript I will pm you a testing account.
Re: How can I add edit/delete functions for each message in chatbox?
@Black-Shadow
OK, there is an error in your forum, see:
This error belongs to the widget "Staff Online" and the best you have to do is remove it and then ask for support!
JS
OK, there is an error in your forum, see:
This error belongs to the widget "Staff Online" and the best you have to do is remove it and then ask for support!
JS
Re: How can I add edit/delete functions for each message in chatbox?
In my code, search this: $(function() { and change to this: $(window).load(function () {
JS
JS
Re: How can I add edit/delete functions for each message in chatbox?
Ok @JScript, I change it but nothing happens
Re: How can I add edit/delete functions for each message in chatbox?
Ok, undo the change and remove this chat customization code: Remove the lines "...joined the chat & ... has logged off the chat"Black-Shadow wrote:Ok @JScript, I change it but nothing happens
My code already does this!
Check whether the problem still continues,
JS
Re: How can I add edit/delete functions for each message in chatbox?
JScript, Ok I have removed this customization too but the problem still remaining
Re: How can I add edit/delete functions for each message in chatbox?
You still did not undo what has been done in this post: https://help.forumotion.com/t139285p60-#956128 !!!Black-Shadow wrote:JScript, Ok I have removed this customization too but the problem still remaining
JS
Re: How can I add edit/delete functions for each message in chatbox?
I have been undone it now @JScript
Re: How can I add edit/delete functions for each message in chatbox?
@Black-Shadow
Okay, in my code, search for this:
And replace it with this other "loader":
So long,
JS
Okay, in my code, search for this:
- Code:
$(function() {
if (_userdata.session_logged_in) {
$('#frame_chatbox').load(function() {
chat_edit();
});
}
});
And replace it with this other "loader":
- Code:
$(function() {
if (_userdata.session_logged_in) {
var frame_chatbox_document = setInterval(function() {
try {
if (document.getElementById('frame_chatbox').contentWindow['chatbox']) {
clearInterval(frame_chatbox_document);
chat_edit();
}
} catch (e) {}
}, 500);
$('#frame_chatbox').load(function() {
chat_edit();
});
}
});
So long,
JS
Re: How can I add edit/delete functions for each message in chatbox?
Ok @JScript I replaced the code but it duplicates the message "The messages has been cleared by..." and it is not hiding the memberslist when exiting.
Re: How can I add edit/delete functions for each message in chatbox?
I made a change in my post: https://help.forumotion.com/t139285p60-how-can-i-add-edit-delete-functions-for-each-message-in-chatbox#956139Black-Shadow wrote:Ok @JScript I replaced the code but it duplicates the message "The messages has been cleared by..."
Redo again and check ok?
JS
Re: How can I add edit/delete functions for each message in chatbox?
I checked it again.
Last edited by Black-Shadow on May 9th 2015, 3:28 am; edited 1 time in total
Re: How can I add edit/delete functions for each message in chatbox?
@Black-Shadow
I already warned you you that due to the complexity of the code, it can not be posted within a topic, only download link!
Edit your last post and remove the code...
Here everything is ok, see: https://i.imgur.com/ecs5TWx.png
New info: https://help.forumotion.com/t139285p60-how-can-i-add-edit-delete-functions-for-each-message-in-chatbox#956145
So long,
JS
I already warned you you that due to the complexity of the code, it can not be posted within a topic, only download link!
Edit your last post and remove the code...
Here everything is ok, see: https://i.imgur.com/ecs5TWx.png
New info: https://help.forumotion.com/t139285p60-how-can-i-add-edit-delete-functions-for-each-message-in-chatbox#956145
So long,
JS
Last edited by JScript on May 9th 2015, 4:06 am; edited 1 time in total (Reason for editing : New info!)
Re: How can I add edit/delete functions for each message in chatbox?
Ok i edited my post the only problem is that each time i am refreshing the page it duplicates the chatbox messages.
Re: How can I add edit/delete functions for each message in chatbox?
@Black-Shadow
Ok...
In the code, search for:
And replace with:
So long,
JS
Ok...
In the code, search for:
- Code:
if (!interval) {
interval = setInterval(function() {
chatbox.init();
}, 5000);
}
} else {
clearInterval(interval);
interval = 0;
And replace with:
- Code:
if (!interval) {
$("#chatbox").empty();
interval = setInterval(function() {
chatbox.init();
}, 5000);
}
} else {
if (interval) {
$("#chatbox").empty();
}
clearInterval(interval);
interval = 0;
So long,
JS
Re: How can I add edit/delete functions for each message in chatbox?
I have done this change too but the problem remaining.
Re: How can I add edit/delete functions for each message in chatbox?
@JScript Correct even after the changes above we are getting this,
Re: How can I add edit/delete functions for each message in chatbox?
@FrOsTyXi and @Black-Shadow
Please, download the code again cause I made a small change in it!
Link: https://help.forumotion.com/t138790-new-chat-box-a-brief-analysis#956061
JS
Please, download the code again cause I made a small change in it!
Link: https://help.forumotion.com/t138790-new-chat-box-a-brief-analysis#956061
JS
Page 3 of 4 • 1, 2, 3, 4
Similar topics
» Members can not edit or delete their own posts
» Members can't edit or delete their posts
» [ONLY TOPIC] Can't delete or edit groups
» Moving Edit, Delete, IP, etc. to Bottom of Post
» How Delete Edit Skin Images
» Members can't edit or delete their posts
» [ONLY TOPIC] Can't delete or edit groups
» Moving Edit, Delete, IP, etc. to Bottom of Post
» How Delete Edit Skin Images
Page 3 of 4
Permissions in this forum:
You cannot reply to topics in this forum