Page 1 of 1

Private Rooms

Posted: 09 Nov 2007, 14:24
by rkrass
Ive been using smartfox for a couple months now for my avatar chat program. Ive come to a problem and i'm not sure how to navigate around it.

I would like users to have the ability to create private rooms (dynamically) but i do not want all these rooms to show up on the global list. Possibly create a 'secondary room list' where these private rooms would show up and be organized alphabetically.?

Any thoughts?

Posted: 11 Nov 2007, 09:03
by Lapo
The simplest idea that comes to my mind is to use a special character in the room name that identifies these "special" rooms, e.g. the "$" symbol

Each time you load the room list or receive a notification about a new room, you can check this token and decide what to do. Additionally you can remove the special token when showing the room name, so that the "tricks" is transparent to the user.

A "cleaner" alternative is using Room Variables. There's a flag in the <Zone> definition that allows you to receive the room variables in the user list.

Posted: 13 Nov 2007, 14:42
by rkrass
im currently using smartfoxbits for the room list. could i do this with the room list component?

Re: Private Rooms

Posted: 13 Nov 2007, 15:18
by Bax
rkrass wrote:I would like users to have the ability to create private rooms (dynamically) but i do not want all these rooms to show up on the global list. Possibly create a 'secondary room list' where these private rooms would show up and be organized alphabetically.?
The SmartFoxBits RoomList component has a number of show... properties (check the API): showPrivateRooms, showLimboRooms, showGameRooms, showChatRooms.
You can use these properties to "tweak" the main list (do not show private rooms) and the secondary list (show private rooms only).
Hope this helps.