Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...Some questions on modulesSome questions on modules
Previous
 
Next
New Post
7/7/2011 8:19 AM
 
Why couldnt you just increment the value of the field up or down in the database after its created?
Say you create the new PropertyDefinition and the PropertyDefinitionID is 31 for arguments sake, you would create a stored procedure which would do a select of where username is "userID" and Propertydefinition ID is 31, then put that value in a variable, increment it by one then do an update back into that field with the new value.

For decrementing you may want to do a seperate stored procedure.

You would then need to call these stored procedures from wherever your user is clicking. I assume you are developing a custom module and will have this Karma button?
 
New Post
7/7/2011 8:22 AM
 
While it doesn't meet your 'exact' requirements (ie: Karma pts) ... take a look at the Repository module, it allows users to upload files/articles and then allows other users to rate and comment on the items.  It also includes a companion Repository Dashboard module that you can use to display top rated items, categories of items, etc.  It might be easier to extend the Repository Dashboard module, adding a new mode, to query the database and display top rated users, rather than start from scratch

Module info, downloads, documentation
http://dnnrepository.codeplex.com/

If you have any questions, let me know

 
New Post
7/7/2011 12:30 PM
 
That's very easy to accomplish.

UserInfo objUserInfo = UserController.GetCurrentUserInfo();
if (objUserInfo != null)
            {
    //here is how to get property
    ProfilePropertyDefinition ppd = objUserInfo.Profile.GetProperty("KarmaPoints");
            if(ppd != null)
            {
                myKarmaControl.Text  = ppd.PropertyValue;
            }

            //here is how to set property
           objUserInfo.Profile.SetProfileProperty("KarmaPoints", myKarmaControl.Text);
            }

Ash Prasad
Director of Engineering
DNN Corp.
 
New Post
7/7/2011 12:38 PM
 
Thanks everyone.

I'll check that Repository module out Steve, looks very useful.
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...Some questions on modulesSome questions on modules


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out