• Webmaster forum we offer you the best experience with our webmaster site and freelancer forum categories where you can share information on topics such as web development and digital marketing!
    Participation and use are completely free!
valai

XF 2.1 / 2.2 / 2.3 Standard Library by Xon 1.21.10

Required for all XF2.1+ compatible add-ons.

A number of helper utilities designed to ease add-on development, does not have any direct user-facing changes.
Uploaded to aid dependency tracking and allow updating without updating every individual add-on.

Version 1.1.0 - Feature update, breaking change with some older add-ons
Add "replacevalue" templete filter used in a number of add-ons for implementing multi-select filter support
Add php 7 type hinting to various methods. Warning: this is a breaking change which cause site-disabling errors with older versions of the following add-ons;
Optimized List Queries v2.4.0 or earlier (free add-on)
Multi Prefix v2.7.5 or earlier (paid add-on)
Conversation Essentials v2.3.18 or earlier (paid add-on)
Bookmark Essentials v3.0.9 or earlier (paid add-on)
Tag Essentials v2.2.1 or earlier (paid add-on)
Additional 3rd party add-ons may have conflicts, and they will require updating or rolling back this add-on. This add-on is a drop-in replacement after updating the namespace being imported

Version 1.1.1 - Bugfix update : Fix typo in function name causing a templater error.

Version 1.1.2 Bugfix update :
When the installer is renaming things (phrases/options/etc), disable development file output as it can cause unexpected upgrade failures when the board is in dev mode.

Version 1.2.0 change : Add helper method for generating alias'ed classes to correctly support resolveExtendedClassToRoot function (used in controllers & entities)

Version 1.2.1 Bugfx update :
Add templater function which can reverse array/array collection
Fix possible MySQL 8.0+ collation error in renamePhrases

Version 1.3.0 Feature update :
Implement a custom date/time picker, with a custom input filter. Replacement for pikaday in XF2.2 no longer supporting a time component. Supports seconds (opt-out), and explicit time-zone selection.
XML:
You must log in to view
(1 lines)

XML:
You must log in to view
(1 lines)

PHP:
You must log in to view
(1 lines)

Version 1.3.1 Bugfix update : Fix custom date/time picker incorrectly setting the 'day' component of a date to the 'year' value.

Version 1.4.0 - Feature update :
Bundle moment.js 2.29.1
Extract count down/up timer html/javascript from Vote Tally & Notice Time Replacables add-ons, this includes singular time.<part> phrases.

Example usage (generates html & loads javascript) ;

PHP:
You must log in to view
(7 lines)

Version 1.4.1 - Maintenance update :
Ensure time counter timer doesn't cause unneeded HTML updates
When time counter code has maximum date parts set, do not append smaller units. ie "30 days 10 minutes" should be "30 days"

Version 1.5.0 - Admin Feature update
Add "View template modifications" when viewing a template with template modifications that apply.
A powerful diagnostic tool when diagnosing add-on conflicts in production!
Lists all modifications that are applying, and allows on-the-fly which are applying or not to view different permutations.
Allows viewing compiled template code various template modifications, extremely useful for isolating exactly where in a highly modified template is actually causing errors.
Note; viewing compiled template code dynamically compiles the selected template & modifications and does not read the actual on-disk representation.
If xdebug is active, this can be very slow !

Version 1.5.1 Maintainance update : Add "Compiler errors" missing phrase. Thanks @TickTackk

Version 1.5.2 Bugfix/Maintenance update : Improve installer helper addOrChangeColumn to be rename-aware to avoid generating invalid SQL

Version 1.5.3 - Bugfix update :
Restore php 7.0 compatibility
Fix "renamePhrases" install helper ignoring 3rd argument "replace"

Version 1.5.4 - Bugfix update : Fix minute value in time-selector not round-tripping as expected

Version 1.6.0 - Feature update :
Document features in Xon/XenForo2-StandardLib
Extend XF.Tabs to store the ID of the selected tab on submit via a hidden field.
Field name is set via data-sv-store-selected-tab-input-name added to the data-xf-init="tabs" element
HTML:
You must log in to view
(6 lines)

Version 1.7.0 - Feature update
Force global namespace for functions which are known to be optimizable to bytecode in php
Add hook-point for more aggressively rewrite inner-sub-query on early joins

Version 1.7.1 - Bugfix update
Fix out-of-memory error if multiple add-ons use EarlyJoinFinderTrait on the same class.
If using Optimized list queries add-on (free), this is a required update

Version 1.7.1 Patch 1
Rebuild redistributable to exclude incorrectly included bad class extension.
The 1.7.1 zip breaks the upload zip functionality! To recover;
Disable the Standard Library by Xon add-on.
Update the add-on
Ensure the Standard Library by Xon add-on is enabled

Version 1.7.2 - Maintenance update : Update EarlyJoinFinderTrait to send additional arguments to the getEarlyJoinThreshold method, this is a non-breaking change

Version 1.7.3 - Bugfix update :
Add sanity check for add-ons with composer during add-on install
In XF2.2+, fix pikaday css not being loaded when using extended day-time picker
Impacted addons; Advanced Bb-Code Pack (Time bb-code), Live Content, Vote tally.

Version 1.8.0 - Feature update :
When viewing a template, always show the 'view template modifications' link to allow viewing compiled code
Add an addValue template filter, to complement removeValue filter, and related phrases

Version 1.8.1 : Fix "DevTools failed to load source map: Could not load content for .../js/sv/vendor/moment/moment.min.js.map"

