adding new channels on standalone doesn't show

80 views
Skip to first unread message

LeRoy McQuay

unread,
Jun 22, 2016, 4:38:17 PM6/22/16
to AJAX-chat
I am trying to add custom channels but they are not showing.

<?php
/*
 * @package AJAX_Chat
 * @author Sebastian Tschan
 * @copyright (c) Sebastian Tschan
 * @license Modified MIT License
 * @link https://blueimp.net/ajax/
 */


// List containing the custom channels:
$channels
= array();

// Sample channel list:
$channels
[0] = 'Public';
$channels
[1] = 'Private';
$channels
[2] = 'Administrators';
$channels
[3] = 'Trades';
?>


that what my channel list looks like.

<?php
/*
 * @package AJAX_Chat
 * @author Sebastian Tschan
 * @copyright (c) Sebastian Tschan
 * @license Modified MIT License
 * @link https://blueimp.net/ajax/
 */


// List containing the registered chat users:
$users
= array();

// Default guest user (don't delete this one):
$users
[0] = array();
$users
[0]['userRole'] = AJAX_CHAT_GUEST;
$users
[0]['userName'] = null;
$users
[0]['password'] = null;
$users
[0]['channels'] = array(0,2);

// Sample admin user:
$users
[1] = array();
$users
[1]['userRole'] = AJAX_CHAT_ADMIN;
$users
[1]['userName'] = 'bradley75';
$users
[1]['password'] = 'null';
$users
[1]['channels'] = array(0,1,2,3);

// Sample moderator user:
$users
[2] = array();
$users
[2]['userRole'] = AJAX_CHAT_MODERATOR;
$users
[2]['userName'] = 'moderator';
$users
[2]['password'] = 'null';
$users
[2]['channels'] = array(0,1,2,3);

// Sample registered user:
$users
[3] = array();
$users
[3]['userRole'] = AJAX_CHAT_USER;
$users
[3]['userName'] = 'user';
$users
[3]['password'] = 'null';
$users
[3]['channels'] = array(0,4);
?>

here is the users.php file.

by what i find by doing some research this should be correct.

any ideas why its not working.

btw i am logged in admin account still nothing.

Banjo Fox

unread,
Sep 15, 2016, 12:43:48 PM9/15/16
to AJAX-chat
LeRoy,

The syntax looks okay.

Have you tried logging out and refreshing the browser tab?
I just added 17 custom channels to my chat without issue.

Not sure if this is intentional but you have a channel "4" in your AJAX_CHAT_USER config but there isn't a record for channel 4 in your list.

Frug

unread,
Sep 17, 2016, 11:08:36 AM9/17/16
to AJAX-chat
Code looks fine. You may have to log out and back in to see the list appear.

Also check your config.php to be sure this line 
$config['limitChannelList'] = null;

Is correct.

Jugolo

unread,
Dec 12, 2016, 3:56:36 PM12/12/16
to AJAX-chat
users[3]['channels'] = array(0,4);

You has no channel width id 4

Reply all
Reply to author
Forward
0 new messages