SilverStripe 2.4 API Docs
  • Package
  • Class
  • Tree
  • Deprecated
Version: master
  • master
  • 3.1
  • 3.0
  • 2.4
  • tagfield

Packages

  • cms
    • assets
    • batchaction
    • batchactions
    • bulkloading
    • comments
    • content
    • core
    • export
    • publishers
    • reports
    • security
    • tasks
  • forms
    • actions
    • core
    • fields-basic
    • fields-dataless
    • fields-datetime
    • fields-files
    • fields-formatted
    • fields-formattedinput
    • fields-relational
    • fields-structural
    • transformations
    • validators
  • installer
  • None
  • PHP
  • sapphire
    • api
    • bulkloading
    • control
    • core
    • cron
    • dev
    • email
    • fields-formattedinput
    • filesystem
    • formatters
    • forms
    • i18n
    • integration
    • misc
    • model
    • parsers
    • search
    • security
    • tasks
    • testing
    • tools
    • validation
    • view
    • widgets

Classes

  • Akismet
  • CommentAdmin
  • CommentTableField
  • CommentTableField_Item
  • CommentTableField_ItemRequest
  • MathSpamProtection
  • PageComment
  • PageComment_Controller
  • PageCommentInterface
  • PageCommentInterface_Controller
  • PageCommentInterface_Form
  • SocketWriteRead
  • SSAkismet

Class MathSpamProtection

Tools for adding an optional Maths protection question to a form.

Package: cms\comments
Located at cms/code/sitefeatures/MathSpamProtection.php

Methods summary

public static String
# getMathQuestion( )

Creates the question from random variables, which are also saved to the session.

Creates the question from random variables, which are also saved to the session.

Returns

String
public static
# correctAnswer( mixed $answer )

Checks the given answer if it matches the addition of the saved session variables. Users can answer using words or digits.

Checks the given answer if it matches the addition of the saved session variables. Users can answer using words or digits.

public static
# digitToWord( mixed $num )

Helper method for converting digits to their equivelant english words

Helper method for converting digits to their equivelant english words

public static
# isEnabled( )
public static
# setEnabled( mixed $math = true )

Magic methods summary

Comments

Comment policy: Please use comments for tips and corrections about the described functionality. Comments are moderated, we reserve the right to remove comments that are inappropriate or are no longer relevant.
Use the Silverstripe Forum to ask questions.
blog comments powered by Disqus
SilverStripe 2.4 API Docs API documentation generated by ApiGen 2.8.0