Create my own component/feature

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.
9/26/2010 3:56:17 PM
Gravatar
Total Posts 5

Create my own component/feature

How do I go about creating a custom feature that accesses the database on mojoportal? Here is my scenario:

I have a table that is a list of parks with some information and their coordinate location. Only a certain type of user can add, edit and delete these parks. On the park's page, only another type of user have access to certain hardcoded features, like commenting.

How do I integrate something like this with using mojoportal's permission/user system?

 

Thank you.

9/27/2010 7:20:36 AM
Gravatar
Total Posts 18439

Re: Create my own component/feature

Hi,

There are a lot of resources on this site to learn how to make a feature that plugs into mojoPortal and the mojoPortal source code is the definitive learning tool because you can see how other features are implemented.

We provide some basic role based permissions that allow you to give a role view or edit permissions at the page level and/or at the feature instance level. If you need more granular permissions like roles that can do X and roles that can do Y inside your feature, then you can add feature settings for each permissions and we have a control you can use to choose allowed roles. When developing features you can learn about our installation system and Feature Definition files which is where you declare custom settings for a feature. Here is an example snip of a feature definition file showing use of the AllowedRolesSetting.ascx:

<featureSetting
   resourceFile="STSEventCal"
   resourceKey="WillPayAllowedRolesSetting"
   defaultValue=""
   controlType="ISettingControl"
      controlSrc="~/Controls/AllowedRolesSetting.ascx"
      helpKey="sts-eventcal-AllowedRolesSetting-help"
      sortOrder="350"
   regexValidationExpression=""
   />

For more information

As far as data access, you can follow examples in mojoportal code or do whatever you want, like use LinqToSql or any approach to data access that you already know.

Hope it helps,

Joe

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