• Possibility to use logical values. For example:

    __________________

    If the returned value (from another query) is greater than -1, show X

    [sv slug=”logic” rule=”>-1″ true=”X” false=”Illegal value”][sv slug=”sc-db-value-by-id” table=”money_balance” column=”value” column-to-search=”name” key=”chelminski” key-format=”%d” message-not-found=”none”][/sv slug=”logic”]

    __________________

    If the returned value (from another query) equals “moderator” then show X

    [sv slug=”logic” rule=”equal=moderator” true=”X” false=”Y”][sv slug=”sc-db-value-by-id” table=”perms_primary_group” column=”group” column-to-search=”name” key=”chelminski” key-format=”%s” message-not-found=”none”][/sv slug=”logic”]

    __________________

    If the returned value (from another query) starts with “goo” then show X

    [sv slug=”logic” rule=”start=goo” true=”X” false=”Y”][another sample shortcode][/sv slug=”logic”]

    __________________

    If the returned value (from another query) endswith “gle” then show X

    [sv slug=”logic” rule=”end=gle” true=”X” false=”Y”][another sample shortcode][/sv slug=”logic”]

    Where in the future I would like it to be possible, for example, to insert another shortcode in addition to plain text instead of X.

    If possible then logical values a bit like in Excel with support for shortcodes stuffed everywhere ???? E.g.

    check if [shortcode]=”test” then show “text”, if not then:
    check if [shortcode]=”admin” then show “text”, if not then:
    check if [shortcode]=”moderator” then show “text”, if not then:
    check if [shortcode]=”beta_tester” then show “text”, if not then:
    check if [shortcode]=”user” then show “text”, if not then:
    show “LOG IN!”

    In the future, it can be expanded with many other elements, such as:

    • Whether it contains text
    • Does it have the right number of letters?
    • Value comparison, whether one value equals another (e.g. 2 shortcodes)
      Others that don’t come to mind right now

    Would it be possible to implement something like this?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Logical values’ is closed to new replies.