UberCMS already has the class.rooms.php in the includes.
You can use commands like this in your client:
Code:
RoomManager::CreateRoom('Roomname', USER_NAME, 'MODEL');
So you could add a link like this:
%www%/client?newroom=Roomname&model=MODEL
And put this code into client
Code:
if (isset($_GET['newroom']) && is_numeric($_GET['model']))
{
switch (intval($_GET['model']))
{
case 0:
$model='model_a';
break
case 1:
$model='model_b';
break;
//... add more
default:
$model='model_s';
break;
}
RoomManager::CreateRoom($_GET['newroom'], USER_NAME, $model);
}
You do the models with numbers, so nobody can use a invaild model.
And if someone uses a invaild model, it uses the default model, "model_s".
You should add all your models like this, and spectify the link with a number as model.
Hope you understand it and know how to use and add more models.
And don't worry about the roomname, it gets filtered in the create function. So it's safe.