Before that, however, we wanted to highlight a few more things that we've been working on over the last couple of weeks. Some of these you will be aware of as they have been running here for some time and we may have mentioned them elsewhere. Others are slightly more subtle...
Image and video improvements
Lazy loadingLast year Google paved the way for Native lazy loading images. Lazy loading images is a fantastic way to reduce page loading times and data usage as rather than loading all images on a page, it instead loads images as you scroll, just before the images enter your browser's viewport.
Since then browser support for the standard has ballooned with all major browsers including Chrome, Firefox, Edge (Chromium based) and even Safari* adding support for it. So now seemed like a great time to start supporting it in XF too.
This is actually one of those features that is there but is hard to see but there is a good visualisation of it in the web.dev demo and you should also see it if you inspect the "Network" tab in the "Developer tools" of your preferred browser while browsing through an image-heavy thread.
* While Safari supports lazy loading images it is currently marked as an experimental feature which can be enabled in macOS Big Sur Safari Tech Preview or iOS 14 Beta.
DimensionsWe now, where possible, specify width/height attributes on many images used across the software where the dimensions are known. This attempts to avoid costly browser reflows in many circumstances and is also beneficial to image lazy loading.
A significant image where we did not previously know the dimensions was the public logo style property. We have now added a couple of new style properties so these can be specified:
Specifying these dimensions is also helpful for cases where you might use an SVG image as your logo as they do not generally have predefined dimensions.
New lightboxThe lightbox interface which displays image attachments in their fullscreen glory has been much improved in XenForo 2.2. As well as some much needed functionality (better pinch-to-zoom support) and improved stability it has also afforded us the flexibility of implementing some cool features to XenForo Media Gallery.
Don't just take my word for it, click on some of the images in this post to check it out!
Write before registering improvementsAfter we first announced Writing before registering we were asked to add a few additional indications that content was pending and this seemed reasonable so we were happy to oblige!
Users will now get a reassuring reminder that their content will be posted once their registration is complete:
And once they have completed their registration they will be able to go straight to viewing the content by clicking the very handy "View your content" button.
There are a few additional improvements on their way as we progress through the beta.
API additionsXenForo 2.2 includes a fairly huge array of REST API improvements which are difficult to go into significant detail here but here's a brief overview:
- Support for accessing the API user's alerts and marking them as read/unread.
- Support for creating an arbitrary alert (similar to the admin CP method).
- Support for marking conversations read/unread.
- Filter conversations to unread only.
- Support for marking threads and forums read.
- By extension, expose read/unread state to forums, threads and posts.
- When calling GET threads/, information about the first unread post, if applicable.
- Support thread moving.
- Expanded thread filtering: unread only, by thread type.
- Expose search forums to the API.
- Allow lookups based on a user's email address (with requisite admin permission).
- Support for looking up a user based on a session ID or a remember cookie. This allows easier/seamless integrations in situations where the XF cookies are available (on the same domain or a sub-domain, depending on XF cookie config).
- Support for temporary login tokens that allow you to log a user into an arbitrary XF user.
- Basic stats endpoint to get site totals, online user counts and basic info about the latest registration.
- Include HTML-parsed output in things like posts, conversation messages, etc. HTML uses a new BB code renderer to avoid dependencies on XF HTML.
- Return view_url with a number of data types. This provides the canonical URL to that content within XF.
Search forum widget
We have a couple of test examples on this very forum including Fixed bugs and Implemented suggestions where we display a list of threads with a specific prefix in certain forums.
They really are great but you may wish to highlight the content from these forums in different ways so we have added the ability to display them as a widget.
Much like many of our thread based widgets you can display them in a "simple" list, much like the one pictured here. There is also a "full" list which displays them as a forum view type thread list and an "expanded" list which displays them with a snippet of their first post content.
Profile post / comment attachmentsFor XenForo 2.1 we added rich text formatting to profile posts and comments. For XenForo 2.2 we're giving you attachments for profile posts and comments! Users with permission may now upload images, videos and other attachments straight to their profile posts and their comments.
This is, of course, permission controlled so if you do not want this enabled on your forum that is no problem.
Thread searcher additionsThe "thread searcher" is a general concept in the software that is used mostly in the Admin control panel for a couple of features. Notably it is the interface which is used to select the criteria for which threads should appear in "Search forums" and it is the same system that allows you to set the criteria for the "Batch update threads" tool.
To add even more flexibility to these systems, we've added some new criteria.
You can now filter by thread type:
You can exclude specific forums from your search:
And we now also have support for relative date options so you can search for threads either created or last replied to in the last X hours|days|weeks|months|years:
Username change reasonsWhen a user wants to change their username they are now asked to provide a reason.
This is usually optional but you can set it to be required by changing this option:
One final thing for the developers here is a new PHP interface which can be implemented on any Entity class that represents an item of content where you might have one, or more, other classes that may need to get its link, its route or its title.
This means that handler-based systems such as
XF\Bookmark\AbstractHandlercan have a default method which returns the value of the method from that interface rather than each handler implementing its own logic.
Similar thread suggestion headingsComing directly from a suggestion made yesterday, following the unveiling of our new Similar threads suggestion facility, the list of suggested threads now gets its own heading to prompt the user to consider the contents of the list.
The headings are context sensitive, so the message will be different depending upon the type of thread being composed.
Not everything works out the way we want...For the most part, when the constant debates are over about which icons should be used for which buttons and the dust settles you are faced with the latest iteration of the XenForo 2.2 rich text editor and it is - by any measure - a real step forward.
Amongst all of the positive changes we made, we implemented a very well intentioned, and potentially very useful feature called the "Quick insert button". But, it wasn't meant to be. While for the most part it did a great job, it didn't work totally as expected on all devices and, as such, we took the decision to remove it.
RICH TEXT EDITORGone but not forgotten. Who knows? It may make a return one day.
QUICK INSERT BUTTON
2020 - 2020
QUICK INSERT BUTTON
2020 - 2020