I came up with an idea for a new plugin that would allow users to quote another member's message on the AWC like you can in the blogs and forums, however I don't know how to accomplish this. Is this even possible?
Like SystemFri 15 Oct 2021, 04:50
Auto Save MessagesFri 26 Feb 2021, 13:31
New tutorial questionMon 15 Feb 2021, 08:12
Support iOS Emojis (and other platforms)Sun 14 Feb 2021, 01:25
Does anybody have the original Avacweb Chat CSS?Tue 09 Feb 2021, 13:40
Page 1 of 1 •
Quote-Plugin for AWC.
Rukiafan
Status : No status yet...
Posts : 533
Join date : 2012-07-20
Posts : 533
Join date : 2012-07-20
Thu 21 Feb 2013, 18:42
LGforum
Status : Working to restore AWC!
Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Fri 22 Feb 2013, 08:39
It wouldn't be able to quote the user exactly. For instance, when you a quote a user on the forum, it includes the BBcode they used. That wouldn't happen with the chatbox. However, you could add a simpler quote which allows you to add the text from their message into the textbox.
Try this, if it works, I may share it in a plug in topic:
Here's some CSS to neaten it up though:
[ic].awc-quote { float: right; font-weight: bold; text-shadow: 0 1px white; cursor: pointer; }[/ic]
You know I love this idea so much, I might install it here on Avacweb, and maybe make it a default feature in AWC 1.8
Thank you for the great idea.
Try this, if it works, I may share it in a plug in topic:
- Code:
[panda=js]
avacweb_chat_config.message_hook.push(function(row, username, userid, usr, msg) {
row.innerHTML += '<span class="awc-quote" onclick="parent.avacweb_chat.quote_msg(\'' + username.replace(/'/g, "\\'") + '\', this.parentNode)">Quote</span>';
});
avacweb_chat_config.add_event('onload', function() {
avacweb_chat.quote_msg = function(user, row) {
avacweb_chat.insert_text( '[quote="' + user + '"]' + $('.msg', row).text() + '[/quote]' );
};
});
Here's some CSS to neaten it up though:
[ic].awc-quote { float: right; font-weight: bold; text-shadow: 0 1px white; cursor: pointer; }[/ic]
You know I love this idea so much, I might install it here on Avacweb, and maybe make it a default feature in AWC 1.8
Thank you for the great idea.
LGforum
Status : Working to restore AWC!
Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Fri 22 Feb 2013, 13:53
A much better way of doing the avatars would be this:
The script in this topic is exactly what I use on this forum and is working fine. I've even updated it to include the quote tags now.
Yes, I'm aware of all of that... I've been here and doing this a while.
However I generally write shorter rules on one line, so when readability isn't massive issue, I post it like that too.
Its called Compiling. The CSS is compiled dynamically before output, and the same is done with the Javascripts.
- Code:
[panda=js]avacweb_chat_config.message_hook.push(function(row, username, user_id, user) {
var avs = {
'Alexander' : 'http://i15.servimg.com/u/f15/14/58/00/77/alexav10.png',
'Luffle' : 'http://en.touhouwiki.net/images/thumb/0/00/Th11Satori.png/200px-Th11Satori.png',
'nextuser' : 'nextimg'
},
defaultAv = 'default avatar URL';
user.innerHTML = '<img class="chatavatar" src="' + (avs[username] || defaultAv) + '">' + user.innerHTML;
});
The script in this topic is exactly what I use on this forum and is working fine. I've even updated it to include the quote tags now.
Yes, I'm aware of all of that... I've been here and doing this a while.
However I generally write shorter rules on one line, so when readability isn't massive issue, I post it like that too.
Its called Compiling. The CSS is compiled dynamically before output, and the same is done with the Javascripts.
Sponsored content
|
|