---------------------------------------
P.S.
Weiß nicht, ob es hier passt, aber ich bin von dem Ajax-Chat begeistert und hab nach einiger Bastelei ein Snippet für euch, before ich es in einem englishen Supportforum poste:
Damit habt ihr ein Img- Button neben dem Url-Button im Chatfenster. So könnt ihr Pics in den Chat "posten":
Habs etwas abgekürzt, weil wenig Zeit

Code: Alles auswählen
open
js/config.js
search for
// Defines the list of allowed BBCodes:
bbCodeTags: new Array(
'b',
'i',
'u',
'quote',
'code',
'color',
'url'
replace with
// Defines the list of allowed BBCodes:
bbCodeTags: new Array(
'b',
'i',
'u',
'quote',
'code',
'color',
'url',
'img'
open
js/chat.js
search for
insertBBCode: function(bbCode) {
switch(bbCode) {
case 'url':
var url = prompt(this.lang['urlDialog'], 'http://');
if(url)
this.insert('[url=' + url + ']', '[/url]');
else
this.dom['inputField'].focus();
break;
default:
this.insert('[' + bbCode + ']', '[/' + bbCode + ']');
}
},
after add
insertCustomBBCode: function(tag, attribute, content) {
switch(tag) {
case 'img':
if(tag)
this.insert('[img]', '[/img]');
else
this.tag['inputField'].focus();
break;
default:
this.insert('[img]', '[/img]');
}
},
search for
// Override to perform custom actions on new messages:
// Return true if message is to be added to the chatList, else false
customOnNewMessage: function(dateObject, userID, userName, userRole, messageID,
messageText, channelID, ip) {
return true;
}
}
after add
ajaxChat.replaceCustomBBCode = function(tag, attribute, content) {
switch(tag) {
case 'img':
return '<img src="' + content + '" alt=""/>';
}
}
open
lib/template/loggedIn.html
search for
<input type="button" value="[LANG]bbCodeLabelURL[/LANG]"
title="[LANG]bbCodeTitleURL[/LANG]" onclick="ajaxChat.insertBBCode('url');"/>
after add
<input type="button" value="[LANG]bbCodeLabelIMG[/LANG]"
title="[LANG]bbCodeTitleIMG[/LANG]" onclick="ajaxChat.insertCustomBBCode('img');"/>
open
lib/lang/de.php
search for
$lang['bbCodeLabelURL'] = 'Url';
after add
$lang['bbCodeLabelIMG'] = 'Img';
search for (ist modifiziert)
$lang['bbCodeTitleURL'] = 'Link einfügen: [url=http://example.org/index.html]Text[/url]';
after add
$lang['bbCodeTitleIMG'] = 'Pic einfügen: [img]http://example.org/image.jpg[/img]';
open
lib/lang/en.php
search for (is modified)
$lang['bbCodeTitleURL'] = 'Insert URL: [url=http://example.org/index.php]text[/url]';
after add
$lang['bbCodeTitleIMG'] = 'Insert IMG: [img]http://example.org/image.jpg[/img]';
4seven