Using custom modal login

Permalink
Hello all

I am wanting to use a custom modal popup for login in to a client area. I will be setting the username within the launch page which I plan to parse into a hidden input field to for the username. All the users will be faced with is the password field and the 'Go' button. I then want it to go to a specific page which again I can parse the URL if I need to.

I want to use the C5 core login process for simplicity and security.

Any ideas how I can integrate this please without going to the full page login screen?

dclmedia
 
mnakalay replied on at Permalink Reply
mnakalay
You could download and modify one of the free login blocks available on the marketplace.
dclmedia replied on at Permalink Reply
dclmedia
I've downloaded one, but I am struggling to work out how to integrate it. I have the main page herehttp://dev.dclmedia.co.uk/simonlatimer.com/client-area... and the idea is to click on one of the icons and the modal box to pop up. I am using Javascript to do this at the moment, but most of the login core is in C5 PHP.
mnakalay replied on at Permalink Reply
mnakalay
on your site what you have right now are alerts, not popup so I don't know if it's intentional or just a test.

Why don't you try this packagehttp://www.concrete5.org/marketplace/addons/login-dialog... it's already working with a popup?
dclmedia replied on at Permalink Reply
dclmedia
The alert is a test just to see if I could parse the variables that I want (URL to go to and the username for login). I've downloaded that app, but having a complete black in how to integrate it. I can modify it to give me what I want just cannot think how to integrate it to get it to do what I want. I've been away from C5 for about a year and really frustrated that I have forgotten something that is probably quite simple and basic!

Any advice you can give will be greatly appreciated.
mnakalay replied on at Permalink Reply
mnakalay
I'm sorry, I'm not sure I understand "I can modify it to give me what I want just cannot think how to integrate it to get it to do what I want"

What exactly is the issue?
dclmedia replied on at Permalink Reply
dclmedia
Where do I place the login-dialog block to make it work? When I say about modifying it, I can pre-populate and hide the username field so only the password field is visible to the user.
mnakalay replied on at Permalink Reply
mnakalay
Well, it's a block so you put it anywhere you want on any page.
dclmedia replied on at Permalink Reply
dclmedia
Maybe I am being dumb, but I cannot get the block to launch when I click on one of the icons.
mnakalay replied on at Permalink Reply
mnakalay
I'm not following so let me ask you a few questions:
- Do you know how to put your page in edit mode?
- Were you able to add the block to the page and save?
dclmedia replied on at Permalink Reply
dclmedia
No worries. I know how to put the page into Edit mode, and can add the block and save it. I have tried putting it on the main page with the thumbnail links (the link I sent you) and have also tried to put in on the pages I am linking to (the protected ones) but it doesnt seem to call the block only ever goes to the standard C5 core login page.
mnakalay replied on at Permalink Reply
mnakalay
I think I finally understand what the problem is. It seems the block is not loading the dialog script required for it to work.

Try this. In the file login_dialog\blocks\login_dialog\controller.php add this function
public function registerViewAssets($outputContent = '')
{
    $this->requireAsset('jquery/ui');
}