Version 1.8.2 - Bugfix update : Fix triggering an error on /forums/1/page-9223372036854775807 when Optimized Query List add-on is used and php7+ type hinting is used.

Version 1.9.0 - Maintenance update :
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

Version 1.10.0 - Feature update :
Update EarlyJoinFinderTrait to add support tables with compound primary keys
Document using InstallerHelper
Add InstallerHelper::getReversedAlterTables (with example usage in README.md), to hopefully simplify uninstaller code.
Takes the result of getAlterTables (array of table alters) and reverses simple column adds, renames and index adds.

Version 1.10.2 - Bugfix update :
Fix for using SqlJoinTrait and EarlyJoinFinderTrait together
Resolves compatibility issue when using Bump Thread and Optimized List Queries add-ons together

Version 1.11.1 - Feature update :
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

Version 1.11.2 Bugfix update : Fix type-error when a collection is passed to the removeValue templater filter function.

Version 1.12.0 - Feature update :
Move quick_filter template/js which dynamically updates body/pagenav in an overlay from SV/WhoReplied into SV/StandardLib
See Who Replied v2.2.0+ or User Mention Improvements v2.8.0+ for examples of usage

Version 1.12.1 - Bugfix update : XF2.2.10 compat fix for "view template modifications" link not rendering.

Version 1.12.2 - Maintenance update : Avoid duplicate some join expressions multiple times when using optimized list query add-on.

Version 1.13.0 :
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:
You must log in to view
(16 lines)

Version 1.13.1 :
- 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.

Version 1.14.0 - php compatibility update :
- 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.

Version 1.15.0 - Minor feature update :
- Add controller plugin 'SV\StandardLib\ControllerPlugin\Delete' a plugin helper for implementing soft/hard/undeleting of content.

Version 1.15.2 :
- 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.

Version 1.16.0 - Feature update :
- Add helper repository for manipulating permissions.
- Will be used by a number of upcoming updates for various add-ons.

Version 1.16.1 - Bugfix update :
- Fix caching global permissions was broken (Impacts Can Warn Staff & User Essentials, but depends heavily on content if this bug was triggered)

Version 1.17.0 - Feature 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:
You must log in to view
(1 lines)

Version 1.18.0 - Feature update :
- 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.

Version 1.18.2 - Mini-feature & bugfix update :

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 string.

Version 1.18.3 - Bugfix update : Fix accidental hard XF2.2 requirement.

Version 1.18.4 - Bugfix update : Fix accidental hard XF2.2 requirement. Take #2

Version 1.19.0 - Feature update :
  • 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:
You must log in to view
(1 lines)
  • 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:
You must log in to view
(11 lines)

<xf:pagenav> and <xf:hiddenval name="final_url" /> must be inside the div which is tagged with data-content-wrapper's css selector

Version V1.19.2 - Bugfix update :
  • Fix Who Replied pagination could get confused on the non-first page of a thread, similarly for ajax pagination code (used in Threadmarks v2.19.0+)
  • Fix ajax pagination could push changes to URL history when in an overlay

Version V1.19.3 - Bugfix update : Actually distribute minified ajaxPagination.js file

Version 1.19.4 : Fix Helper::createEntity() could cause "Call to undefined method ...\XF\Entity\...::where()" errors when verifying content is unique

Version 1.19.5 :
  • Fix Helper::find() and Helper::findCached() assumed entity ids are only ints (can be string/int/array)
  • Add Helper::instantiateEntity() type-safe wrapper

Version 1.20.0 :
  • 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
Version 1.20.1 :
  • Fix \SV\StandardLib\Helper::repo()->aliasClass() had a compatibility issue with XF2.2.13+ when the aliased class was the top-most class extension.

Version 1.21.1 - XenForo 2.3 support :
  • 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:
      You must log in to view
      (10 lines)
    • The initial structure is pre-rendered to reduce/prevent page jank.
    • To opt-out add the skip-rendering="true" attribute to the <xf:select> or <xf:selectrow> element
    • This will be used by a number of my add-ons and other 3rd party addons.

Version 1.21.2 - Bugfix update :
  • 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

Version 1.21.3 - Maintenance update :
  • Fix bad reference to useNativeTimeInputs in README.md
  • Update choices.js (v11.0.0-rc7)
    • Smaller bundle size
    • Improve aria attribute handling (aka accessability)
    • Many bugfixes around keyboard handling & displaying notices

Version 1.21.5 - Maintenance update :
- Update choices.js (v11.0.0-rc8)
  • Maintenance of choices.js is now done by Xon
  • When filtering/searching, show all search result hits instead of just the top 4.
  • Support all text/number configuration options as data-* attributes

Version 1.21.6 - Bugfix update : Fix "Class XFES\Listener not found" from some of my add-on installers.

Version 1.21.7 - Maintenance update :
- 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.

Version 1.21.9 - Bugfix update :
  • 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

Version 1.21.10 - Bugfix update :
Update choices.js to v11.0.3
  • Fix accessibility around tab/shift//esc key handling
  • Fix "No choices to choose from" was displayed when it shouldn't be
  • Fix max item notice handling would stop displaying when it shouldn't
  • Fix HTML comments could be displayed as part of a item's text label when they shouldn't be.
 
XF 2.1 / 2.2 / 2.3  [MMO] Extend Sharing  2.3.1
XF 2.0 / 2.1 / 2.2 / 2.3  AndyB Quick search  6.1

Attachments

Similar threads Most view View more
Back
Top Bottom