Custom site registration

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
12/20/2010 5:31:27 PM
Gravatar
Total Posts 6

Custom site registration

Hi,

I would like to implement my own Registration page, as I would like to add custom features to the page, which I don't think the in-built version supports (things like FB auth etc).

How would I go about doing this?

From delving into the code, it looks like I need to create my own Register.aspx in my own project and update layout.master to use this. But does this mean that I will also have to store User details in my own DB? Will I still be able to use roles?

 

Thanks very much in advance :)

 

12/20/2010 6:16:33 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Custom site registration

Joe will be able answer this better than I can, but as far as I know, the only supported "customization" for the registration page is the optional registration agreement text you can use. If by "FB auth" you mean Facebook authentication, a number of other security pages would have to be modified in addition to registration, and site settings would almost certainly need to be stored, and then you are looking at a serious fork of the code, which is very much not recommended--you'll lose the ability to upgrade your sites without an error-prone re-merge of your customizations each time.

Besides the built-in database authentication, mojoPortal supports LDAP, database with fallback to LDAP, Windows Live, and Open ID authentication. I don't know if Joe wants to add even more authentication options, because each additional method adds another layer of complexity, but I'll let him speak to that. If he is interested, it may be that you can work with him to get your Facebook authentication code integrated into the mojoPortal core and thereby avoid the whole forking issue. angel

Jamie

12/20/2010 6:23:21 PM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Custom site registration

Let me add that I did just see a key in web.config "LoginPageRelativeUrl". This is there to allow you to create your own completely custom login page and perform whatever login logic you want to use. Maybe there is already a similar key for registration, or if not Joe could create one. That way you could make a stand-alone custom registration and login page and not affect the core, if that's the way you want to go.

Jamie

12/20/2010 6:47:17 PM
Gravatar
Total Posts 6

Re: Custom site registration

that sounds like what I want.

if i do go down that route, would i still be able to have mojoportal handle the persistance for me?

my thoughts are to use Joe's regsitration page as a base line and use the custom property feature to add additional fields to the form. i think i can store any additional info in invisible controls, but still have mojo persist it. does this sound feasible?

forking is not an option due to the huge cost of long term maintenance (thanks for your efforts Joe, love mojoportal)
.

12/20/2010 6:58:42 PM
Gravatar
Total Posts 18439

Re: Custom site registration

Hi,

We have support for Facebook and a lot of openid/oauth providers via RPX now called JanRain Engage.

If that does not meet your needs, I have a few suggestions that minimize forking issues.

First, I'm willing to make the Register link have configurable url so you could point it to a custom registration page and maybe a web.config setting to disable the built in one to prevent bypass of your custom one.

Another way that is feasible is to fork only the Registration.aspx page and/or Login.aspx page in a custom Web App project and use a post build event to replace ours with yours which inherit from your classes. Then you still need to always deploy your own custom build but you have not done any dangerous forking and can upgrade ok by pulling latest code from our repository and building it with your projects.

Hope that helps,

Joe

12/20/2010 7:06:00 PM
Gravatar
Total Posts 6

Re: Custom site registration

Thanks Joe, it would be great if you could make the link configurable.

Apologies, I wasn't clear on my original post. I want to add additional features like Facebook Connect, and maybe pre-populating the fields on the registration page with values from the FB graph.

Any thoughts on the DB persistance question?

 

Thanks.

12/20/2010 7:55:07 PM
Gravatar
Total Posts 6

Re: Custom site registration

Apologies, I have one more question.

I created a new project and some pages, and have setup a post-build script to copy the project DLL into the solutiondir/Web/Bin directory.

On debugging, I can't load the page from my browser (404 not found).

Am I doing something wrong? How do I create my own pages in VS and have mojoportal load them without making them part of a feature?

 

Thank you,

12/21/2010 7:48:33 AM
Gravatar
Total Posts 18439

Re: Custom site registration

You need to copy also your custom.aspx file(s) in the post build event.

Make sure you debug the mojoPortal.Web project not your own project, you will be able to step through your code and set break points but you can't debug directly from your site it has to run in the context of mojoPortal.

I've committed the change to the source code repository so the registration link is configurable from Web.config but this is only needed if you are not using the same url and overwriting our registration page with yours. Look in Web.config in th elatest code and you will see the settings.

As far as persistence it depends on your needs and how you need to be able to query the data. In some cases it may be best to make your own custom table join on UserID and/or UserGuid to mp_Users and add fields to your custom table for your properties. We do have a table mp_UserProperties where you can store custom key value pairs as strings. There are methods on SiteUser for SetProperty(propertName, propertyValue) and GetCustomPropertyAsString(propertyName). These are used by our built in customizable user profile. But again depending on how you want to query and display the properties it may be better to use a custom table than to use key value pairs.

Hope it helps,

Joe

12/22/2010 2:17:28 PM
Gravatar
Total Posts 6

Custom site registration

Thanks Joe,

Just have a question.

1. I've created a new project test.Web and created an aspx in there. Where do I copy the aspx file(s) to in the post-build event?

Is it to SolutionDir/Web/Data/Sites/1/ ?

I currently can't navigate to the page I just created when I run the solution as mojoportal.web as the startup proj.

 

 

 

You must sign in to post in the forums. This thread is closed to new posts.