MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Auto Add New Member to Group  (Mono Support )

Viewed 15015 time(s), 6 post(s) 6/21/2014 11:06:21 PMby JulianMummery
JulianMummery

JulianMummery

6/21/2014 11:06:21 PM

Hi,

I would like to automatically add all new members to a group.

The idea is that my site will only have one public group that will be one massive public wall.

The easiest way I can think of achieving this is by creating a trigger on the SQL Server database which will create the right links in the tables.

Can you think of an easier way to achieve this?

Thanks

This content has not been rated yet. 
35 Reputation 4 Total posts
khorvat

khorvat

6/22/2014 7:14:32 AM
Hi,

 Yes that is one option if you don't want to get into development.

BTW if you will have only one group and it will be public why use groups at all? Can you clarify a bit?

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts
JulianMummery

JulianMummery

6/22/2014 2:51:38 PM

Hi Khorvat,

Thank you for your reply.

The reason I thought  that a group would be better is because I want everyone to automatically be friends with everyone else. e.g. 200 group members and then someone new registers and straight away has 200 friends as part of the group.

I could develop this myself but just wanted to save time really.

It mat help if I explain what I am trying to achieve in the long term.

I ultimately want my potential user base to be able to upload an images or images with optional comments so that it gets added to a never ending list of posts for everyone to see. So in effect it would be like one public wall where everybody is automatically friends with everyone else. Like a club if you like. At the moment the wall has comments as the main thing with an option of uploading a file. I would need it around the other way with it being mandatory that image(s) are used with optional comments. I guess that means getting down and dirty with the code which is fine but would I need to purchase a special licence in order to make these kind of changes.

Kind Regards

Julian 

This content has not been rated yet. 
35 Reputation 4 Total posts
JulianMummery

JulianMummery

6/22/2014 3:05:28 PM
Just seen the price of the source code edition. There is no way I can afford $2999 for what is a hobby project. Shame.
This content has not been rated yet. 
35 Reputation 4 Total posts
mzilic

mzilic

6/22/2014 4:08:27 PM
Hello,

If your goal is to add only users to a group when registering you wouldn't need a source code license edition. For a start you would need to setup a custom based MonoX project and learn how to build custom web parts. Links for the relevant blog posts:
http://www.mono-software.com/blog/post/Mono/95/Building-a-custom-ASP-NET-project-based-on-MonoX/
http://www.mono-software.com/Blog/post/Mono/93/Building-a-custom-Web-part/

After you've read the following you should simply inherit the MonoX membership editor and add any post registration actions in there. I recommend registering an AccountCreationCompleted event handler and inserting custom logic in there.

protected override void OnInit(EventArgs e)
{
   base.OnInit(e);
   base.AccountCreationCompleted += new EventHandler(ctlMembership_AccountCreationCompleted);
}
   
void ctlMembership_AccountCreationCompleted(object sender, EventArgs e)
{
  // insert post account creation logic here
}
Regards,
Mario
This content has not been rated yet. 
2218 Reputation 300 Total posts
JulianMummery

JulianMummery

6/22/2014 11:38:40 PM

Thank you :::Mzilic:::

I will look into that and let you know how I get on :) sounds like just the thing.

Kind Regards

Julian

This content has not been rated yet. 
35 Reputation 4 Total posts