Resource icon

Standard Library by Xon 1.20.1

No permission to download
  • Add support for addon.json 'require'/'require-soft' to support addon version strings instead of the addon version_id.
    Uses version_compare under the hood after some very basic standardization.

    php version strings support dotted versions, '1.2.3' and also each part may also support special character strings:
    any string not found in this list < dev < alpha = a < beta = b < RC | Release Candidate = rc < # < patch level | pl = p.
Thanks to @NamePros for sponsoring this update
  • Add "patch_route_build_callback" code event, used to manipulate the router state during construction.
  • Add input filter option "empty-str-to-null". Example usage for developers:
    PHP:
    $foo = $this->filter('bar', '?uint,empty-str-to-null');
  • Like
Reactions: TAIFUN
  • Fix caching global permissions was broken (Impacts Can Warn Staff & User Essentials, but depends heavily on content if this bug was triggered)
  • Add helper repository for manipulating permissions.
    Will be used by a number of upcoming updates for various add-ons.
  • Fix join index hint support.
    • Fix XF2.2.11 and before error: Undefined array key "indexHints".
    • Fix XF2.212+ index hints not applying as expected in some cases.
  • XF 2.2.12 compatibility fix
  • Add join index hint support to SqlJointTrait (requires XF2.2.12+)
  • Add controller plugin 'SV\StandardLib\ControllerPlugin\Delete' a plugin helper for implementing soft/hard/undeleting of content
  • Update bundled moment.js library
  • php 8.2 compatibility update
  • If using the Svg Template addon, update to SVG Template 2.4.5 or rendering SVGs to PNGs will stop working
  • Add a work-around for horribly not recommended add-on updating process.
    • Deleting an addon's files while the add-on is active will very likely break your site.
  • 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
Top Bottom