Channels Aren't Showing In The Login Dropdown?

34 views
Skip to first unread message

D

unread,
Sep 17, 2016, 11:21:36 PM9/17/16
to AJAX-chat
Hi,
First of all Id like to say thanks to Banjo for the Very quick support and helpful response, keep up the great work.

I have multiple channels on my chat and Only the public channel is showing in the login page. How do I add the others as some users only have access to a certain channel. 
Heres my code for the channels:

<?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();
$channels[0] = 'Public';
$channels[1] = 'Private';
$channels[2] = 'Freedom!';
// Sample channel list:
#$channels[0] = 'Public';
#$channels[1] = 'Private';
#$channels[2] = 'Freedom!';
?>

Thanks

Fabian Wilson

unread,
Sep 18, 2016, 12:55:10 AM9/18/16
to D, AJAX-chat
You will need to check the users.php file to make users have access to these channels.


--
You received this message because you are subscribed to the Google Groups "AJAX-chat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ajax-chat+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

D

unread,
Sep 18, 2016, 1:57:59 AM9/18/16
to AJAX-chat
Hi,
All the users are assigned the correct group.
The problem is that on the login page they can only see the option to login to the public channel. No other channels are showing in the dropdown.

Fabian Wilson

unread,
Sep 18, 2016, 3:33:22 AM9/18/16
to D, AJAX-chat
They made need to clear their cookies then.

D

unread,
Sep 18, 2016, 3:57:04 AM9/18/16
to AJAX-chat
Hi,
I've cleared cookies multiple times. And they can't login unless the menu gets fixed because their channel isn't on the menu.

Fabian Wilson

unread,
Sep 18, 2016, 11:07:58 AM9/18/16
to D, AJAX-chat
Did you assign the channel an ID? If you could post you channels.php file maybe we can help determine what the issue is.

Inline image 2

On Sun, Sep 18, 2016 at 2:57 AM, D <dylan...@gmail.com> wrote:
Hi,
I've cleared cookies multiple times. And they can't login unless the menu gets fixed because their channel isn't on the menu.

D

unread,
Sep 18, 2016, 5:41:48 PM9/18/16
to AJAX-chat
Hi,
That was the channels file that I posted in the first post.
This is the chat room: s1portal.tk/chat

Banjo Fox

unread,
Sep 19, 2016, 9:54:12 AM9/19/16
to AJAX-chat
I would be willing to wager that I know what the problem is ;)

The list of channels listed on the LOGIN page is determined by what the Guest user is able to access (which makes sense because Guests are not yet authenticated ;))
Therefore if you update the array of your guest user to include all of the channels you should see the full list.

Default configuration:

// 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);


New configuration (to see ALL channels):
// 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,1,2,3,4,5,6,7);

D

unread,
Sep 19, 2016, 6:58:02 PM9/19/16
to AJAX-chat
Thanks,
Ive changed the code but im just having problems with the chat going white. Banjo is helping me in another thread. Thanks.
Reply all
Reply to author
Forward
0 new messages