Jump to:

1036 Posts in 810 Topics by 315 members

Forum Module

SilverStripe Forums » Forum Module » Implementing Point System

Discuss the Forum Module.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1372 Views
  • zenmonkey
    Avatar
    Community Member
    528 Posts

    Implementing Point System Link to this post

    I'm trying to implement a point system into the form module, so that users would gain or spend points when posting to certain forums. I've added a 'Points' field to the extraStatistics function. However adding a Default value has no effect, nor does changing the value in the Edit Member Popup.

    Did I add this field tot the wrong function?

    Here is the code

    function extraStatics() {
          $fields = array(
             'db' => array(
                'ForumRank' => 'Varchar',
                'Occupation' => 'Varchar',
                'Company' => 'Varchar',
                'City' => 'Varchar',
                'Country' => 'Varchar',
                'Nickname' => 'Varchar',
                'FirstNamePublic' => 'Boolean',
                'SurnamePublic' => 'Boolean',
                'OccupationPublic' => 'Boolean',
                'CompanyPublic' => 'Boolean',
                'CityPublic' => 'Boolean',
                'CountryPublic' => 'Boolean',
                'EmailPublic' => 'Boolean',
                'LastViewed' => 'SSDatetime',
                'Signature' => 'Text',
                'Points' => 'Int'
             ),
             'has_one' => array(
                'Avatar' => 'Image'
             ),
             'belongs_many_many' => array(
                'ModeratedForums' => 'Forum'
             ),
             'defaults' => array(
                'ForumRank' => _t('ForumRole.COMMEMBER','Community Member'),
                'Points' => '5'
             ),
             'searchable_fields' => array(
                'Nickname' => true
             ),
             'indexes' => array(
                'Nickname' => true,
             ),
          );
          
          return $fields;
       }

  • johnmblack
    Avatar
    Community Member
    61 Posts

    Re: Implementing Point System Link to this post

    We are also looking for something like this. Has anyone had any success? Are there any existing mods out there already?

    1372 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.