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 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">
...
<xfagenav ... />
<xf:hiddenval name="final_url" value="{$finalUrl}" />
</div>
</div>
<xfagenav>and <xf:hiddenval name="final_url" /> must be inside the div which is tagged with data-content-wrapper's css selector
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.