Topic: A page with login area with content only for logged

Hi,
I have to make a page only for one user (restricted access). I need to create a page where there is a login form (login and pass) and after giving the right data, it should display the main page content.

I know that right now this is possible to create a page viewable for speciefic group, but my whole website don't have any registration, instead I need to create just one special user to be able to view this special page. And so the login area should be embended just on this special page.

So going this way...
1. I can create one registred user
2. Next I can create this "special page" to be visible just for registred user (I don't have any registration fields on whole website, so no one else will register)
3. I could put "embend code" with logining in fields. So after this user is registred it will redirect me to the content (But of that im not sure how to make).

Or maybe there is another, better way to do it?

Re: A page with login area with content only for logged

@drakan88

You can build a brand new project apart from monstra and integrate with iframe's

page > login > welcome > page restricted > logout

wink

http://monstracreative.com - themes, plugins and snippets for monstra cms

:: ATTENTION ::
Need help? Login at your account at: http://monstracreative.com/users/login. -> You have a excellent support center at our website! wink

wormsunited's Website

3 2015-02-11 19:00:43

Re: A page with login area with content only for logged

but what if I want to hold everything inside Monstra? Monstra already has I guess all features needed for this... I just need to disable registrating of users (how?) and I just need to put the login form inside that special page (how?). And I think it will work well smile

Re: A page with login area with content only for logged

@drakan88

You need to edit the file: plugins/box/users/views/frontend/index.view.php and all the others as you want. And add manually your user ID, note that you need also yours as the main admin can always login.

http://monstracreative.com - themes, plugins and snippets for monstra cms

:: ATTENTION ::
Need help? Login at your account at: http://monstracreative.com/users/login. -> You have a excellent support center at our website! wink

wormsunited's Website

Re: A page with login area with content only for logged

Ok, I will try that and I will return to this subject once it's done smile

6 2015-02-12 10:23:36

Re: A page with login area with content only for logged

@drakan88

the file at = plugins/box/users/views/frontend/index.view.php is made with tables, just edit them to meet your needs, look also to the other fields such as login page and edit page if you need help i will be arround.

wink

http://monstracreative.com - themes, plugins and snippets for monstra cms

:: ATTENTION ::
Need help? Login at your account at: http://monstracreative.com/users/login. -> You have a excellent support center at our website! wink

wormsunited's Website

7 (edited by nakome 2015-02-12 15:22:18)

Re: A page with login area with content only for logged

if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) { 
      // Only admin 
     Chunk::get('first-level');
     //  Custom admin
    if(Session::get('user_login') == 'michael'){
        Chunk::get('admin');
    }
}else if  (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin','editor')))  {
      // Only admin and editors
     Chunk::get('second-level');
     //  Custom editor
    if(Session::get('user_login') == 'michael'){
       Chunk::get('editor');
    }
}else if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin','user'))) { 
      // Only admin and users
     Chunk::get('third-level');
     //  Custom user
    if(Session::get('user_login') == 'michael'){
       Chunk::get('user');
    }
}else{
      // all Unregistered users 
       Chunk::get('normal'); 
}
..::: Moncho Varela ::::..   ..::: @Nakome ::::..   ..::: Github ::::..

nakome's Website

Re: A page with login area with content only for logged

thank You - I will try that in coming week. That's when I will finish my work on that project. Where should I put /modify the code You wrote?

Re: A page with login area with content only for logged

@drakan88

You can put or modify under your plugins > box > users > views > frontend and choose the item you want for example: profile.view.php

wink

http://monstracreative.com - themes, plugins and snippets for monstra cms

:: ATTENTION ::
Need help? Login at your account at: http://monstracreative.com/users/login. -> You have a excellent support center at our website! wink

wormsunited's Website