Using the custom Item Fields {$value} variable to for URLs and Buttons.

By Bob · Jul 6, 2016 ·
  1. Bob
    Im having trouble using the showcase item custom fields {$value} variable to for URLs and Buttons.

    Answer: instead of {$value} try either {$valueSC} or {$valueRaw} Showcase has 3 different "value" options.

    {$valueSC} within Showcase is the same as {$value} is in User fields, but NOT the same as {$value} is in the Resource Manager.
    {$valueRaw} in showcase is the same as {$valueRaw} is in the Resource Manager (and {$valueRaw} is not available in user fields).
    {$value} in showcase as same as {$value} in the Resource Manager (which is different than {$value} is in User Fields).

    SC: {$valueRaw} is the same as the XFRM
    SC: {$value} is the same as the XFRM
    SC: {$valueSC} is the same as {$value} is for User Fields.
    PHP:
    $valueRaw htmlspecialchars(XenForo_Helper_String::censorString($value));
    $valueSC nl2br(htmlspecialchars(XenForo_Helper_String::censorString($value)));
    $value XenForo_Template_Helper_Core::callHelper('bodytext', array($value));

    User Fields: {$value}
    User Fields: ($valueRaw) <--- no such thing
    PHP:
    $value nl2br(htmlspecialchars(XenForo_Helper_String::censorString($value)));

    XFRM: {$valueRaw} is similar, but not 100% the same as {$value} is within User Fields
    XFRM: {$value} is NOT the same as {$value} is within User Fields
    PHP:
    $valueRaw htmlspecialchars(XenForo_Helper_String::censorString($value));
    $value XenForo_Template_Helper_Core::callHelper('bodytext', array($value));

    Share This Article

    Kairete and cdub like this.

Comments

To make a comment simply sign up and become a member!
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.