Qurance
New Member
- Nov 12, 2022
- 6
- 9
Hello Guys,
At the moment am I very active with developing a new content management system in combination with the Nitro V2 with a own custom UI.
What do I use for this project?
Development team
If someone has some idea’s, just put it in the comments.
Some screens of the CMS (Dutch translated)
# Sign in
# Registration
# My profile (/profile/:username)
# Staff page
# Jobs application
Snippets
# HotelController :: Profile function
# Hotel Controller :: Client function
# Core :: Hotel Configuration
Greetz!
Updates (Zat 19 nov - 08:13)
At the moment busy with
Updates (Sun 20 nov - 00:09)
# Comment comment (HotelController :: News)
Updates ( Mon 21 nov 03:35 )
At the moment am I very active with developing a new content management system in combination with the Nitro V2 with a own custom UI.
What do I use for this project?
- CakePHP
- CSS / HTML / JS
- OOP
- NodeJS
- MySQL
- Java
- VueJS / PixieJS
- Multi Language System
Development team
- Only me (100% copyright)
If someone has some idea’s, just put it in the comments.
Some screens of the CMS (Dutch translated)
# Sign in
You must be registered for see images attach
# Registration
You must be registered for see images attach
# My profile (/profile/:username)
You must be registered for see images attach
# Staff page
You must be registered for see images attach
# Jobs application
You must be registered for see images attach
Snippets
# HotelController :: Profile function
PHP:
$username = htmlspecialchars($username);
$profileData = $this->Users->find('all')->where(['username' => $username]);
$this->set('title', $username);
if(!$profileData->count('id'))
{
$this->redirect(['controller' => 'Profile', 'action' => 'index', $this->Auth->user('username')]);
$this->Flash->error(__('User profile not found!'));
} else
{
foreach($profileData as $profile)
{
$this->set('profile', $profile);
// Load Models
$this->loadModel('users_badges');
$this->loadModel('messenger_friendships');
$this->loadModel('rooms');
// Profile User Data
$pDiamonds = $this->users_currency->find('all')->where(['user_id' => $profile->id, 'type' => 5]);
$pDuckets = $this->users_currency->find('all')->where(['user_id' => $profile->id, 'type' => 0]);
$this->set('badges', $this->users_badges->find()->where(['user_id' => $profile->id])->order(['badge_code' => 'ASC']));
foreach($pDiamonds as $pDiamond) { $this->set('pDiamonds', $pDiamond->amount); }
foreach($pDuckets as $pDucket) { $this->set('pDuckets', $pDucket->amount); }
$loadAllFriends = $this->messenger_friendships->find('all')->where(['user_one_id' => $profile->id]);
$this->set('pFriends', $loadAllFriends);
$this->set('rooms', $this->rooms->find('all')->where(['owner_id' => $profile->id]));
}
}
PHP:
$this->loadModel('bans');
$checkIfBanned = $this->bans->find('all')->where(['user_id' => $this->Auth->user('id')])->count('id');
if($checkIfBanned === 1)
{
$this->redirect(['controller' => 'Hotel', 'action' => 'me']);
$this->Flash->error(__('No access to hotel, have been banned!'));
}
$this->set('title', __('Client'));
$this->set('sso', $this->Auth->user('auth_ticket'));
// Check maintenance
if(Configure::read('habmates.config.hotel.maintenance') == true) { $this->redirect(['controller' => 'Hotel', 'action' => 'maintenance']); }
# Core :: Hotel Configuration
PHP:
'config' => [
'hotel' => [
'url' => 'http://habmates.nl',
'imagingUrl' => 'https://www.habbo.com/habbo-imaging',
'name' => 'HabMates',
'description' => 'Maak vrienden, doe mee en val op!',
'language' => 'nl_NL',
'maintenance' => false,
'user' => [
'defaultMotto' => 'Ik ben nieuw op HabMates!',
'startCredits' => 100000,
'startDuckets' => 100000,
'startDiamonds' => 150,
'defaultRoom' => 210 // Put Room Id
],
'jobs' => [
'dj' => [
'active' => false,
'url' => '#'
],
'event' => [
'active' => false,
'url' => '#'
],
'expert' => [
'active' => false,
'url' => '#'
],
'building' => [
'active' => false,
'url' => '#'
]
],
'images' => [
'badges' => '/swf/c_images/album1584'
],
'discord' => [
'enabled' => true,
'link' => 'https://discord.gg/WykxwS6Y',
'api' => ''
],
'registrationOff' => false,
'base' => [
'key' => md5(sha1(time())),
'yearNow' => '2022'
]
]
]
Greetz!
Post automatically merged:
Updates (Zat 19 nov - 08:13)
- You can switch between dark and light theme
- Created users settings
- Created hotel settings
At the moment busy with
- Updating catalogue items & pages
- Comments in the news section
Post automatically merged:
Updates (Sun 20 nov - 00:09)
- You can comment in the news section with a limit of 2 each user
- Creating account limit of user each ip can be edited in the core configuration of HabMates
- In the users settings you can modify the hotel in-game settings and e-mail.
Post automatically merged:
# Comment comment (HotelController :: News)
PHP:
$postComment = $this->cms_news_message->patchEntity($this->cms_news_message->newEntity(),
[
'message' => $this->request->getData('message'),
'userid' => $this->Auth->user('id'),
'newsid' => $newsId
]);
if($this->cms_news_message->save($postComment))
{
$this->redirect(['controller' => 'Hotel', 'action' => 'news', $newsId]);
$this->Flash->success(__('Your comment is posted!'));
} else
{
$this->redirect(['controller' => 'Hotel', 'action' => 'news', $newsId]);
$this->Flash->error(__('Your comment can not be posted, try again!'));
}
Post automatically merged:
Post automatically merged:
Updates ( Mon 21 nov 03:35 )
- Added: Changing password
- Busy with the housekeeping
Last edited: