Skip to content

Releases: DivanDesign/EvolutionCMS.snippets.ddIf

Version 2.3.1

03 Jun 13:22
Compare
Choose a tag to compare
  • * Compatibility with PHP < 8.
  • * Parameters → trueChunk, falseChunk → Placeholders: The following have been renamed (outdated names are still supported, but are not recommended):
    • * [+snippetParams.operand1+][+ddIfParams.operand1+].
    • * [+snippetParams.operand2+][+ddIfParams.operand2+].
    • * [+snippetParams.operator+][+ddIfParams.operator+].

Version 2.3

03 Jun 02:14
Compare
Choose a tag to compare
  • + Parameters → operator → Valid values → 'isIncludes': The new valid value. Case-sensitive check if operand1 contains operand2 (see README → Examples).
  • * \ddTools::getTpl is used instead of $modx->getTpl (means a bit less bugs).
  • * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.60 is required.

Version 2.2

30 Apr 14:03
Compare
Choose a tag to compare
  • + Parameters → operator:
    • + Added the ability to check if operand1 is just white space (see README).
    • + Values are case insensitive.
  • + README → Documentation → Installation → Using (MODX)EvolutionCMS.libraries.ddInstaller.

Version 2.1

27 Apr 17:58
Compare
Choose a tag to compare
  • * Attention! PHP >= 5.6 is required.
  • * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.49.1 is required.
  • + Parameters → placeholders: Can also be set as HJSON.
  • + You can just call \DDTools\Snippet::runSnippet to run the snippet without DB and eval (see README → Examples).
  • + \ddIf\Snippet: The new class. All snippet code was moved here.
  • + Composer.json → support.

Version 2.0

20 Jan 11:53
Compare
Choose a tag to compare
  • * Attention! Backward compatibility is broken.
  • - Parameters → trueString, falseString: The deprecated parameters are no longer supported.
  • * Parameters → trueChunk, falseChunk: The following available placeholders were renamed:
    • * ddIf_operand1 → snippetParams.operand1.
    • * ddIf_operand2 → snippetParams.operand2.
    • * ddIf_operator → snippetParams.operator.
  • + Snippet result was added to debug log message.
  • + Improved style of debug log message.
  • * Refactoring:
    • * The $params variable is used instead of a standalone variable for each parameter.
    • * \DDTools\ObjectTools::extend is used to set parameters defaults.
  • + README → Links → Packagist.

Version 1.7.1

08 Oct 09:19
Compare
Choose a tag to compare
  • * Parameters → operand1: Improved an empty unparsed placeholder recognition.

Version 1.7

28 Sep 13:59
Compare
Choose a tag to compare
  • * Attention! (MODX)Evolution.libraries.ddTools >= 0.40.1 is required (not tested with older versions).
  • + Parameters → placeholders: Nested arrays are supported too.
  • + README.
  • + README_ru.
  • + CHANGELOG.
  • + CHANGELOG_ru.
  • + Composer.json.

Version 1.6

28 Sep 13:59
Compare
Choose a tag to compare
  • + Parameters → trueChunk, falseChunk: Added few placeholders:
    • + [+ddIf_operand1+] — contains operand1 value.
    • + [+ddIf_operand2+] — contains operand2 value.
    • + [+ddIf_operator+] — contains operator value.

Version 1.5

28 Sep 13:58
Compare
Choose a tag to compare
  • + Parameters → debugTitle: The new parameter. If you need to debug just set it and watch the System Event log.
  • + Parameters → operand1: If is equal to something like [+somePlaceholder+] the snippet interpretate it as ''. It's convenient when placeholders were not parsed for any reason.

Version 1.4

28 Sep 13:58
Compare
Choose a tag to compare
  • * Attention! PHP >= 5.4 is required.
  • * Attention! (MODX)Evolution >= 1.1 is required.
  • * Attention! (MODX)Evolution.libraries.ddTools >= 0.18 is required.
  • + Parameters → placeholders: Added JSON and Query string support. The old format is still supported but deprecated.
  • + Parameters → trueChunk, falseChunk: Added support of the @CODE: keyword prefix.
  • - Parameters → trueString, falseString: Are deprecated (use @CODE: prefix instead). Backward compatibility is preserved with message to the CMS Event log.
  • * Small optimization and other changes.