Hallo, Gast! (Registrieren)

Letzte Ankündigung: MyBB 1.8.37 veröffentlicht (04.11.23)


Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste
Wie baue ich meinen Ajax Chat richtig ein
#1
Question 
Es hilft nichts mehr, trotz mehrfachem Googlen und hier im Forum rum suchen schwing ich die weisse Fahne und bitte um Hilfe.

Ich möchte den Ajax Chat einbauen, doch irgendwie funktioniert dauernd was nicht.
Also ich habe den Ajax Chat runtergeladen und auf meinen Webspace gemacht. In den Ordner /upload (der bei mir jetzt umbenannt ist auf Forum).

Anschliessend bin ich auf Chat-- > lib --> config.exemple.php und hab das geöffnet, bearbeitet, als config.php abgepeichert und dann das config.exemple gelöscht.

Da hab ich dann dieses bearbeitet:

PHP-Code:
// Database connection values:
$config['dbConnection']['host'] = 'localhost';
$config['dbConnection']['user'] = 'NicknamefürloginbeimHoster;
$config['
dbConnection']['pass'] = 'PasswortDatenbank;
$config['dbConnection']['name'] = 'Datenbankname'

Ist das bis hier richtig?
Dann hab ich gelesen bei google, dass ich nun mein Forum aufrufen kann und eingeben muss /chat/install.php

Hier hab ich das gefunden

Doch wenn ich das mach, dann krieg ich diese Fehlermeldung:

Zitat:Parse error: syntax error, unexpected T_DOUBLE_ARROW, expecting ')' in /users/wonderworld/www/Forum/chat/lib/config.php on line 47

Ich hab keine Ahnung was ich falsch gemacht haben könnte und deshalb bitte ich jetzt um Hilfe nach dem ich Tage lang mich rumgeärgert hab damit.

Hoffentlich konnte man mir irgendwie folgen und kann mir helfen.
Bin mit meinem Latein am Ende..
Zitieren
#2
Das deutet auf einen Syntax-Fehler in Deiner config. php hin. Vermutlich hast Du beim Bearbeiten etwas falsch gemacht. Nur mal so zur Sicherheit: In den oben genannten Zeilen müssen die Eingaben jeweils mit einem ' geschlossen werden. So, wie nachfolgend:
PHP-Code:
// Database connection values:
$config['dbConnection']['host'] = 'localhost';
$config['dbConnection']['user'] = 'NicknamefürloginbeimHoster';
$config['dbConnection']['pass'] = 'PasswortDatenbank';
$config['dbConnection']['name'] = 'Datenbankname'
Kannst Du mal nachsehen, ob das in Deiner Datei so ist? Vielleicht ist das ja schon der Grund für die Fehlermeldung.
viele Grüße
Jockl
übersetzte und eigene Plugins
Zitieren
#3
Guten Morgen Jockl

Hmm ok.. irgendwas ist also falsch.. könnte also sein dass ich ein falsches Passwort genommen habe?
Ich muss doch dass von der Datenbank nehmen oder? Wie auch bei User den Nickname wie ich mich bei meinem Hoster anmelde oder muss da bplaced stehen da dieser mein Hoster ist? (Wohl kaum)

Also ich hab gesehen dass da seo ein Zeichen gefehlt hatte, aber selbst dann stimmt es noch nicht. *achselzuck*
Zitieren
#4
(04.04.2012, 04:25)Soul schrieb: Also ich hab gesehen dass da seo ein Zeichen gefehlt hatte, aber selbst dann stimmt es noch nicht. *achselzuck*
Was heißt, "stimmt es noch nicht". Was kommt denn jetzt für eine Meldung? Hattest Du in der Datei noch weitere Änderungen vorgenommen?
viele Grüße
Jockl
übersetzte und eigene Plugins
Zitieren
#5
Na es hat einfach so ein " ' " Zeichen gefehlt und das hatte ich eingesetzt.
Aber es hat sich null verändert am Problem. Es geht einfach immer noch nicht.

Jetzt heisst es:

Zitat:Parse error : syntax error, unexpected T_DOUBLE_ARROW, erwartet ')' in / users / Wunderwelt / www / Forum / Chat / lib / config.php on line 38

ööööhm..
Zitieren
#6
Vorschlag:

Mache die Zugangsdaten unkenntlich und setze Deine config.php hier mal rein.
viele Grüße
Jockl
übersetzte und eigene Plugins
Zitieren
#7
PHP-Code:
<?php
/*
 * @package AJAX_Chat
 * @author Sebastian Tschan
 * @copyright (c) Sebastian Tschan
 * @license GNU Affero General Public License
 * @link https://blueimp.net/ajax/
 */

// Define AJAX Chat user roles:
define('AJAX_CHAT_CHATBOT',        4);
define('AJAX_CHAT_ADMIN',        3);
define('AJAX_CHAT_MODERATOR',    2);
define('AJAX_CHAT_USER',        1);
define('AJAX_CHAT_GUEST',        0);

// AJAX Chat config parameters:
$config = array();

// Database connection values:
$config['dbConnection']['host'] = 'XXXX';
$config['dbConnection']['user'] = 'XXXXX';
$config['dbConnection']['pass'] = 'XXXXX';
$config['dbConnection']['name'] = 'XXXXXX'

// Database table names:
$config['dbTableNames'] = array();
$config['dbTableNames']['online']        = 'ajax_chat_online';
$config['dbTableNames']['messages']        = 'ajax_chat_messages';
$config['dbTableNames']['bans']            = 'ajax_chat_bans';
$config['dbTableNames']['invitations']    = 'ajax_chat_invitations';

// Available languages:
$config['langAvailable'] = array('ar','bg','bp','ca','cy','cz','de','el','en','es','et','fi','fr','gl','he','hr','hu','in','it','ka','kr','ja','nl','no','pl','ro','ru','sk','sl','sr','sv','tr','uk','zh','zh-tw');
// Default language:
$config['langDefault'] = 'en';
// Language names:
$config['langNames'] = array('ar'=>'????','bg'=>'?????????','bp'=>'Português (Brasil)','ca'=>'Català','cy'=>'Cymraeg','cz'=>'Cesky','de'=>'Deutsch','dk'=>'Dansk'=>'el'=>'???????a','en'=>'English','es'=>'Español','et'=>'Eesti','fi'=>'Suomi','fr'=>'Français','gl'=>'Galego','he'=>'?????','hr' => 'Hrvatski','hu' => 'Magyar','in'=>'Bahasa Indonesia','it'=>'Italiano','ja'=>'???','ka'=>'???????','kr'=>'??','nl'=>'Nederlands','no'=>'Norsk','pl'=>'Polski','ro'=>'România','ru'=>'???????','sk'=>'Slovencina','sl'=>'Slovensko','sr'=>'Srpski','sv'=>'Svenska','tr'=>'Türkçe','uk'=>'??????????','zh'=>'?? (??)''zh-tw'=>'?? (??)');

// Available styles:
$config['styleAvailable'] = array('beige','black','grey','Oxygen','Lithium','Sulfur','Cobalt','Mercury','Radium','prosilver','subsilver2','subblack2','subSilver','Core','MyBB','vBulletin');
// Default style:
$config['styleDefault'] = 'prosilver';

// The encoding used for the XHTML content:
$config['contentEncoding'] = 'UTF-8';
// The encoding of the data source, like userNames and channelNames:
$config['sourceEncoding'] = 'UTF-8';
// The content-type of the XHTML page (e.g. "text/html", will be set dependent on browser capabilities if set to null):
$config['contentType'] = null;

// Session name used to identify the session cookie:
$config['sessionName'] = 'ajax_chat';
// Prefix added to every session key:
$config['sessionKeyPrefix'] = 'ajaxChat';
// The lifetime of the language, style and setting cookies in days:
$config['sessionCookieLifeTime'] = 365;
// The path of the cookies, '/' allows to read the cookies from all directories:
$config['sessionCookiePath'] = '/';
// The domain of the cookies, defaults to the hostname of the server if set to null:
$config['sessionCookieDomain'] = null;
// If enabled, cookies must be sent over secure (SSL/TLS encrypted) connections:
$config['sessionCookieSecure'] = null;

// Default channelName used together with the defaultChannelID if no channel with this ID exists:
$config['defaultChannelName'] = 'Public';
// ChannelID used when no channel is given:
$config['defaultChannelID'] = 0;
// Defines an array of channelIDs (e.g. array(0, 1)) to limit the number of available channels, will be ignored if set to null:
$config['limitChannelList'] = array(0182);

// UserID plus this value are private channels (this is also the max userID and max channelID):
$config['privateChannelDiff'] = 500000000;
// UserID plus this value are used for private messages:
$config['privateMessageDiff'] = 1000000000;

// Enable/Disable private Channels:
$config['allowPrivateChannels'] = true;
// Enable/Disable private Messages:
$config['allowPrivateMessages'] = true;

// Private channels should be distinguished by either a prefix or a suffix or both (no whitespace):
$config['privateChannelPrefix'] = '[';
// Private channels should be distinguished by either a prefix or a suffix or both (no whitespace):
$config['privateChannelSuffix'] = ']';

// If enabled, users will be logged in automatically as guest users (if allowed), if not authenticated:
$config['forceAutoLogin'] = false;

// Defines if login/logout and channel enter/leave are displayed:
$config['showChannelMessages'] = true;

// If enabled, the chat will only be accessible for the admin:
$config['chatClosed'] = false;
// Defines the timezone offset in seconds (-12*60*60 to 12*60*60) - if null, the server timezone is used:
$config['timeZoneOffset'] = null;
// Defines the hour of the day the chat is opened (0 - closingHour):
$config['openingHour'] = 0;
// Defines the hour of the day the chat is closed (openingHour - 24):
$config['closingHour'] = 24;
// Defines the weekdays the chat is opened (0=Sunday to 6=Saturday):
$config['openingWeekDays'] = array(0,1,2,3,4,5,6);

// Enable/Disable guest logins:
$config['allowGuestLogins'] = true;
// Enable/Disable write access for guest users - if disabled, guest users may not write messages:
$config['allowGuestWrite'] = true;
// Allow/Disallow guest users to choose their own userName:
$config['allowGuestUserName'] = true;
// Guest users should be distinguished by either a prefix or a suffix or both (no whitespace):
$config['guestUserPrefix'] = '(';
// Guest users should be distinguished by either a prefix or a suffix or both (no whitespace):
$config['guestUserSuffix'] = ')';
// Guest userIDs may not be lower than this value (and not higher than privateChannelDiff):
$config['minGuestUserID'] = 400000000;

// Allow/Disallow users to change their userName (Nickname):
$config['allowNickChange'] = true;
// Changed userNames should be distinguished by either a prefix or a suffix or both (no whitespace):
$config['changedNickPrefix'] = '(';
// Changed userNames should be distinguished by either a prefix or a suffix or both (no whitespace):
$config['changedNickSuffix'] = ')';

// Allow/Disallow registered users to delete their own messages:
$config['allowUserMessageDelete'] = true;

// The userID used for ChatBot messages:
$config['chatBotID'] = 2147483647;
// The userName used for ChatBot messages
$config['chatBotName'] = 'ChatBot';

// Minutes until a user is declared inactive (last status update) - the minimum is 2 minutes:
$config['inactiveTimeout'] = 2;
// Interval in minutes to check for inactive users:
$config['inactiveCheckInterval'] = 5;

// Defines if messages are shown which have been sent before the user entered the channel:
$config['requestMessagesPriorChannelEnter'] = true;
// Defines an array of channelIDs (e.g. array(0, 1)) for which the previous setting is always true (will be ignored if set to null):
$config['requestMessagesPriorChannelEnterList'] = null;
// Max time difference in hours for messages to display on each request:
$config['requestMessagesTimeDiff'] = 24;
// Max number of messages to display on each request:
$config['requestMessagesLimit'] = 10;

// Max users in chat (does not affect moderators or admins):
$config['maxUsersLoggedIn'] = 100;
// Max userName length:
$config['userNameMaxLength'] = 16;
// Max messageText length:
$config['messageTextMaxLength'] = 1040;
// Defines the max number of messages a user may send per minute:
$config['maxMessageRate'] = 20;

// Defines the default time in minutes a user gets banned if kicked from a moderator without ban minutes parameter:
$config['defaultBanTime'] = 5;

// Argument that is given to the handleLogout JavaScript method:
$config['logoutData'] = './?logout=true';

// If true, checks if the user IP is the same when logged in:
$config['ipCheck'] = true;

// Defines the max time difference in hours for logs when no period or search condition is given:
$config['logsRequestMessagesTimeDiff'] = 1;
// Defines how many logs are returned on each logs request:
$config['logsRequestMessagesLimit'] = 10;

// Defines the earliest year used for the logs selection:
$config['logsFirstYear'] = 2007;

// Defines if old messages are purged from the database:
$config['logsPurgeLogs'] = false;
// Max time difference in days for old messages before they are purged from the database:
$config['logsPurgeTimeDiff'] = 365;

// Defines if registered users (including moderators) have access to the logs (admins are always granted access):
$config['logsUserAccess'] = false;
// Defines a list of channels (e.g. array(0, 1)) to limit the logs access for registered users, includes all channels the user has access to if set to null:
$config['logsUserAccessChannelList'] = null;

// Defines if the socket server is enabled:
$config['socketServerEnabled'] = false;
// Defines the hostname of the socket server used to connect from client side (the server hostname is used if set to null):
$config['socketServerHost'] = null;
// Defines the IP of the socket server used to connect from server side to broadcast update messages:
$config['socketServerIP'] = '127.0.0.1';
// Defines the port of the socket server:
$config['socketServerPort'] = 1935;
// This ID can be used to distinguish between different chat installations using the same socket server:
$config['socketServerChatID'] = 0;
?>
Zitieren
#8
Mir ist gestern der selbe Fehler untergekommen, als ich mir eneR's Thread angesehen habe.

Die Lösung war, neben dem Original Code des AjaxChat blueimp auch noch die Daten von hier auf den Webspace zu laden. Dabei werden ein paar Dateien von blueimp überschrieben. Achtung: Du musst dann auch erst die config.php anpassen.
viele Grüße
Jockl
übersetzte und eigene Plugins
Zitieren
#9
Sorry, dass ich das jetzt nochmal rauskrame, aber mir hat sich nun ein Problem ergeben, nach der installation (mit Jockl´s Dateien) hab ich die install.php, wie vorgeschrieben, gelöscht und bin auf die /chat/index.php gegangen und jetzt kommt folgender Fehler:

PHP-Code:
This page contains the following errors:

error on line 1 at column 6XML declaration allowed only at the start of the document
Below is a rendering of the page up to the first error

Mit freundlichen Grüßen,

Reixsplash Wink
Zitieren
#10
Hallo zusammen,
bei mir hat's mit deiner Datei geklappt!
Wenn ich jetzt allerdings mein Forum Besuche kommt die Fehlermeldung:


Zitat:This page contains the following errors:

error on line 80 at column 1: Extra content at the end of the document
Below is a rendering of the page up to the first error.

Nur dumm das er nicht sagt in welcher Datei! :/
Jemand eine Idee wo das sein könnte?
Zitieren


Möglicherweise verwandte Themen…
Thema Verfasser Antworten Ansichten Letzter Beitrag
  Ajax-Chat Fehlermeldung 404 Dana 11 1.420 28.12.2022, 11:49
Letzter Beitrag: Dana
  Wie kann ich et chat in Forum einbinden radio-quergedacht 3 1.779 10.07.2019, 17:22
Letzter Beitrag: radio-quergedacht
  Serverumzug: eingebundener Ajax Blueimp Chat funktioniert nicht hoerbartina 3 1.968 17.12.2018, 13:26
Letzter Beitrag: hoerbartina
  Ajax Chat - Logout/Login hoerbartina 3 1.909 11.12.2018, 18:19
Letzter Beitrag: hoerbartina
  Pro Forum ein extra Chat oder ein Chat mit "Räumen" ? regaddi 19 4.862 29.03.2017, 01:09
Letzter Beitrag: sjfm