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.

Discussion Boards  (Mono Support )

Viewed 7611 time(s), 11 post(s) 10/17/2012 7:46:09 AMby johnsamuel
johnsamuel

johnsamuel

10/17/2012 7:46:09 AM
Hi, pl tell me where the setting is to enable all users to add a new discussion topic. We want all users to be able to start a new topic. Thanks
This content has not been rated yet. 
429 Reputation 46 Total posts
khorvat

khorvat

10/17/2012 8:05:52 AM
Hi,

I'm not sure on what are you referring but all registered users should be able to create new topics, can you please provide us with more details ?

Thanks 
This content has not been rated yet. 
15993 Reputation 2214 Total posts
johnsamuel

johnsamuel

10/17/2012 8:29:13 AM
Thanks,
On the set up as we have it when a User clicks Forums (we renamed Discussions) two buttons appear above the discussions: New Topics and Topics you participated in. We want to see another button called "Add topic". i.e. we want the user to be able to add a new topic and for it to be published immediately. (Just now only an administrator can add a topic).
This content has not been rated yet. 
429 Reputation 46 Total posts
khorvat

khorvat

10/17/2012 1:55:56 PM
To get the "Open new topic" button you will have to go into a certain Discussion board (Forum) to get it, after you have navigated there you - member should be able to create a new topic.

Please confirm ?
This content has not been rated yet. 
15993 Reputation 2214 Total posts
johnsamuel

johnsamuel

10/18/2012 5:51:32 AM
Thanks Khorvat but the question is different. We want Users to create new Discussion boards (Forums) on new subjects which they nominate. We don't want any Admin leading this. Thanks
This content has not been rated yet. 
429 Reputation 46 Total posts
khorvat

khorvat

10/18/2012 9:34:41 AM
Sorry for misunderstanding but your question stated "... is to enable all users to add a new discussion topic ..." although the Topic title is different.

Ok, there is a way to do so by adding Registered, or Users role (which every you use for your registered users) to web.config setting called DiscussionAdministratorRoles. Downside of  this approach is that everybody would have administrative permission on every board in the system. One other approach would be to amend DiscussionBoard WebPart and override permissions for "Add new discussion board", a bit more work but with this approach you can accomplish exactly what you are looking for.

Let me know how would you like to proceed?

Regards

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

johnsamuel

10/18/2012 3:13:59 PM
Thanks, I'm looking for settings which enable the override permissions for "Add new discussion board" but cannot see this. Are you expecting this change to be made in the source code?
This content has not been rated yet. 
429 Reputation 46 Total posts
khorvat

khorvat

10/19/2012 7:23:51 AM
Yes, you should make that change in the source code. So you should have build your own custom solution and you need to inherit DiscussionContainer.ascx (visually) & DiscussionBoard.ascx (visually and in source code), then you should point to your DiscussionBoard.ascx and not MonoX's in the DiscussionContainer.ascx.

From:
<%@ Register TagPrefix="MonoX" TagName="DiscussionBoard" Src="/MonoX/ModuleGallery/SocialNetworking/Discussion/DiscussionBoard.ascx" %>
<%@ Register TagPrefix="MonoX" TagName="DiscussionTopic" Src="/MonoX/ModuleGallery/SocialNetworking/Discussion/DiscussionTopics.ascx" %> 
<%@ Register TagPrefix="MonoX" TagName="DiscussionMessages" Src="/MonoX/ModuleGallery/SocialNetworking/Discussion/DiscussionMessages.ascx" %> 
 
To:
<%@ Register TagPrefix="MonoX" TagName="DiscussionBoard" Src="/YourProject/Discussion/DiscussionBoard.ascx" %>
<%@ Register TagPrefix="MonoX" TagName="DiscussionTopic" Src="/MonoX/ModuleGallery/SocialNetworking/Discussion/DiscussionTopics.ascx" %> 
<%@ Register TagPrefix="MonoX" TagName="DiscussionMessages" Src="/MonoX/ModuleGallery/SocialNetworking/Discussion/DiscussionMessages.ascx" %>
Now you should override the OnPreRender and set the btnNewBoard visibility.

Let us know if you need more information regarding this.

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

johnsamuel

10/19/2012 9:48:34 AM
Thanks Khorvat, We don't have the full source code. Our first client has very limited budget and we cannot justify purchase of the full code as this time. Can you provide the code behind the discussion module so we can make this change ourselves. Thanks
This content has not been rated yet. 
429 Reputation 46 Total posts
GeorgeBirbilis11

GeorgeBirbilis11

10/19/2012 2:50:34 PM
I don't think you need the sourcecode to do inheritance like suggested above

you just need to make your own ascx (user control) as a copy of the original one (that ASP.net markup file contents are available in MonoX to see edit) and chane the aspx (page) to use it instead of the original one (can edit the page markup to do that as shown above) and also tell the .ascx (in its markup) to use your own codebehind C# class that descends from the original codebehind class of MonoX. I guess in the source code you have to override some method and after (or before, depends on the case) calling the ancestor method (sometimes some initialization method) to do your own extra stuff
This content has not been rated yet. 
0 Reputation 3 Total posts
1 2