Buck Anderson - DNN Professor Member Login
February 08, 2012

Article Search  
Article Index

Click to grab the RSS feed for the DNN Professor Article IndexDotNetNuke Tutorials and Articles

We cover a lot of different DNN topics on this site - this article index gives you a pretty good idea of the DotNetNuke tutorials, XMod tutorials, DNN training, DNN hosting, and Internet Marketing subjects we cover for beginners and advanced DotNetNuke users.

The following is a complete index of all articles on this site - presented in the most current to oldest article sequence. You can view categories and search the index by subject.

Check back often for new articles, tips on our Business Directory, or have articles conveniently delivered to your favorite program by clicking the RSS feed icon above.


Share    
30
Understanding the Xmod AddUserPicker Control

In most of our DNN Professor XMod applications, we create an Administration panel on the top of the XMod form.

 This is accomplished by adding the Xmod form control named panel .

The control has an attrbute named showroles. The showroles attribute is set to specific DNN security roles that have permission to view this section of the form.

An example of this would be showroles="Administrators,Editors"

Among panel options that are specific to each of our applications is included the Xmod control.

XMod adduserpicker control

Our users find it very useful for the purpose of initially propagating listings and then assigning these listings to a specific user. Once the listing is assigned to a user, that user now has control to edit the listing.

The control has an attribute named roles. By default it will return all registered users on your DNN portal.

In most cases this is not an issue. But, consider a site that has over 30,000 registered users. Every time that a form is initiated to add a new listing or update a listing the database has to traverse all 30,000 users. This can create quite a penalty in form load time.

In most cases, you have not assigned all registered users to have the ability to add listings. For example, in our Business Directory application, most users assign Administrators and one additional security role to have this ability. This security role assignment is on the security tab when you opt to Configure Xmod Module from the Xmod module action menu.

XMod security settings

By setting the roles attribute to only return users that match the roles with permission to add records, you can greatly reduce the load time of the control.

Here's how:

By default the roles attribute is set to roles=""

An example of a basic control setup would look like this:

adduserpicker ref="AddUser" displayfield="userfullname" roles=""

Change the roles attribute to only return a subset of users.

adduserpicker ref="AddUser" displayfield="userfullname" roles="Subscribers"

You can additionally add additional roles to this attribute by separating the roles using a comma.

adduserpicker ref="AddUser" displayfield="userfullname" roles="Subscribers,Editors,Administrators"

You would also have the option of removing the control from the form but the ability to assign the record to another user would no longer be available.

To learn more about the control  click here.

To learn more about XMod productivity using DNN Professor applications click here.

Enjoy,
Buck

Posted in: XMod Applications

Share    

Post Rating

Comments

Peter Schotman
Wednesday, November 04, 2009 2:26 AM
Two nice new trick I learned in this blog, thanks!

Join the Discussion!


Buck Anderson - DNN ProfessorLet us know what you think. Or ask us anything. Or offer your own sage advice.

The only rule: RESPECT THIS HOUSE! Postings that contain abusive language and/or personal attacks will be cheerfully VAPORIZED. One cross word and – POOF! – your well-thought-out post will be gone in a puff of smoke.

          Buck

RSS comment feed RSS feed for comments on this post | Permalink URL

Note: For security, public comments require an Email address (Email will not be published and is also used for your Gravatar image)

Post Comment

Only registered users may post comments.


Copyright 2004 - 2012 by Jive Media Group LLC. All Rights Reserved.  | Terms of Use | Privacy Statement | Email White Listing | Site Map