Resource icon

xF2 Add-on Standard Library by Xon 1.21.9

No permission to download
  • Update choices.js
    • Adjust font-size css to be more inline with standard XF
    • Fix select did not reset correct after a form submit.
      • Noticeable with Threadmarks Pro add-on on replying to a thread
    • Fix "no choices to choose from"/"no results found" notice did not reliably trigger
    • Fix options loader would unexpectedly clear options. This impacts the move thread function.
  • Update count down timer to only show seconds in the last 2 minutes by default, this avoid excessive page-reflows
    • Noticeable with notice time replacables add-on
  • Update choices.js integration
    • Cleanup font-size handling (on average slightly larger, but works on more styles)
    • Convert CSS (generated from SCSS) into LESS
    • Fix adding classes to choices.js via data-class-* attributes did not work as expected
    • Fix a number of performance issues with very large number of options (ie hundreds to thousands), not fully resolved but better.
  • Fix "Class XFES\Listener not found" from some of my add-on installers
  • Fix ajax pagination & ajax filtered pagination code did not dynamically loading css/js
  • Update choices.js
    • Various performance fixes when used with large number of options (ie hundreds of prefixes when using Multi-Prefix)
    • Fix filtering/search could return unstable search results
    • Fix possible empty aria-label generation on remove item button
    • Fix enter could cause accidental form submit instead of open/closing the choices list in all cases
  • Fix \SV\StandardLib\Helper::repo()->aliasClass() had a compatibility issue with XF2.2.13+ when the aliased class was the top-most class extension.
  • Require php 7.2+
  • php 8.4+ compatibility fix
  • Improve custom AJAX pagination and AJAX pagination with filter bar javascript. Includes admincp option helper option rendering code
    See Who Replied for an implementation of the feature allowing selectable pagination styles
  • Add Helper::Plugin for type-safe plugin creation
  • Fix Helper::createEntity() could cause "Call to undefined method ...\XF\Entity\...::where()" errors when verifying content is unique
  • Only add phrase_dynamic template method in XF2.1
  • Add various strongly typed helpers to automatically type hint returns based on using ::class argument instead of magic strings.
Code:
$obj = Helper::repository(\XF\Repository\User::class);

  • For static analysis and IDE, $obj will have the type \XF\Repository\User

    While XF2.3 intends to implement this, adding this functionality to this add-on allows migrating before hand and simplifies migrating as the Helper bit just needs to be swapped with \XF
  • Add js/sv/lib/ajaxPagination.js
    Code:
    <xf:js src="sv/vendor/domurl/url.js" addon="SV/StandardLib" min="1" />
    <xf:js src="sv/lib/ajaxPagination.js" addon="SV/Threadmarks" min="1" />
    ...
    <div class="block" data-xf-init="sv-ajax-pagination" data-content-wrapper=".block-body--wrapper">
        ...
        <div class="block-body--wrapper">
            ...
            <xf:pagenav ... />
            <xf:hiddenval name="final_url" value="{$finalUrl}" />
        </div>
    </div>

<xf:pagenav> and <xf:hiddenval name="final_url" /> must be inside the div which is tagged with data-content-wrapper's css selector
  • Fix accidental hard XF2.2 requirement. Take #2
Note; The 1.18.x branch will be the last branch to support XenForo 2.1.x
  • Deprecate getContentPermissions function, as the 2nd string argument was not actually used, with a replacement function getPerContentPermissions added.
  • Add \SV\StandardLib\Helper::isAddOnActive() helper function. Similar to \XF::isAddonActive(), except it understands version strings
  • Shim template funciton is_addon_active code to understand version strings
728Threads
2,272Messages
61,029Members
wdASLatest member
Back