YAF and MojoPortal (integration)

This is a forum to suggest new features for mojoPortal. 

This thread is closed to new posts. You must sign in to post in the forums.
9/9/2011 9:22:44 AM
Gravatar
Total Posts 18439

Re: YAF and MojoPortal (integration)

Hi Bob,

The idea with the event handlers is not that they would be triggered from within the module, they would be triggered when a user registers or when a user edits his profile. You would just implement a class that inherits from UserRegisteredHandlerProvider and implement the override for UserRegisteredHandler, then you create an xml file that declares your handler and drop it in the /Setup/ProviderConfig/userregisteredhandlers folder. In the method you would do whatever you  need to do to sync that user for YAF.

The article has example code you could copy and modify.

Currently we only have the plugin model for user registered but it would not be difficult for me to make similar plugin system for user profile changes.

This would be much more efficient than polling tables for changes.

Best,

Joe

9/9/2011 4:50:45 PM
bob
Gravatar
Total Posts 126
YAF developer

Re: YAF and MojoPortal (integration)

Hi, Joe.

It doesn't work for me, I've already did it. Anyway, I've made an onload profile sync so far, anyone can modify it to disable. But there's an onbtrusive sync for DisplayNames and Timezones which are not a part of YAF Profile.

I've checked it - it works fine on my online portal. Only the Active Discussions control will be a bit later when I'll figure out how to hook a module setting with BoardId from a different page for a different module and cope with styling in my standalone module as it works only in standard UI.Features for me so far.

I didn't test it on folder sites as can't launch it on Postgre due to errors chain which I can't trace after a GetSiteIdByFolder method throwing a very strange error in my 9.0.1 at any rate.

I can't see any problems in the source code publishing it works fine with some minor limitations. Will make it tomorrow after some code cleaning and documenting.

Best regards, bob.

 

 

9/10/2011 2:34:41 PM
bob
Gravatar
Total Posts 126
YAF developer

Re: YAF and MojoPortal (integration)

Finaly the first public version of integration module code is here. Instructions are inside HOWTO.txt file. To use it you should know how to compile mojoPortal and add extra projects. Unfortunately I can't distribute a ready assemblies because of licence limitations. Feel free to make them yourself.  

http://github.com/vzrus/YAF-and-MojoPortal-Add-Ons

9/11/2011 4:08:25 PM
Gravatar
Total Posts 2

Re: YAF and MojoPortal (integration)

Hi Bob,

Just tried your solution but I have a problem with compiling YAF after replacing YAF.Providers. The error I get is in YAF.Providers\Profile\DB.cs, line 276: Error 4 No overload for method 'GetUser' takes 4 arguments.

And another one:
Error 5 Member 'YAF.Classes.Data.MsSqlDbAccess.GetCommand(string)' cannot be accessed with an instance reference; qualify it with a type name instead ...YAF.Providers\Profile\DB.cs 391 37 YAF.Providers.
This was easy to understand and fix, but not sure why this difference.

I'm using YAF-v1.9.6-BETA1-SRC, downloaded today, hope it's correct.

Any suggestions of what I probably do wrong? Thank you so much in advance!!

Another small question: YAF folder under mojoportal web folder must be included in the web project? (I suppose not because of already having the classes in YAF.dll)

I really hope I'll succeed with it, it will be great to have the users for both mojoportal and yaf, otherwise I'll probably create mojoportal public page only, and have YAF users only... Thanks again for you work and help!

I'm using the occasion to transmit thousands of thanks to Joe as well, we used mojoportal for one project and we're happy about it!


 

9/11/2011 4:59:40 PM
bob
Gravatar
Total Posts 126
YAF developer

Re: YAF and MojoPortal (integration)

Hi Bob,

Just tried your solution but I have a problem with compiling YAF after replacing YAF.Providers. The error I get is in YAF.Providers\Profile\DB.cs, line 276: Error 4 No overload for method 'GetUser' takes 4 arguments.

Hi, milady.

You should replace YAF file with the files in my YAF.Providers folder and replace sql scripts in the folder and after this YAF should compile fine.

The Membership and Roles are simply for compatability as there are a peices of code which are related to them. You can use any standard profile provider which depends on MP or independent from other providers(generic one). I simply put an ad-hoc sample, as I use postgre database. But I've tested it with pure YAF. 

And another one:
Error 5 Member 'YAF.Classes.Data.MsSqlDbAccess.GetCommand(string)' cannot be accessed with an instance reference; qualify it with a type name instead ...YAF.Providers\Profile\DB.cs 391 37 YAF.Providers.
This was easy to understand and fix, but not sure why this difference.

I use my custom provider so some code could in theory to creep in. I'll check it next week with MS SQL if I have time.

Another small question: YAF folder under mojoportal web folder must be included in the web project? (I suppose not because of already having the classes in YAF.dll)

No. Onle YAF.Mojo and YAF.Mojo.UI.

 

I really hope I'll succeed with it, it will be great to have the users for both mojoportal and yaf, otherwise I'll probably create mojoportal public page only, and have YAF users only... Thanks again for you work and help!

Really - it's very easy when you have an experience. I can update it on the fly. I simply compile new YAF code and I'm sending files by FTP to mojo site right from YAF solution.

Warning! Don't create more then 1 board on a live site, the multiple boards on MojoPortal are not yet tested well

 

9/11/2011 5:50:33 PM
Gravatar
Total Posts 2

Re: YAF and MojoPortal (integration)

Hi Bob,

Thank you so much for your fast answer!

I'm sorry I'm not so good with it and I'm still not sure about the version of the YAF.Providers, in the end I tried also with the providers coming with YAF-v1.9.6-BETA1-SRC (so I think I replaced only the sql scripts before compiling, then I followed the rest of the instructions) and it seems working fine. I configured YAS as a mojoportal module, I added it in a test page and the first few tests were all successful, signing in or creating a new user in mojoportal seem to work perfectly applying also to the forum. I'll go back to the providers issue in case I notice problems during the future tests. I'll keep you updated.

You are right, it was really easy, even for me :)

Thank you very much again, have a great evening!!

9/11/2011 8:15:31 PM
bob
Gravatar
Total Posts 126
YAF developer

Re: YAF and MojoPortal (integration)

Hi, milady.

It's a VS plugin fault, it's a really messy code. I'm in two minds why it could happen.  Now it should work. Check it.

Best, bob.

1/12/2012 12:53:19 PM
Gravatar
Total Posts 125

Re: YAF and MojoPortal (integration)

Hi, thank you for this.

I finally make the yaf working with mojo and it looks pretty good actually. Only one problem so far. Whenever I enable the url rewrite for the Yaf module, the mojo skin seems disappear. the site only shows something like the default skin for a yaf module.

 

1/19/2012 12:43:00 AM
bob
Gravatar
Total Posts 126
YAF developer

Re: YAF and MojoPortal (integration)

The problem with url rewriting is that it's rather raw and I don't have time to remake it. I'm planning to revamp it a bit in the end of the month and still don't recommend to use it so far.

1/19/2012 1:29:07 AM
Gravatar
Total Posts 125

Re: YAF and MojoPortal (integration)

I disabled the url rewrite and it works well. Expecting a new release of yaf-mojo module.

Thanks

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