·
Added a discussion

Developer> Data Items> System> Content filter

Sixth and seventh has been added.

In Token, it appears to only show five to choose. Bug or how can we uncapped for sixth or more to choose?

  • 549
  • 1
Comments
    • You will need to adjust the file "BxBaseServiceProfiles.php" located in /template/scripts

      The function you need to make edits in is called "serviceIsAllowedCfilter", the trigger for these to get exposed is within the switch case function:

             switch($iValue) {
                  case 1:
                      $iResult = $iValue;
                      break;
      
      
                  case 2: 
                      if($iAge >= 6)
                         $iResult = $iValue;
                      break;
      
      
                  case 3:
                      if($iAge >= 13)
                         $iResult = $iValue;
                      break;
      
      
                  case 4:
                      if($iAge >= 17)
                         $iResult = $iValue;
                      break;
      
      
                  case 5:
                      if($iAge >= 21)
                         $iResult = $iValue;
                      break;
              }
      

      Add in more like so:

      case 6:
            if($iAge >= 31)
              $iResult = $iValue;
            break;
      

      This means that whatever is the ID 6 (the 6th listed in the CF), whoever is at the age of 31 or older will get to select this option.

      Note, after making edits, users will need to manually update their date of birth, because of how this faulty feature is setup.

      • Now have eight.

        Thank you!

        • @LoneTreeLeaf - have you tracked this back to a service call? Meaning, instead of manually making users redo birthdate, in my customs module I want to call the 'reset' for this.

          Did you tack it back to a service?

          @LeonidS do you know what service I can call to have the ratings adjusted again, without setting birthdate again?

          Thank you 🙏

          • It has something to do with the profile fields update, as for which one I have no clue as I didn't dig that far into CF code. I'm sure there's a trigger that happens when a user saves their profile information and the CF rechecks the date of birth for changes. There also as to be another detection for untouched DoB but the user AGES to the correct age to unlock more CF settings, as for where to begin looking for that.... no clue.

            The strings that tie the CF feature together is that of a spiderweb, a very maze-like spiderweb.

            Login or Join to comment.