Resource icon

Standard Library by Xon v1.24.11

XF2.3 support
Various .js files should work with XF2.1/XF2.2/XF2.3
Fix hasDesiredAddOnVersion could error if the target addon was in a processing state
Fix Standard Lib: Log parse_less_func debug info option not working
Backport <xf:macro name="template::macro syntax to to XF2.1
Update parse_less_color to not return CSS variables where possible
Bundle choices.js as a near drop-in replacement for select2
Enrich a select box with choices.js.

HTML:
<xf:macro template="svStandardLib_macros" name="choices_setup" />

<xf:selectrow label="Select row example" name="select_row_example"
multiple="multiple"
data-xf-init="sv-choices"
data-placeholder="{{ phrase('example')|for_attr }}"
data-max-item-count="2">
<xf:option value="1">Option 1</xf:option>
<xf:option value="2" selected="true">Option 2</xf:option>
<xf:option value="3">Option 3</xf:option>
</xf:selectrow>
  • 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::find() and Helper::findCached() assumed entity ids are only ints (can be string/int/array)
  • Add Helper::instantiateEntity() type-safe wrapper
  • Fix Helper::createEntity() could cause "Call to undefined method ...\XF\Entity\...::where()" errors when verifying content is unique
  • Actually distribute minified ajaxPagination.js file
  • 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.
    PHP:
    $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
    HTML:
    <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
Top