DEPRECATION WARNING
This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.
EXT: AJAX Chat¶
Author: | Kasper Skårhøj |
---|---|
Created: | 2002-11-01T00:32:00 |
Changed: | 2007-11-19T21:13:13 |
Author: | Vincent Tietz |
Email: | vincent.tietz@vj-media.de |
Info 3: | |
Info 4: |
EXT: AJAX Chat¶
Table of Contents¶
EXT: AJAX Chat 1
Introduction 1
What does it do? 1
Screenshots 2
Users manual 3
Commands 3
Adminstration 3
Installation and Configuration 3
Reference 4
To-Do list 6
Changelog 6
Copyright¶
Extension Key: vjchat
Copyright 2006, Vincent Tietz, <vincent.tietz@vj-media.de>
This document is published under the Open Content License
available from http://www.opencontent.org/opl.shtml
The content of this document is related to TYPO3
- a GNU/GPL CMS/Framework available from www.typo3.com
((generated))¶
Credits¶
I'd like to thank Andreas Beutel, Peter Klein, Preben Soerensen, Udo Gerhards, Frank Rowold, ben van 't ende, Franz Dürr, Henry Okelue, Michael Pölzl, Kevin Renskers and others for sending bug reports, translations or other contributions.
Sponsors¶
TU 9 German Institutes of Technology e. V.
You may sponsor further development of this extension by contacting the author of this document.
Introduction¶
What does it do?¶
This extension provides a html-chatbox based on ajax. This means messages are sent and received with the use of JavaScript, so no page reload is necessary. More features are:
Views¶
The chat room itself consists of one list with all connected users, one window of chat messages and one text area for entering a message. When moving the mouse cursor over one user name of the user list, more details are shown in a tool tip window. When clicking on one user name, the name is copied to the text area. Optionally there are also buttons for sending a private message and creating a private room with this user as member of it.
The moderated chat is extended by an extra window for stored messages. If a moderator stores at least one message this window gets visible. There he can decide whether to delete or to commit the message.
Another view consists of all available chat rooms . From there an user can enter a chat room or get to the session list viewwhere all available session logs are displayed.
The session list view shows all available sessions of a chat room.
Finally there is the session log view . All messages of a session are listed and a moderator – if logged in – can delete unwanted messages.
Chat modes¶
There are two chat modes: normal and expert mode . The expert chat is a moderated chat where messages from normal users are hidden at first. A moderator can unhide a message by “committing” the message.
Chat rooms¶
There can be created an unlimited number of chatrooms. Each chatroom consists optionally f title, description, welcome message, moderators, experts (only in expert mode), banned users, superusers and a frontend usergroup that is allowed to use the chat room. You can also define if you want to use nicknames or real names (this is experimental only), usercount limit and what informations are shown about one user for each group (moderator, expert, user). Since version 0.2.0 there are private chat rooms available. One user can create a new chatroom by using the command /newroom. An invitation can be sent via /invite.
Messages¶
Messages can have different styles for each type: user, system, moderator, expert, superuser and hidden user messages. Chat messages are parsed and emoticons (like “:)”) are replaced with images. By using the command /msg one can send a private (hidden) message to any user.
Sessions¶
It is possible to create a session log entry. It is defined by title, description, relation to one chatroom and two relations to chat entries (first message and last message). All messages between the two defined messages are displayed in the session logs view.
Commands and live moderating¶
During the chat one can use commands to get some information about one user or to moderate the chat. By entering “/help” the user receives a list of available commands. Some commands: ban, kick, redeem, whois, who, makesession, help.
Usergroups¶
A chat room can contain four types of users. First the ordinary chat user. Second the so-called moderator is mostly the owner of the chat room or was explicitly defined. In an expert chat room the messages of an user are hidden until a moderator commits the message. Messages of an expert are never hidden. The superuser can always execute all chat commands and can even be hidden. All message have a different CSS style for each group one.
Users manual¶
Because this chat is based on ajax the user needs a JavaScript enabled browser.
- An user needs also to login before using the chat.
- When entering a chatroom the user receives, if available, a welcome message.
- Entering /help presents an overview of possible commands.
- One click on a name from the userlist copies the name into the textbox. Pressing RETURN sends the message, by using CTRL+RETURN one can write multiline messages.
Commands¶
The following commands are available during chat. Parameters are separated by space. [ ] means optional, { } means required parameter.
All users¶
/help¶
Command
/help
Parameters
none
Description
Shows a list of available commands with syntax and description.
/who¶
Command
/who
Parameters
none
Description
Shows the usernames of all people in the current room.
/whois¶
Command
/whois
Parameters
{UserId}
Description
Detailed information about one user. UserId can be the uid (prepended with #) or the username. Example:
/whois #1
or
/whois jim
/smileys¶
Command
/smileys
Parameters
Description
Returns a list of available smilies.
/roomlist¶
Command
/roomlist
Parameters
Description
Returns a list of all users in other rooms.
/quit¶
Command
/quit
Parameters
[Message]
Description
Leave chat with an optional message.
/setstyle¶
Command
/setstyle
Parameters
{Number}
Description
Switches the style of the message. The styles are predefined by TypoScript and CSS.
/newroom¶
Command
/newroom
Parameters
{name}
Description
Creates a new private chat room.
/invite¶
Command
/invite
Parameters
{UserId}
Description
Invites a user to the current room.
/recentinvite¶
Command
/recentinvite
Parameters
{UserId}
Description
Invites a user to the latest room created by the current user.
Moderators and superusers¶
/ban¶
Command
/ban
Parameters
{UserId}
[reason]
Description
Adds an user to banned list. UserId can be the uid (prepended with #) or the username.
Example:
/ban jim Stop shouting!
/kick¶
Command
/kick
Parameters
{UserId}
[time]
[reason]
Description
Restricts user access to current room for a definded time (default is 20 minutes). The user is added to banned list. UserId can be the uid (prepended with #) or the username.
/redeem¶
Command
/redeem
Parameters
{UserId}
[reason]
Description
Removes user from banned list or sets time to zero (if kicked). UserId can be the uid (prepended with #) or the username.
/makesession¶
Command
/makesession
Parameters
{startId}
{endId}
{name}
Description
Makes a session that can be viewed in the rooms view. The ids are displayed next to each message during the chat if you are logged in as moderator or superuser.
/makeexpert¶
Command
/makeexpert
Parameters
{UserId}
Description
Adds an user to the expert list.
/makeuser¶
Command
/makeuser
Parameters
{UserId}
Description
Removes an user from the expert list.
/cleanup¶
Command
/cleanup
Parameters
Description
Deletes all entries of current room that do not belong to any session.
/cleanupall¶
Command
/cleanupall
Parameters
Description
Deletes all entries of all rooms that do not belong to any session.
/setstatus¶
Command
/setstatus
Parameters
{status}
Description
Toggles a status of an user. Currently only “hidden“ is implemented.
/switchroomstatus¶
Command
/switchroomstatus
Parameters
{status}
Description
Toggles the status of the room. 'hidden' and 'private' is implemented.
Emoticons¶
:arrow:, *arrow*¶
Code
:arrow:, *arrow*
File
arrow.gif
:badgrin:, *badgrin*¶
Code
:badgrin:, *badgrin*
File
badgrin.gif
:D¶
Code
:D
File
biggrin.gif
:?¶
Code
:?
File
confused.gif
8-)¶
Code
8-)
File
cool.gif
:(¶
Code
:(
File
cry.gif
:doubt:, *doubt*¶
Code
:doubt:, *doubt*
File
doubt.gif
:idea:, *idea*¶
Code
:idea:, *idea*
File
idea.gif
:lol:, *lol*¶
Code
:lol:, *lol*
File
lol.gif
:mad:, *mad*¶
Code
:mad:, *mad*
File
mad.gif
:neutral:, *neutral*¶
Code
:neutral:, *neutral*
File
neutral.gif
:question:, *question*¶
Code
:question:, *question*
File
question.gif
:razz:, *razz*¶
Code
:razz:, *razz*
File
razz.gif
:oops:, *oops*¶
Code
:oops:, *oops*
File
redface.gif
:roll:, *roll*¶
Code
:roll:, *roll*
File
rolleyes.gif
:-(¶
Code
:-(
File
sad.gif
:shock:, *shock*¶
Code
:shock:, *shock*
File
shock.gif
:), ;), :-), ;-)¶
Code
:), ;), :-), ;-)
File
smile.gif
:-o¶
Code
:-o
File
surprised.gif
:wink:, *wink*¶
Code
:wink:, *wink*
File
wink.gif
Installation and Configuration¶
Global settings¶
Before you install the extension you should consider a page of type 'SysFolder' where the data records for the chat should be placed (chat entries, rooms and sessions).
Install the extension with the extension manager. There you can configure the following fields.
pids.entries¶
Property
pids.entries
Data type
int
Description
This is the page id where the new entries of a chat are stored.
Default
pids.rooms¶
Property
pids.rooms
Data type
int
Description
This is the page id where the chat rooms are stored.
Default
pids.sessions¶
Property
pids.sessions
Data type
int
Description
This is the page id where the new entries of a chat are stored, if created with a chat command.
Default
serverTimeOffset¶
Property
serverTimeOffset
Data type
string
Description
During the chat a time is displayed. This value fixes the displayed time.
Example:
+1 hour
Default
+1 hour
emoticonsPath¶
Property
emoticonsPath
Data type
string
Description
Path to emoticons. This is prepended to the filename and can also be absolute (url). Default: typo3conf/ext/vjchat/pi1/emoticons/
Default
prototypeJSPath¶
Property
prototypeJSPath
Data type
string
Description
Path to the prototype JavaScript framework from Sam Stephenson >=1.4.0. Since TYPO3 4.1 the library is located in typo3/contrib/. If you do not want that this extension includes prototype automatically just clear this field. If you are using older versions of TYPO3 you can install the extension prototypejs. When 'prototypejs' is loaded, this setting has no effect.
Default
typo3/contrib/prototype/prototype.js
scriptaculousJSPath¶
Property
scriptaculousJSPath
Data type
string
Description
Path to the scriptaculous. The library is usually located in typo3/contrib/. The usage is optional (not required for the chat). If you don't want that this extension includes scriptaculous clear this field.
Default
typo3/contrib/scriptaculous/scriptaculous.js
showParameterDescription¶
Property
showParameterDescription
Data type
Description
If activated the 'help' command shows also a description for each parameter
Default
1
hidePrivateRooms¶
Property
hidePrivateRooms
Data type
boolean
Description
Hide private rooms by default: Sets the hidden flag for new private rooms by default
Default
1
deletePrivateRoomsIfEmpty¶
Property
deletePrivateRoomsIfEmpty
Data type
boolean
Description
Delete private rooms if empty: If set, private rooms are always be flagged as 'deleted' when there is no user in it.
Default
1
hideSuperusers¶
Property
hideSuperusers
Data type
boolean
Description
Hide superusers: Sets the hidden flag to a superuser when entering a chat room
Default
1
allowPrivateMessages¶
Property
allowPrivateMessages
Data type
boolean
Description
Private messages: Enable/disable private messages (/msg)
Default
1
allowPrivateRooms¶
Property
allowPrivateRooms
Data type
boolean
Description
Private rooms: Enable/disable private rooms (/newroom)
Default
1
superuserCanReadPMs¶
Property
superuserCanReadPMs
Data type
boolean
Description
PMs for superuser: Defines if the superuser can read private messages
Default
1
moderatorsAllowSwitchRoomStatus¶
Property
moderatorsAllowSwitchRoomStatus
Data type
boolean
Description
Change room status: Allows moderators to change the room status (/switchroomstatus hidden, private)
Default
0
autoDeleteEntries¶
Property
autoDeleteEntries
Data type
int
Description
Auto Delete Entries: Deletes ALL messages that are older than this value (seconds) of any room! If you are using sessions you should disable this option by setting value to 0 (otherwise entries of sessions are deleted as well) and use the command /cleanup or /cleanuproom to delete unused entries manually.
Default
0
Prototype JavaScript framework and Scriptaculous¶
This extension requires the prototype JavaScript framework from Sam Stephenson >=1.4.0. Since TYPO3 4.1 the library is located in typo3/contrib/. This extension includes it automatically if the path value (prototypeJSPath) is set in the Extension Manager. If you do not want that this extension includes prototype itself just clear this field. Then you could use some TypoScript to include the framework manually, e.g:
page.headerData.1002 = TEXT
page.headerData.1002.value = <script language="JavaScript" type="text/javascript" src="typo3/contrib/prototype/prototype.js"></script>
Alternatively (if you are using older versions of TYPO3) you could install the extension 'prototypejs' that is now obsolete.
This extension also uses Scriptaculous but which is optional (for some effects).
Create a chat room¶
Setup a chat room by creating a new record of type “Chat room” on the page you have created before (pids.rooms).
I hope most fields of this form are self-explanatory. You have three tabs. All relevant options can be entered on the first tab 'General'. On the 'Users' tab you assign users or groups to the role they should play during the chat (users, moderators, experts, superusers). If you leave the field 'User group' empty the chat should accept all users. At the bottom there are also three textboxes where you can define (in a comma separated list) what fields of the fe_users table should be shown in the userlist or by the commands /who and /whois for each user type (users, moderators and experts). The following example shows name, email address and company:
name,email,company
Now that you have created a first chat room place the plugin on a page you want by creating a new content element of the type “Insert plugin” and choose as plugin “Chat”.
Plugin Configuration¶
There is one tab for setting up the rooms overview and the chat window. Mainly these options just toggle the availability of data in the TypoScript configuration.
Tab General¶
Display¶
Property
Display
Data type
list
Description
If you select “Rooms”, an overview of all available rooms is displayed on the first page. If you choose “Chat” the user enters directly a specific chatroom when entering the page.
Default
Rooms
UID of chat room¶
Property
UID of chat room
Data type
int
Description
If you choose “Chat” you need to set this value. This ID points to the one chat room (data record of type “Chat room”).
Default
Chatrooms (if empty: global or pidlist from Starting point)¶
Property
Chatrooms (if empty: global or pidlist from Starting point)
Data type
list
Description
If you choose “Rooms Overview” you can define here what rooms should be displayed. Alternatively you can define the Starting Point (a page) or plugin.tx_vjchat_pi1.pidList from where all rooms are collected. If you leave all blank all (global) chat rooms are displayed.
Default
Page for popup chat window¶
Property
Page for popup chat window
Data type
int
Description
This page is used for the popup-window of a chat. You have to create a new page and place the plugin there a second time. The benefit is you can define a completely different (simpler) TypoScript template. If you leave this field blank the same page as the 'mother chat' is displayed.
Default
TS for this view (plugin.tx_vjchat_pi1.views.*)¶
Property
TS for this view (plugin.tx_vjchat_pi1.views.*)
Data type
string
Description
You can define TypoScript showing the roomlist in plugin.tx_vjchat_pi1.views. Please see EXT:vjchat/ext_typoscript_setup.txt.
Default
rooms
Show Description¶
Property
Show Description
Data type
boolean
Description
If enabled the field description is available in TypoScript setup (rooms).
Default
1
Don't show empty rooms¶
Property
Don't show empty rooms
Data type
boolean
Description
If enabled no empty rooms are rendered.
Default
0
Don't show closed rooms¶
Property
Don't show closed rooms
Data type
boolean
Description
If enabled no closed rooms are rendered.
Default
1
Don't show private rooms¶
Property
Don't show private rooms
Data type
boolean
Description
If enabled no private rooms are rendered.
Default
1
Show Superusers¶
Property
Show Superusers
Data type
boolean
Description
If enabled superusers are also part of field:allUserNicknames or field:allUserSnippets and field:superusers is available.
Default
0
Show Moderators¶
Property
Show Moderators
Data type
boolean
Description
If enabled moderators are also part of field:allUserNicknames or field:allUserSnippets and field:moderators is available.
Default
1
Show Users¶
Property
Show Users
Data type
boolean
Description
If enabled users are also part of field:allUserNicknames or field:allUserSnippets and field:users is available.
Default
1
Show Experts¶
Property
Show Experts
Data type
boolean
Description
If enabled experts are also part of field:allUserNicknames or field:allUserSnippets and field:experts is available.
Default
1
Show user count¶
Property
Show user count
Data type
boolean
Description
If enabled the field showUserCount is true.
Default
1
Tab Chat¶
Messages before¶
Property
Messages before
Data type
int
Description
If a user enters the chat messages can be shown that are send before. This value defines the time backwards in minutes. Note this works correct only if autoDeleteEntries (Extension Manager) has at minimum the same value.
Default
10
Refresh time if full¶
Property
Refresh time if full
Data type
int
Description
If a room is full the script checks automatically if the user can enter the chat (seconds).
Default
30
Time to get messages¶
Property
Time to get messages
Data type
int
Description
The script requests new message after this time (seconds).
Default
5
Time to load userlist¶
Property
Time to load userlist
Data type
int
Description
The script requests a complete userlist after this time (seconds).
Default
15
Enable emoticons panel¶
Property
Enable emoticons panel
Data type
boolean
Description
If set the emoticon panel is rendered.
Default
1
Enable user styles¶
Property
Enable user styles
Data type
boolean
Description
If set users can change the styles of their messages.
Default
1
Enable format panel¶
Property
Enable format panel
Data type
boolean
Description
If set the format panel is rendered.
Default
1
Colorize nicks¶
Property
Colorize nicks
Data type
boolean
Description
If enabled each nicknames gets a randomized color.
Default
Show time¶
Property
Show time
Data type
boolean
Description
If set the server time is shown.
Default
1
Show send button¶
Property
Show send button
Data type
boolean
Description
If set the marker ###SEND_BUTTON### is rendered.
Default
0
Show description in chat window¶
Property
Show description in chat window
Data type
boolean
Description
If enabled the field description is available in TypoScript setup (cObjects).
Default
1
Publish a chat session¶
You can publish a chat session either by using the command /makesession or by a new record of type 'Chat Session' in the backend. Just enter a name and the start and end message of the session and finally select a room. After saving the session appears in the chat rooms view.
Reference¶
The messages that are displayed during the chat are hardcoded. (EXT:vjchat/pi1/class.tx_vjchat_chat.php:225)
HTML structure of some generated code (hardcoded)¶
Error¶
Location
php
Structure or Example
<span class="error">{message}</span>
Message¶
Location
php
Structure or Example
<div class="tx-vjchat-message-style-{stylenumber}">
<div class="tx-vjchat-{moderator|expert|user|superuser}"><span class="tx-vjchat-time">{%H:%M:%S}: '[#id]'</span><span class="tx-vjchat-user">{username}</span>> <span class="tx-vjchat-entry">{message}</span>'</div></div>
Private message wrap¶
Location
Structure or Example
<div class="tx-vjchat-private"><div class="tx-vjchat-hidden" id="tx-vjchat-entry-{uid}">...</div></div>
Expert messages wrap¶
Location
php
Structure or Example
<div class="tx-vjchat-expert">{message}</div>
System messages wrap¶
Location
php
Structure or Example
<div class="tx-vjchat-system">{message}</div>
Moderator messages wrap¶
Location
php
Structure or Example
<div class="tx-vjchat-moderator">{message}</div>
Superuser messages wrap¶
Location
php
Structure or Example
<div class="tx-vjchat-superuser">{message}</div>
Commands¶
Location
php
Structure or Example
see EXT:vjchat/pi1/class.tx_vjchat_chat.php:528
All messages wrapped¶
Location
JavaScript
Structure or Example
<div class=”tx-vjchat-entry”>{messages}</div>
Users in userlist (useSnippets = 0)¶
Location
JavaScript
Structure or Example
<div class=”tx-vjchat-userlist”>
<div class="tx-vjchat-userlist-item tx-vjchat-userlist-user">
<span style="color: {usercolor};" class="tx-vjchat-userlist-username tx-vjchat-userid-{userid} tx-vjchat-message-style-{userstyle}" id="user-{userid}">{username}</span>
<span class="tx-vjchat-pm-link">{pmlink}</span>
<span class="tx-vjchat-pr-link">{prlink}</span></div>
</div>
Userdetails (useSnippets = 0)¶
Location
JavaScript
Structure or Example
<div id=”tx-vjchat-user-detail” class=”tx-vjchat-user-detail-{moderator|expert|user|superuser}">
<div id="tx-vjchat-user-detail-caption">{username}</div>
<div id="tx-vjchat-user-detail-body">
<p>{detail1}</p>
<p>{detail2}</p>
<p>{detailn}</p>
</div>
</div>
Example of generated code of a private message:
<div class="tx-vjchat-entry">
<div class="tx-vjchat-message-style-0">
<div class="tx-vjchat-user">
<div class="tx-vjchat-private">
<div class="tx-vjchat-hidden" id="tx-vjchat-entry-48">
<span style="display: inline;" class="tx-vjchat-time">{time}: </span>
<span style="color: rgb(76, 76, 76);" class="tx-vjchat-user tx-vjchat-userid-12">
PM from tim to tom
</span>>
<span class="tx-vjchat-entry">Hello</span>
</div>
</div>
</div>
</div>
</div>
You may use the Web Developer Extension (View Source->Generated Source) or Firebug for Mozilla Firefox to view the generated code.
You can configure the appearances of the views with TypoScript, there is still no HTML-Template.
plugin.tx_vjchat_pi1¶
templateFile¶
Property
templateFile
Data type
string
Description
The template for a chatroom. You should configure the chat via CSS and TypoScript rather than editing this file. Here you find just JavaScript and the <div> container for the chat.
Default
EXT:vjchat/pi1/chat.tpl.html
pidList¶
Property
pidList
Data type
list
Description
This can be a source for the rooms overview.
Default
defaultChatpopupPid¶
Property
defaultChatpopupPid
Data type
int
Description
If you don't set a popup pid in the configuration form of the plugin this pid would be used.
Default
tooltipOffsetXY¶
Property
tooltipOffsetXY
Data type
x,y
Description
This could be useful to move the tooltip to another position.
Default
loadingMessage¶
Property
loadingMessage
Data type
cObj
Description
This cObj is displayed when the chat loads. (marker ###LOADING_MESSAGE### in the template).
Default
_CSS_DEFAULT_STYLE¶
Property
_CSS_DEFAULT_STYLE
Data type
string
Description
Contains the default CSS style. If you do not want to use the default styles use the following row in your typoscript template:
plugin.tx_vjchat_pi1._CSS_DEFAULT_STYLE >
Default
see EXT:vjchat/ext_typoscript_setup.txt
cObjects¶
Property
cObjects
Data type
Description
Contains the cObjects used by views.
Default
see EXT:vjchat/ext_typoscript_setup.txt
views¶
Property
views
Data type
Description
Contains a stdWrap for each view.
Default
see EXT:vjchat/ext_typoscript_setup.txt
errorMessagesStdWrap¶
Property
errorMessagesStdWrap
Data type
stdWrap
Description
Default
<p class="error">|</p>
chatPopupJSWindowParams¶
Property
chatPopupJSWindowParams
Data type
string
Description
These values is passed to a new JavaScript chat window.
Default
width=600,height=600,status=1,resizable=1,location=1
userlistPMContent¶
Property
userlistPMContent
Data type
string /stdWrap
Description
This is appended to the user name in the user list and results in a link to send a private message /pm.
Default
PM
userlistPRContent¶
Property
userlistPRContent
Data type
string /stdWrap
Description
This is appended to the user name in the user list and results in a link to create a new room /newroom.
Default
PR
userColors¶
Property
userColors
Data type
list
Description
Contains all available colors (e.g. '#2A8C2A') for the nicknames.
Default
see EXT:vjchat/ext_typoscript_setup.txt
chatbuttons¶
Property
chatbuttons
Data type
COA
Description
These are the buttons within the 'format panel' of the chat.
Default
see EXT:vjchat/ext_typoscript_setup.txt
[tsref:plugin.tx_vjchat_pi1]
plugin.tx_vjchat_pi1.cObjects¶
There are three COAs (plugin.tx_vjchat_pi1.cObjects) defined that are used by the views (plugin.tx_vjchat_pi1.views).
room¶
Property
room
Data type
COA
Description
Available fields (via getText) are: All fields of an chat room means uid, fe_group, name, description, closed, showfullnames, mode, maxusercount, moderators, experts, groupaccess, sessions, bannedusers and welcomemessage. Additional fields are userCount, sessionCount, onlineExperts, onlineModerators and isFull.
Example:
plugin.tx_vjchat_pi1.cObjects.room {
10 = TEXT
10.value = <h2>{field:name}</h2>
10.insertData = 1
}
Default
see EXT:vjchat/ext_typoscript_setup.txt
roomShort¶
Property
roomShort
Data type
COA
Description
Just another example configuration for the rooms overview. Which one is renderer can be selected in the configuration form of the plugin.
Default
session¶
Property
session
Data type
COA
Description
Available fields are the fields of a chat session uid, name, description, hidden, room, startdate and enddate. One additional field is entriesCount.
Default
entry¶
Property
entry
Data type
COA
Description
Available fields are uid, username, entry and type.
Default
[tsref:plugin.tx_vjchat_pi1.cObjects]
plugin.tx_vjchat_pi1.views¶
rooms.stdWrap¶
Property
rooms.stdWrap
Data type
stdWrap
Description
Content of this object is an iteration of the cObject room (see above).
Default
see EXT:vjchat/ext_typoscript_setup.txt
roomsShort.stdWrap¶
Property
roomsShort.stdWrap
Data type
stdWrap
Description
Content of this object is an iteration of the cObject roomShort (see above).
Default
sessions.stdWrap¶
Property
sessions.stdWrap
Data type
stdWrap
Description
Content of this object is an iteration of the cObject session (see above).
Default
session.stdWrap¶
Property
session.stdWrap
Data type
stdWrap
Description
Content of this object is an iteration of the cObject entry (see above).
Default
chat.stdWrap¶
Property
chat.stdWrap
Data type
stdWrap
Description
Content of this object is an instance of the templateFile.
Default
[tsref:plugin.tx_vjchat_pi1.views]
Snippets¶
There is a new feature since 0.2.8. It allows you to define HTML- Snippets that are created and stored in database when the user enters a chat. Then these snippets are displayed in userlist or tooltip. This allows highest customization.
useSnippets¶
Property
useSnippets
Data type
boolean
Description
Enables this feature.
Default
1
userlistSnippet¶
Property
userlistSnippet
Data type
COA
Description
The fields username, image and uid are always available. All further fields of fe_users need to be set in the room's form (Show additional information about).
Default
see EXT:vjchat/ext_typoscript_setup.txt
tooltipSnippet¶
Property
tooltipSnippet
Data type
COA
Description
The fields username, image and uid are always available. All further fields of fe_users need to be set in the room's form (Show additional information about).
Default
see EXT:vjchat/ext_typoscript_setup.txt
[tsref:plugin.tx_vjchat_pi1]
Example¶
If you use the display mode “Chat” you might want to hide the link “Leave Chat”:
plugin.tx_vjchat_pi1.views.chat.stdWrap.preCObject.3 >
plugin.tx_vjchat_pi1.messageStyles¶
Please have a look at the EXT:vjchat/ext_typoscript_setup.txt. There should be clear how to customize the message styles. If you make changes in this section make sure to define equivalent css with .tx- vjchat-message-style-[NUMBER].
default¶
Property
default
Data type
COA
Description
This is the default button for all buttons that activate a message style.
Default
see EXT:vjchat/ext_typoscript_setup.txt
1¶
Property
1
Data type
stdWrap
Description
Overrides only the default COA for the second style.
Default
2¶
Property
2
Data type
stdWrap
Description
Overrides only the default COA for the third style.
Default
Known problems¶
- The chat requires the prototype JavaScript framework from Sam Stephenson >=1.4.0. Make sure that the path in the extension manager is correct. Check whether the script is included in the header of your html source. Please make sure that the library is included only once. Otherwise there could occur errors like 'Too much recursions'.
- Prototype.js is not compatible with mootools. So the chat would not work if you load mootools.
- Many users chatting can result in high server load. You can avoid this by limiting the number of chat users and by increasing the refresh time. Btw, if you add '&tx_vjchat_pi1[debug]=timer' to the url a debug window appears containing time measurements.
- 'Real names' won't work with chat commands.
- Excessive nesting of formats (bold, underlined, http or url) in a chat message can lead to problems.
To-Do list¶
- Sound signals.
- Extend user status (away or away from keyboard), add more commands
- Show the result of /help in a separate window
- Performance optimization.
- Testing, translating.
- Make structure of chat messages customizable.
- Make emoticons customizable.
- Add something like a status bar to avoid showing system responses (to commands) in the chat window. Graphical feedback when messages are loaded and sent.
- Create a HTML-Template for customizing the chat instead of using TypoScript.
- Showing more than one chat room in tabs.
- Anonymous login (may be this should be realized by another tricky extension)
- Integration into community extensions (click on username could instantly open a chat window).
Changelog¶
07-11-19 0.3.1 Vincent Tietz
* [fix] character decoding
* [fix] Scriptaculous is really optional now
07-11-13 0.3.0 Vincent Tietz
* [add] two-state chat buttons (on/off)
* [add] some scriptaculous effects
* [add] Loading message
* [add] autofocus (but seems not to work in FF)
* [add] JS Cookie support for some features
* [add] defaultChatpopupPid, pidList
* [add] optional send button
* [add] multi customizable room list views
* [add] page reference for chat room
* [add] html snippets for userlist and userlist tooltip
* [add] tooltipOffsetXY
* [add] simple tooltip behaviour (to keep it in borders)
* [add] extended flexform for rooms view and chatroom
* [add] CDATA for all javascript blocks
* [change] made /who /whois a little bit prettier
* [change] smily 8) is now 8-) because of destroying js-functions like "showChatWindow(8)" when replacing
* [change] added full urls to all javascript room links
* [add] put javascript link actions also to onClick
* [fix] chat should work with realurl now (checking urls for '?')
* [fix] utf-8 problems
* [fix] auto-delete of private rooms
* [sponsor] Herbstzeit Seniorenportal GmbH, http://www.herbstzeit.de/
07-04-27 0.2.7 Vincent Tietz
* [fix] system messages were not shown; help button did not work; thx to Karl Nabinger for bug report
* [added] auto inclusion of contrib/prototype/prototype.js only when ext prototypejs is NOT loaded
* [added] error message when user was not found when using /msg
07-04-26 0.2.6 Vincent Tietz
* [added] the prototype framework is now included automatically since it comes with TYPO3 (typo3/contrib)
* [added] in extension manager one can configure the path to the framework
* [fix] filtering double messages (clients keep list of received ids)
07-01-29 0.2.5 Vincent Tietz
* [change] make use of eID for ajax calls; removed patched tslib_fe and t3lib_div
* [change] in template for userlist: <h1 id="tx-vjchat-user-detail- caption">username<h1> to <div id="tx-vjchat-user-detail- caption"></div>
* [change] first step towards using "real" xml like response (<returnmsg>), but main content still as CDATA
* [fix] new line in textarea in firefox
* [fix] cleanUpRoom didn't delete anything if no session has been defined
* [fix] auto checking when full did not work properly
06-11-14 0.2.4 Vincent Tietz
* [change] useShippedT3Lib_Div is now disabled by default
* [added] some more functions to shipped t3lib_div
* [fix] prototype dependency: 0.0.1
06-11-11 0.2.3 Vincent Tietz
* [added] option to use shipped tslib_fe and t3lib_div
* [change] show user info ordered by form entry
* [change] order of parameter of /makesession
* [change] actions of format buttons are now within the <img> tag with onClick
* [change] actions of links in the help command are now defined by <span
class="tx-vjchat-cmd-help-link" onclick="..."
* [correction] documentation
* [fix] PATH_thisScript on windows mashines
06-11-11 0.2.2 Vincent Tietz
* [change] beta version
* [change] documentation updated
* [fix] commit message js error
* [fix] if popup page is empty in flexform the same page will be displayed
* [fix] hide kicked users
06-10-31 0.2.1 Vincent Tietz
* [add] dependency entries (prototypejs)
06-10-30 0.2.0 Vincent Tietz
* [add] nicknames are now randomly colorized
* [add] users can select message styles (configurable via TypoScript and CSS)
* [change] appearance
* [change] CSS default styles
* [change] /help will contain links now
* [add] private rooms: /newroom
* [add] private messages: /msg
* [add] auto delete messages option
* [add] superuser group
* [change] made chat a bit more object oriented
* [change] uses now the prototype JavaScript framework from Sam Stephenson
(http://prototype.conio.net/).
06-05-12 Vincent Tietz
* added commands: /smileys and /roomlist (thanks to Udo Gerhards)
* added commands: /makeexpert, /makeuser, /cleanuproom, /cleanupall, /setstatus
* major changes in the template (added emoticons and format panels) and new default css styles; removed form tag
* formating added [b], [u], [i]
* added sorting fields to sesssions and rooms
* entries are sorted by time in BE by default
* userlist updates only if changed, tooltip user information
06-06-19 0.1.5 Vincent Tietz
* [add] dutch transalation (thx to ben van 't ende)
* [change] improved character encoding and string glues (thx to Kevin Renskers for
bug report)
06-05-19 0.1.4 Vincent Tietz
* changed field 'status' to 'invisible'
* added alias in SQL command (thx to Franz Dürr)
* added <langDisable>1</langDisable>; fixed some locallang references and update
danish translation (thx to Peter Klein)
06-05-15 Vincent Tietz
* added Danisch translation (thx to Peter Klein)
* fixed SUBSTR MySQL syntax error for MySQL lower than 4.1.1.
06-05-12 Vincent Tietz
* added commands: /smileys and /roomlist (thanks to Udo Gerhards)
* added commands: /makeexpert, /makeuser, /cleanuproom, /cleanupall, /setstatus
* major changes in the template (added emoticons and format panels) and new default
css styles; removed form tag
* formating added [b], [u], [i]
* added sorting fields to sesssions and rooms
* entries are sorted by time in BE by default
* userlist updates only if changed, tooltip user information
06-04-28 Vincent Tietz
* fix: storing messages in IE
06-04-07 Vincent Tietz
* nearly all labels now refer to locallang.php
06-04-06 Vincent Tietz
* added prefix 'tx-vjchat-' to all styles and ids
* Hidden messages can be stored in an extra view during the chat
* Room extended with fields, that define the details that should be shown in the userlist and in /who /whois
* new userlist (no selectlist anymore) with popup details about the user
* better /who and /whois
* Session is now defined by first and last entry(id) (instead of timestamp)
* in backend users can now be selected with the TYPO3-ElementBrowser
06-04-03 Vincent Tietz
* Messages will now be received depending on id instead of timestamp. This is much better, but need to be tested :)
06-03-31 Vincent Tietz
* Tried to fix the problem with more than one <form> on a page
* send only new requests if previous request returned successfull
06-03-29 Vincent Tietz
* Increasing performance by using a small version of tslib_fe.
* After sending one message immediately retrieve new messages
06-03-28 Vincent Tietz
* IMPORTANT: fixed bug if entered values in flexform
* involving serverTimeOffset in all timestamps evaluated from flexform (initChatWithMessagesBefore)
06-03-14 Vincent Tietz
* minor changes in class.tx_vjchat_pi1.php (cObj->data = $this->getRoomData)
06-03-09 Vincent Tietz
* introducing charset in HTTP-Header
* IMPORTANT: this->chatScript was hard coded - sorry for that
* fixed foreach errors in /help
06-01-19 Vincent Tietz
* /makesession available
* fixed: System message on entering chat
* formatting messages with strip_tags instead of htmlentities (for apos reason)
* pids can now be declared in the extension manager for new entries and sessions
06-01-19 Vincent Tietz
* Initial release
EXT: AJAX Chat - 17