(*) Phiên bản hỗ trợ: phpBB2, punBb, Invision, PhpBB3
Information
Author - LGforum
Latest Release - 1.8
Available Old Releases - 1.2, 1.3, 1.5, 1.6, 1.7, 1.7.1, 1.8
Last Release Date - 2nd June 2013
Expected Next Release Date - TBC
Forum Support - Phpbb3, Invision, PunBB. It will work on Phpbb2, but bugs may be experienced as phpbb2 is not supported during development.
AvacWeb Chat for Forumotion forums is Copyrighted (C) by AvacWeb 2012. All Rights Reserved. No distribution of the source code without consent. No use of the source code without access through the domain "chat.avacweb.net". Please respect these copyrights to retain rights to use AvacWeb Chat.
View All Avacweb Chat Plug Ins
Important!
In order to keep the AvacWeb Chat Private Messaging system (V1.5 and above) private, it is vital that you add this CSS to your forum's CSS[tip]Found at ACP - Display - Colors - CSS Stylesheet[/tip] before using AvacWeb Chat 1.5 or above. Thank you.
Additionally, I recommend reading through this topic. It is cleaned up each release to contain only helpful and informative posts regarding Avacweb Chat
AWC is different due to the way it is written. It is written in a way that it can be customized and upgraded easily. It is written with the future in mind, which was what LGChat lacked, it was written as a one off, which sequentially grew, making updates more difficult each time.
Not only will it be easier to customize and update for me and contributing developers, it will provide a user API to customize the chat to your forum's needs and more. Including the ability to add a custom style-sheet, add more custom commands, translate into other languages or change the wordings, hooks to allow customizing of the messages and user list, custom event handlers, and of course the same sort of options you received with LGChat, such as custom chat title, custom sound file etc.
Information
Author - LGforum
Latest Release - 1.8
Available Old Releases - 1.2, 1.3, 1.5, 1.6, 1.7, 1.7.1, 1.8
Last Release Date - 2nd June 2013
Expected Next Release Date - TBC
Forum Support - Phpbb3, Invision, PunBB. It will work on Phpbb2, but bugs may be experienced as phpbb2 is not supported during development.
AvacWeb Chat for Forumotion forums is Copyrighted (C) by AvacWeb 2012. All Rights Reserved. No distribution of the source code without consent. No use of the source code without access through the domain "chat.avacweb.net". Please respect these copyrights to retain rights to use AvacWeb Chat.
View All Avacweb Chat Plug Ins
Important!
In order to keep the AvacWeb Chat Private Messaging system (V1.5 and above) private, it is vital that you add this CSS to your forum's CSS[tip]Found at ACP - Display - Colors - CSS Stylesheet[/tip] before using AvacWeb Chat 1.5 or above. Thank you.
- Code:
.a_chat_pm tr, .a_chat_pm td, .a_chat_tab tr, .a_chat_tab td { display:none!important; }
.a_chat_pm:before, .a_chat_tab:before { content: 'Hidden Content'; font-style: italic; }
Additionally, I recommend reading through this topic. It is cleaned up each release to contain only helpful and informative posts regarding Avacweb Chat
Introduction to AvacWeb Chat
Welcome to the new chatbox era, where we've finally moved on from LGChat to replace it with the much superior AvacWeb Chat. Throughout this topic I'll be referring to AvacWeb Chat as AWC, simply because it's quicker. Like LGChat, AWC will be receiving updates and new releases over the course of the next year, and I will be listening to suggestions, bug reports and even contributions to the source code.AWC is different due to the way it is written. It is written in a way that it can be customized and upgraded easily. It is written with the future in mind, which was what LGChat lacked, it was written as a one off, which sequentially grew, making updates more difficult each time.
Not only will it be easier to customize and update for me and contributing developers, it will provide a user API to customize the chat to your forum's needs and more. Including the ability to add a custom style-sheet, add more custom commands, translate into other languages or change the wordings, hooks to allow customizing of the messages and user list, custom event handlers, and of course the same sort of options you received with LGChat, such as custom chat title, custom sound file etc.
- AWC Features:
- Customized User Interface - With new buttons and controls.
- Private Chat Rooms - Have 1 on 1 or group conversations within AWC tabs.
- Seperate Chat Rooms - (v1.8+) Allowing for staff only chat rooms, or rooms for specific discussions. Allow users can open their own chat rooms from the chat.
- Cookie controlled user settings. - Your users settings and preferences are saved.
- Optional cookie controlled sound support. - Your users can turn sound on or off and their setting is saved.
- Improved designs. - Customized design to spruce up the chatbox. Sleek tabbed chat room display.
- Optional custom stylesheet for creating your own themes. - Specify your own stylesheet URL for your own unique theme.
- AJAX archives switch, now saved with cookie. - Turn archives on an off instantly.
- Improved Log in/Log out system. - A more intuitive display for logged out users.
- Automatic Log in option - Optionally automatically log your users into the chatbox.
- Timeout disable option - Never let your users be timed out again.
- Smiley Picker - A much nicer, easier smiley picker, using your forums range of smilies.
- Improved Banlist - (1.8+) A nicer and easier to use banlist, using the /banlist command.
- Improved color picker. - Choose from a wide range of colors.
- Chatting users count inside the button. - See how many users are in the chat before you even log in.
- Advanced hooks for completely customizing the chat - Hook into the system add even more functionality.
- Custom event system - for adding Javascript handlers to events within the chat and create your own reactions.
- Command system for adding new commands, editing and disabling existing ones. - Control over all commands. Make "staff-only" commands in v1.8+.
- Easy translation to other languages. - Can be used on non-english boards just as easily.
- New message notifications in the button and tab title. - Sound and visual notifications of new messages.
- Stays open when changing page. - No need to tirelessly toggle the chatbox.
- Stylish right-click user menu - Right click a username in the memberlist to display the new sleak menu.
- Reading Mode - Turn on "Reading" mode to be able to scroll up and read messages. New messages and refreshes will not disturb you.
- Additional Commands - More commands to make things easier. Type /cmd into your AWC to see all the available commands.
- Your users can move and resize the chatbox - Your users can use the stylish drop and drag interface to resize and move the chatbox wherever they want.
- LGBB Support - If LGBB is installed on your board, AWC will use it. Allowing you to use your custom BBcodes in the chatbox.
- Newest First Ordering - Your members can choose if they want the ordering of the messages 'Newest First' or not.
- Message Merging - Your members can choose whether they want subsequest messages from the same user to merge into 1 message.
More great features are provided in the AvacWeb Chat section of this forum as AWC Plug-Ins, just look for the topics prefixed [PLUG-IN]- Customized User Interface - With new buttons and controls.
- Install AvacWeb Chat:
- Installing AWC is extremely easy, as it involves no CSS and no HTML, it is pure Javascript where all necessities will be taken care of for you.
Create a new Javascript[tip]ACP - Modules - Javascript management[/tip] and put this Javascript inside:
- Code:
var avacweb_chat_config = {
version : '1-8',
new_chat_title : 'AvacWeb Chatbox',
auto_log_in : 'open',
archives : 1,
sound_file : 'http://www.freesfx.co.uk/rx2/mp3s/2/1305_1256857800.mp3',
stylesheet : 'http://chat.avacweb.net/avacweb_chat.css',
disable_timeout : 0,
allow_private_messaging : 1,
allow_user_resize : 1,
commands : {},
can_open_tabs : [1], //user ids of users who can open new tabs.
tabs : {},
allow_copyrights : 1, //please be kind and allow AWC to place small discreet copyrights and backlink on your forum.
// DO NOT TOUCH ANYTHING BELOW
message_hook:[],user_hook:[],events:{},add_event:function(t,f) {t=/^on/.test(t)?t:'on'+t;t in this.events?this.events[t].push(f):this.events[t]=[f]}};
document.write('<script type="text/javascript" src="http://chat.avacweb.net/v' + avacweb_chat_config.version + '.js" id="achat_script"></script>');
DO NOT COPY THE JAVASCRIPT SOURCE CODE FROM MY SERVER INTO YOUR FORUM, THIS IS NOT ALLOWED.
- The AvacWeb Chat Config Settings:
- This will be a run down of the options you can change for AWC in the Javascript. If your a novice user, this should be enough to get what you want out of the chat. For more advanced users, you may wish to read about the hook system, event system and CMD system, which will help create endless features for Avacweb Chat and provide much more control.
- version - You won't need to change this and shouldn't until new updates are released.
- new_chat_title - This is the chat title that will be shown at the top of the chatbox.
- light_up_color - (Removed in v1.8+) This is the color that the button will change to when new messages have arrived in the chatbox. This can be any CSS color format.
- auto_log_in - This option dictates whether your users should be automatically logged in to the chatbox. Setting it to 'open' will mean your users are automatically logged into the chatbox when they open it. Settings it to 'load' will mean the users are automatically logged into the chatbox when they log into the forum. (When the page loads). Anything else will disable automatic logging in, and the user will have to click log in.
- archives - Setting this to 0 will mean archives are off by default, and 1 will mean they are on by default.
- sound_file - This is the sound file that will play when a new message is entered into the chatbox if the user has sound turned on. They can turn sound on/off in their user option panel.
- at_replacement - (Removed in v1.6+) This option allows you to change the much hated '@' symbol that moderators of the chatbox inherit. It can be an image, html or just a word.
- stylesheet - If you wish to define a custom CSS stylesheet for your chatbox, you can place the link to the stylesheet here. Note that this should only be done if you know CSS, as this will replace the AWC stylesheet. This option will allow the creating of different themes for AWC.
- disable_timeout - Change this to 1 to disable the time out in the chatbox. User's will not be logged out until they click log out.
- allow_private_messaging - (V1.5+) Change this to 0 to disable the private messaging feature. This will not disable chat rooms.
- allow_offline_pm - (V1.6 only) Change this to 0 to disable offline private messages, and to 1 to enable.
- allow_user_resize - (V1.6+) Allow the user to resize the chatbox or not. Change to 0 to disallow users to resize/move the chatbox, or 1 to allow it.
- onload - Deprecated as of v1.6+, use event system instead. Removed in v1.7+
- message_hook - This function allows you to hook into the functionality of AWC, specifically the creation of the messages. This option allowed me to add avatars to the chatbox here. See the development thread for more details.
- user_hook - This allows you to hook into the creation of the user list. Which has again allowed me to add the avatars to the memberlist in the chatbox here. See development thread for more details.
- commands - This option will allow you to disable and add more commands. Please note, AWC has all the default commands built in and a few extra. You can type /cmd into AWC to see a list of the available commands. This list will include any custom commands you add.
- tabs - (v1.8+) This allows you to add more default tabs (chatrooms) and specify which users are allowed to use that chatroom. See 'About Chatrooms' section.
- can_open_tabs - (v1.8+) This allows you to list all the users who are allowed to open new chatrooms. If all your members could, it would be chaos. So it is restricted to these users. See 'About Chatrooms' section.
- allow_copyrights - (v1.8+) AWC will have a very small backlink below the chat, you may disable this if you'd like, but showing your support to Avacweb is much appreciated.
- version - You won't need to change this and shouldn't until new updates are released.
- Customizing Avacweb Chat:
- If the config settings simply aren't giving you enough control over AWC you might want to begin looking at more advanced options.
AWC can be widely customized with its Hook, Event, and CMD systems, which give you much more control. It also has a load of useful functions which will aid in developing.
Read about customizing Avacweb Chat in more detail here: Developing For Avacweb Chat
There is also a wide variety of Plug Ins to already choose from here: AWC Plug Ins
- About Chatrooms:
- AWC allows you to add more chat rooms, and even allows users to open chat rooms from the chat. There's a few things you should know before diving into this though.
Adding Chat Rooms in the Config
You'll currently see this in your AWC Config object: tabs : {}, - new chat rooms are added in between the curly braces. You first define a name for the chat room and then you define the users allowed in it; seperated by a colon. For example, to make a chat room named 'Staff Room' and allow users 1, 4, 95 in this is what it would look like:
"Staff Room" : [1, 4, 95] - this snippet would need added between the curly braces, so it would look like this:
- Code:
tabs : {
"Staff Room" : [1, 4, 95]
}
- Code:
tabs : {
"Staff Room" : [1, 4, 95],
"Premium Room" : [1, 6, 24, 90, 102, 18], //premium members
"Neymars Room" : ['LGforum', 'Neymar'] //a room for me and Neymar lol
}
Adding Chat Rooms from the Chatbox
Members who you allow, using the 'can_open_tabs' config option, can open chat rooms from the chatbox. Those who have permission will see an extra tab with '+' in it, indicating that you can add another tab. When this is clicked you'll be asked for a name for the new tab, and then it will open. The tab does not exist to other users until you post at least one message in it.
Another way of doing the same thing is using the 'tab' command like so: /tab(Staff Chat) This is a chat room for staff - this will open a tab named 'Staff Chat' and post the message in it, meaning it will exist for everyone already.
You can specify who is allowed to open new chat rooms using the 'can_open_tabs' option in the AWC Config. By default it will look like this: can_open_tabs : [1], allowing only the user with the ID of 1 to open chat rooms. By specifying more User IDs (seperated by a comma, you can allow your forum staff this ability too). Eg: can_open_tabs : [1, 56, 78, 19],
Chat Room Limitations
- When opening a new chat room from the chatbox you can not specify the users allowed in that chat room. Therefore it is a public chatroom open to all members. If you wish to open a private chat room from the chatbox you should use the PM command. /pm(user1, user2, user3) Message
- You can not clear a chat room. If you clear the chat, it clears the whole chat.
- Commands and Bot messages are public. So if you post /me is going for food it is posted in the public chat, not the current tab.
- Other users will not see chat rooms you create from the chatbox, until you post at least 1 message in that room.
- Chat rooms created in the chat are not permanent. If there is no messages in a chat room, it will not exist when you refresh.
- PM Tabs are saved using 'sessionStorage', hence this does not carry between 2 browser tabs.
- The chatbox may run slower with more tabs open.
- Chat rooms can not be closed in the same manner PM tabs can.
- Translating AWC or Changing words.:
- AvacWeb Chat can be used on non-english boards very easily, due to having the option to translate every user visible word or sentence. AWC can not translate it automatically, you have to provide your chosen translation by including the following script in the same Javascript file as your AvacWeb chat config script from the installation.
- Code:
avacweb_chat_translation = {
'log in' : 'Log In',
'log out': 'Log Out',
'chat' : 'Chat',
'on' : 'On',
'off' : 'Off',
'close' : 'Close',
'smilies': 'Smilies',
'colors' : 'Colors',
'send' : 'Send',
'archives' : 'Archives',
'message': 'Message',
'refresh': 'Refresh',
'you are disconnected. click log in to join the chat.' : 'You are disconnected. Click log in to join the chat.',
'user options' : 'User Options',
'color' : 'Color',
'sound' : 'Sound',
'bold' : 'Bold',
'underline' : 'Underline',
'strike' : 'Strike',
'italic' : 'Italic',
'private message' : 'Private Message',
'loading smilies...' : 'Loading smilies...',
'this command is not available or does not exist' : 'This command is not available or does not exist',
'user not found' : 'User not found',
'view profile' : 'View Profile',
'send private message' : 'Send Private Message',
'kick from chat' : 'Kick from chat',
'remove from moderators' : 'Remove from Moderators',
'send friend request' : 'Send Friend Request',
'add to moderators' : 'Add to Moderators',
'away' : 'Away',
'reading' : 'Reading',
'start private conversation' : 'Start Private Conversation',
'conversation with' : 'Conversation with',
'public' : 'Public',
'started by' : 'Started By',
'add a new tab' : 'Add a new tab',
'private message' : 'Private Message',
'sorry this command is only for staff.' : 'Sorry, this command is only for staff.',
'no banned users to display.' : 'No banned users to display',
'tab names must be more than 2 characters.' : 'Tab name must be more than 2 characters.',
'choose a name for the new tab' : 'Choose a name for the new tab',
'newest first' : 'Newest first',
'merge messages' : 'Merge messages'
};
Simply by changing the words on the right side of the colon you can change it to the correct wording in your own language, or even keep it english but change it to something you prefer. It's that simple. If you notice any options missing from this translation object, please let me know and I'll provide how to add it.
- Plug Ins and Add-Ons:
Avacweb Chat prides itself on the customizability and ease of modification. Almost anything can be customized or built for Avacweb Chat.
Check out the big choice of Plug Ins here: AWC Plug Ins
Feel free to share you own creations or ask in any of the threads for support.
More Plug-Ins are always being created and shared. Please share your creativity and ideas. .
- Changelog:
VERSION 1.8 (2nd June 2013)
- New config option added: 'tabs'. Allowing the admin to add more default tabs, similar to that of the 'Public' tab. Additionally, the admin can choose which users can enter that chatroom. Allowing for staff or group chat rooms.
- New config option added: 'can_open_tabs'. A list of the user ids who have permission to open their own chat rooms in the chatbox.
- New config option added: 'allow_copyrights'. Please show your support to Avacweb by allowing AWC to display a small backlink to Avacweb. You may disable this if you wish.
- New command added: '/tab(tabname) message' The command sends a message to a specific tab. If the tab does not exist, the chat room is then opened, if the user has permission to do so.
- Whether the user is staff or not is now tracked in the user_details object in AWC. Developers can now check if a user is staff within plug ins or code.
- Custom commands can now be set as 'staff only' commands.
- Small aesthetic changes to popups.
- Default design of the chat button has been improved.
- The AWC event object has been improved to pass on data to event handlers. More info in the development thread.
- New events added: 'oncommand' and 'onreading' events. More info in the development thread.
- Tabs have moved to the top of the chat and have been redesigned with a more clean and sleak feel.
- An easy interface for adding new tabs directly from the chat.
- Banlist command has been added and improved upon.
- Config option removed: 'light_up_color' - the chat button will not light up a color when a new message arrive, but instead will receive the classname of 'newmsg', this allows for styling in the CSS instead.
- New user option added: 'Newest first' - This option allows your users to choose if they want the messages to be ordered by Newest First.
- New user option added: 'Merge messages' - This option allows your users to choose if subsequent messages by the same user will be merged into one message.
VERSION 1.7.1 (27th May 2013) Bug fix release.
- Tab system changed in order to fix bugs with users with speech/quote marks in their names.
- Smilies box improved to include the dropdown menu for choosing smilies category.
- Sound jumping issue fixed.
VERSION 1.7 (10th Febuary 2013)
- Event system fixed to catch errors and relay them in the console for bug fixing.
- The 'onload' option has been removed from the config object. Onload hooks are unsupported.
- AWC has been secured against theft and must be installed via the way provided in the tutorial.
- New events are fired and have been added to the event system: 'onsend', 'ontabchange', 'ontabopen', 'ontabclose'
- 'Start Private Conversation' option added to user dropdown menu
- 'allow_offline_pm' option has been removed from the config. Offline PM's are always allowed in order for tab system to work.
- Tab title changing has been removed. (Can be added via plug in if anybody wants)
- One on One and Group Chat has been added. Seperate chat tabs for private chatting.
- Friend Request option and command removed for free space. (Can be added via plug in if anybody wants)
- Log In System changed to fix log in bugs.
- AWC tabs for switching chat rooms has been added to the bottom right of the chatbox.
- Refresh button removed.
VERSION 1.6 (9th January 2013)
- Improvements to "Reading Mode"; no sound, scrolling or lighting up will happen when in reading mode. The chatbox will completely leave you alone.
- Chatbox event system added for even more customization control.
- "Ban from chat" option added to user sub menu.
- "Send Chatbox PM" option added to user sub menu.
- Hook storage and execution system updated and improved. Backwards compatible.
- Refresh rate increased again to pre 1.5 to improve speed.
- Offline PM system added. Chat PM's can now be sent to users if they are online or not (If allow_offline_pm is set to 1). They will be seen when the user logs in.
- New option added to config; "allow_offline_pm" - activate, deactivate offline PM'ing.
- New option added to config; "allow_user_resize" - change to 1 to allow the user to resize and move the chat, change to 0 deactivate and have the chats default dimensions.
- Option removed from config; "at_replacement" - Option has now been removed, as moderator at symbol can be changed with a plug in via the hook system.
- Onload hook avacweb_chat_config.onload now Deprecated, Use onload event; avacweb_chat_config.add_event('onload', function)
- PM system upgraded and improved to support offline PMs. PMs present in the chat before upgrading may be insecure.
- Internal LGBB support added. If LGBB is installed on your forum, AWC will use it in chatbox messages.
- Chatbox resizeable and moveable. User data is saved. Users can now drop and drag the chat anywhere, and drag to resize the chat. (if allow_user_resize is set to 1)
- /sound command removed.
- A "loading display" has been added for when any items need to load. For example, when archives is clicked.
- Style should be consistent amongst forum versions now. (Excluding phpbb2, as AWC is not checked or tested on phpbb2)
VERSION 1.5 (25th November 2012)
- Private messaging system added.
- Reading mode and button added.
- "Params" parameter removed from command "run" function.
- Compatibility for v1.0 style config object removed.
- v1.0 cut out and unavailable.
- Initiation neatened up and default chat style hidden.
- Clicking on a username enter PM command into message box.
- Refreshes slowed down to consume less resources.
- New option 'allow_private_messaging' added.
- New right-click user menu added to memberlist.
VERSION 1.3 (5th November 2012)
- Chatbox will now stay open if it is open on page change.
- Improved functionality, and faster reponse.
- Page title will change when new messages have been entered.
- Easy translation or word changing without having to delve into the script.
VERSION 1.2 - Unavailable
- Option added to disable the automatic timeout.
- Archives saved with cookie
- Improvements to hook system, to allow multiple hooks and catch errors.
- Known Bugs:
- Its innevitable that bugs will occur and be found, and we'll always try our best to fix them.
Here's a list of the bugs we know about and are working on, if you find any more please let us know.
- Button indicates new message on page refresh on some boards.
- Returning to older versions:
- LGChat was criticised at times for it's automatic updates, as sometimes people were not happy with the updates and wished to return to an old version. You can return (or stay on) and older version of AWC simply by changing the specified version in your avacweb_chat_config object.
Where you see: version : '1-8'
Just change it to version : '1-7' to return to version 1.6
Remember to check the changelog to know what you'll be losing.
Here's what older versions are still available to return to:
-Version 1.0(Unavailable)
-Version 1.2(Unavailable)
- Version 1.3
- Version 1.5
- Version 1.6
- Version 1.7
- Version 1.7.1
- Version 1.8
Admin