dcb1101
  •  dcb1101
  • 55% (Neutral)
  • YAF Camper Topic Starter
2014-12-28T18:19:52Z
Hello,

I am using the default YAF login page with OAuth.
Once a user logs-in, I want it to redirect to a different page, rather then to the forum homepage. How can I do this?

Thank you

Sponsor
Zero2Cool
2014-12-29T15:06:43Z
I think you'll have to modify the source code to accomplish this.

If you download the source, look under the YAF project 'pages' directory and you'll see the 'login.ascx' file and check the code-bedind for the redirect.


Hope that helps ya.
dcb1101
  •  dcb1101
  • 55% (Neutral)
  • YAF Camper Topic Starter
2014-12-29T15:24:41Z
Thank you,

I can handle looking in the source and making the changes I need (i think), but I am not used to working with source codes. Can you please explain how I then make the changes to my site, using the undated source code, without having to re install YAF and loose settings, posts, etc.

Thank you!
Zero2Cool
2014-12-29T15:34:28Z
Originally Posted by: dcb1101 

Thank you,

I can handle looking in the source and making the changes I need (i think), but I am not used to working with source codes. Can you please explain how I then make the changes to my site, using the undated source code, without having to re install YAF and loose settings, posts, etc.

Thank you!



go here and download the source https://github.com/YAFNET/YAFNET  ... if you are not using the latest version, I would suggest finding the source code that is matching your version

the best way to change it is to use a config setting, but I'm not versed well enough with YAF to walk you through that lol... i would probably just hard code the change, do a build and then run the .bat file to make your packages. I think all you would need to do is replace the YAF.dll with the one you recently updated.

Zero2Cool
2014-12-29T16:05:54Z
Forget what I said. Is this what you are needing?

Check the Host Settings ...

Custom Login Redirect Url:
If login is disabled in the AppSettings (AllowLoginAndLogoff needs to be set to "false"), this is the URL users will be redirected to when they need to access the forum. Optionally add "" to the URL to pass the return URL to the custom Url. E.g. "http://mydomain.com/login.aspx?PreviousUrl={0}"
dcb1101
  •  dcb1101
  • 55% (Neutral)
  • YAF Camper Topic Starter
2014-12-30T13:31:44Z
Originally Posted by: Zero2Cool 

Forget what I said. Is this what you are needing?

Check the Host Settings ...

Custom Login Redirect Url:
If login is disabled in the AppSettings (AllowLoginAndLogoff needs to be set to "false"), this is the URL users will be redirected to when they need to access the forum. Optionally add "" to the URL to pass the return URL to the custom Url. E.g. "http://mydomain.com/login.aspx?PreviousUrl={0}"



Nope, you were right the first time. That setting is to send them to a different login page. I need to send them somewhere different once they login.

I have downloaded the YAF source, but the solution won't build........ 15 errors, missing DLL's. This is before I even made any changes.... Is the a problem with the source version on Git?


Zero2Cool
2014-12-30T13:38:00Z
Originally Posted by: dcb1101 

Originally Posted by: Zero2Cool 

Forget what I said. Is this what you are needing?

Check the Host Settings ...

Custom Login Redirect Url:
If login is disabled in the AppSettings (AllowLoginAndLogoff needs to be set to "false"), this is the URL users will be redirected to when they need to access the forum. Optionally add "" to the URL to pass the return URL to the custom Url. E.g. "http://mydomain.com/login.aspx?PreviousUrl={0}"



Nope, you were right the first time. That setting is to send them to a different login page. I need to send them somewhere different once they login.

I have downloaded the YAF source, but the solution won't build........ 15 errors, missing DLL's. This is before I even made any changes.... Is the a problem with the source version on Git?



Run the buildpackages.bat and that will build the necessary DLL's for you. I can't explain this, but that's what I have been doing with success.
logan
  •  logan
  • 100% (Exalted)
  • YAF Leader
2014-12-31T15:01:49Z
You should be able to add the DestinationPageUrl property to the login control.

http://msdn.microsoft.co...login.destinationpageurl 


test

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved