1. April Fools Day Sale starting today through Sunday April 2nd.
    $15 discount on all licenses. $10 discount on 1 year support/downloads extensions.
  2. REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Updated Minor code change to NFLJ_Showcase_DataWriter_Item

Discussion in 'Showcase Closed Suggestions' started by joec, Feb 21, 2018.

  1. joec

    joec New Member AMS Premium SC Premium

    We've written an addon that extends Showcase to allow fractional ratings. This was mostly straightforward, except for a very minor change we needed to make to NFLJ_Showcase_DataWriter_Item that couldn't be accomplished except by copy-pasting an entire method in our addon. We're hoping you'll adopt this change into Showcase, since it marginally improves extensibility and is arguably better style.

    The change: in the first SQL query within NFLJ_Showcase_DataWriter_Item::updateRating, replace SUM(rating) with COALESCE(SUM(rating), 0).

    That query currently works fine without the COALESCE because XenForo_DataWriter automatically converts null int/uint values to 0. But since we changed rating to a float, that implicit conversion no longer happens and we'd get exceptions on items with no ratings.
     
  2. Bob

    Bob Developer Staff Member

    Im super busy with XF2 stuff right now, so this will have to wait until I can find time to work on XF1 stuff.
     
  3. Bob

    Bob Developer Staff Member

    as per request...

    Selection_586.png
     
  4. joec

    joec New Member AMS Premium SC Premium

    Just noticed this. Much appreciated!
     
    Bob likes this.
  5. Bob

    Bob Developer Staff Member

    Anytime :)
     
  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.