Standard Library by Xon

Standard Library by Xon 1.2.15

No permission to download
  • Add is_toggle_set template function and toggle-storage-ex backend for the XF toggle JS.
    The stock is_toggled does not allow setting the default value, while is_toggle_set does.
  • Example of a default collapsed node-list:
PHP:
<xf:js src="sv/lib/storage.js" addon="SV/StandardLib" min="1" />
<xf:set var="$isActive" value="{{ is_toggle_set($forum.node_id, false, 'node-toggle') ? ' is-active' : '' }}"/>
<div class="block block--collapsible-child-nodes">
    <div class="block-container">
        <h3 class="block-minorHeader collapseTrigger collapseTrigger--block {$isActive} "
            data-target=".block--collapsible-child-nodes .block-body"
            data-xf-click="toggle"
            data-xf-init="toggle-storage-ex"
            data-storage-type="cookie"
            data-storage-container="node-toggle"
            data-storage-key="{$forum.node_id}"
            data-default-value="0"
            >{{ phrase('sub_forums') }}</h3>
<div class="block-body toggleTarget {$isActive}">
...
</div
  • Avoid duplicate some join expressions multiple times when using optimized list query add-on
  • XF2.2.10 compat fix for "view template modifications" link not rendering
A number of helper utilities designed to ease add-on development, does not have any direct user-facing changes. See README.md for additional details.

Uploaded to the resource manager to aid dependency tracking and allow updating without updating every individual add-on.
  • Fix type-error when a collection is passed to the removeValue templater filter function
  • Remove outdated comment in EarlyJoinFinderTrait
  • Add isPermissionInUse install helper
  • Add SV\StandardLib\Behavior\Cacheable behavior, to help automate calling rebuildCache (or a defined function) on a repository which matches the entity's name
  • Use templater_setup code event to inject various filters/functions into multiple templater types.
    • Adds the extendable class SV\StandardLib\TemplaterHelper to help add filters/functions to templates without manualy extending every templater type
  • Add new template filters/functions
    • parse_less_func
    • abs
    • array_diff
    • sv_array_reverse => array_reverse
    • Backport phrase_dynamic function to XF2.1
  • Fix for using SqlJoinTrait and EarlyJoinFinderTrait together
  • Resolves compatibility issue when using Bump Thread and Optimized List Queries add-ons together
  • Fix 32bit support when detecting early-join behaviour (ie Optimize List Queries add-on)
  • Move helper features for extending forum/prefix filters into Standard Lib from a number of other add-ons
  • Fix triggering an error on /forums/1/page-9223372036854775807 when Optimized Query List add-on is used and php7+ type hinting is used
  • Fix "DevTools failed to load source map: Could not load content for .../js/sv/vendor/moment/moment.min.js.map"
Top