XF 2.2 Assorted improvements

misc_3.png
We're fast approaching the time where we're able to unleash XenForo 2.2 on this very forum but, before we do, we wanted to tell you about a few slightly more miscellaneous features that we've been keeping under our hat.

Advanced options switch

The eagle-eyed amongst you may have already spotted some hints about this in some of our earlier screenshots. 🤫

XenForo has an ever-increasing number of options and then by the time you put add-on options in the mix, the options pages may start to feel somewhat daunting and unwieldy at times, especially for new admins to the platform. After all, there are nearly 200 options in XenForo alone.

We (and add-on developers) are now able to mark options or entire option groups as "advanced".

misc_1.png

What this intends to do is simply hide some of the options we deem to be more "advanced" so as to simplify the option lists while also making it very easy to unhide if the need presents itself.

To do this you can toggle "Advanced mode" for your admin account. The easiest way to do this is from within the option list itself when options are hidden. Clicking "Show them" will reveal the advanced options and enable "Advanced mode" permanently for your admin account.

misc_2.png

An alternative and perhaps slightly more pre-emptive way to enable Advanced mode is from the "cogs" menu in the admin control panel header. You just need to toggle the checkbox in the menu footer:

misc_3.png

Other places you can toggle it are from the list of option groups and while editing an administrator account.
 

Configurable job run trigger

The job system is a crucial cog in the XenForo machine to ensure that certain tasks can be run on a regular or as-scheduled basis, or split into multiple smaller chunks to be completed over a period of time.

Traditionally the jobs require some form of activity on your site to kick these processes off asynchronously in the background. Little do your anonymous guests know how crucial their activity is to the normal running or your site!

But what if there are situations where you don't always have activity on your site? It might be a private site that is in development, you might get very few visitors at certain times of the day, or you might simply want to take direct control of the process and execute it yourself.

Either way, this new option in XF 2.2 aims to help:

misc_4.png

By default we will continue to trigger jobs based on site activity, but if needed you can switch to a server-based trigger. This involves periodically executing a new CLI command xf:run-jobs.

Note: You will be responsible for putting in place some sort of config for crontab, cron.d, system.d or other task running process to ensure the command is run as expected.
 

Mark languages as "user selectable"

Currently all languages are user-selectable but from XF 2.2 you will be able to specify that some languages are not user selectable if so desired.

misc_5.png


misc_6.png

This is, of course, very similar to the same concept we have had for styles for quite some time. If the option is toggled off for the language then it is no longer visible or selectable by users, though the language will still be selectable for admins.
 

OAuth authentication for SMTP, IMAP and POP3 mail configuration

You may be aware that Google are taking steps towards disabling "less secure apps". Google's definition of a "less secure app" (LSA) is an app which still exchanges usernames and passwords for authentication purposes.

In simple terms, if you currently use a Google account for either incoming or outgoing email in XenForo then at some point in the future it may stop working.

The LSA turn-off has been delayed until further notice but it's clear that it is very much on the agenda so it's time to make sure XenForo is ready for that change taking place. And while it is not essential in the immediate future, it doesn't hurt to have a more secure way of authenticating, right?

The first thing you will notice is that authentication options for emails look different:

misc_7.png

Clicking "Change" opens an overlay where the options should be somewhat familiar, albeit with a new "Google OAuth" option:

misc_8.png

Once selected you will be presented with an overlay where you can populate your OAuth credentials. Some set up here is required via Google's developer console but this will be familiar if you have used the "Connected accounts" feature to set up register/log in with Google.

misc_8b.png

You will then be asked to sign in with the desired Google account and provide consent for accessing your Google Mail:

misc_9.png

Once completed we store a token and going forward that will be used to authenticate you, rather than having to store and exchange passwords.

misc_10.png

While this has focused on authenticating for outgoing SMTP mail, the same process is available for incoming POP3/IMAP email too which is used for processing incoming bounced emails and email unsubscribe handling.

We only support OAuth out of the box for Google but the changes we have made mean it should be possible for developers to extend this to provide OAuth options for other providers too with minimal effort. The OAuth client library is the same one we use for connected accounts so many developers will already be familiar with its inner workings.
 

Custom field output control

When you create custom fields on your forum they are output with a label and the value in plain text. To use a couple of default fields available out of the box as an example, they would look like this:

misc_11.png

You can get a little bit more creative by modifying the "Value display HTML" which allows you to modify the value portion of the custom field output:

misc_12.png

In this example we're allowing the field value to actually link to the person's social media profiles rather than just listing their usernames and we're also adding a little bit of visual flair by displaying a Font Awesome icon:

misc_13.png

Now, this is better but we felt there was some room for improvement so now we enable you to adjust the entire wrapper for the custom field. In this particular example, the icons are... um... iconic enough so the labels denoting "Facebook" and "Twitter" respectively seem somewhat superfluous.

We've already customised the value portion to look how we want it to, so we now just modify the wrapper portion and have that reference the existing value:

misc_14.png

Notice that the wrapper HTML doesn't include the {$title} or any of the usual formRow markup. Instead we have a very simple wrapper around the linked icons (the value). With a small adjustment to the size of the icons we're sure you'll agree this looks much better.

misc_15.png

The possibilities you have for customising the look of custom fields are now somewhat endless so we're looking forward to seeing what you come up with.

Of course this feature comes with the custom field framework as standard so it should be very simple for existing custom field implementations to start supporting this and giving custom fields a new lease of life in XenForo 2.2!
 
Last edited by a moderator:

Prefix descriptions and usage help

Prefixes can be used in a wide variety of ways, including sub-categorizing or indicating the status of the content. Sometimes, the name of the prefix isn't necessarily enough and you want to get additional information across. Prefix descriptions and usage help are designed to allow that.

1592836306313.png


Prefix descriptions are shown when viewing the content that has the prefix. For example, here's a thread showing a "Not planned" prefix description:

1592836114804.png


Descriptions can include HTML so you can include things like links or any other markup you might require.

Prefix usage targets the person creating (or editing) the content by showing usage help details once the prefix has been selected:

1592836172606.png


Like descriptions, prefix usage help can also include HTML.

While our examples relate to threads, we never actually said "thread prefixes" up until this point. Prefix descriptions and usage help are built into the general prefix system, so any add-ons that implement prefixes can use them (though they'll need to implement a bit of additional code). We've added support for these options in resource prefixes already.
 

New CAPTCHA option: hCaptcha

You may have recently heard the name "hCaptcha". As well as being suggested on our forum they gained some notoriety recently as CloudFlare decided to adopt them over reCAPTCHA.

We checked them out and liked what we saw so we decided to add them as a CAPTCHA provider starting with XF 2.2.

You have to sign up for a key at their website and populate those keys, as you might expect, in the "Enable CAPTCHA for guests" option:

misc_16.png

Once enabled hCaptcha will now appear wherever we usually ask for a CAPTCHA:

misc_17.png

There's also a "Use invisible hCaptcha" option too. Here's a screenshot showing the invisible mode in action:

Wow, see how invisible it is?

Jokes aside, it's actually too invisible. By which we mean that while there is an "invisible" option for reCAPTCHA too, it does at least display a small icon in the corner of the screen. hCaptcha doesn't so, to comply with privacy regulations, we've also added a new feature to the CAPTCHA handlers so that they can add additional attribution into the privacy policy of the site:

PHP:
public function getPrivacyPolicy()
{
   return \XF::phrase('hcaptcha_privacy_policy');
}

misc_18.png
 

Improved draft save trigger

If you have ever had your internet connection drop, inadvertently closed the wrong browser tab or otherwise just wanted to finish what you were typing at a later date you have no doubt been very thankful for the existence of our automatic draft saving system.

By default we trigger an automatic draft save every 60 seconds, and then store that draft for 24 hours. These values can be adjusted if desired.

While the draft save system and its options will remain as-is in XenForo 2.2 there are a few situations where that 60 seconds might be a little too long and you could lose (by default) up to 60 seconds worth of typing. Or, if you're like me, up to 60 seconds worth of typos.

In XF 2.2 in addition to the automatic saving as per the existing options, we also trigger a save automatically when you've stopped typing for a few seconds (three, specifically).

This should reduce the scope of content getting lost in some cases and reduce the number of times you will need to manually trigger a save.

It also means that if you empty the contents of the editor, it will essentially clear your draft automatically.
 

Improved alerts behaviour

Some of you might remember a time before alerts were a thing. Alerts and notifications are everywhere in 2020 but over 10 years ago they were almost entirely unheard of, especially in forum software.

That's right, kids, there was once a time where you'd need to regularly traverse the entirety of the forum tree to find out if someone had replied to you yet, or not. That sometimes involved having to remember where you posted and physically go there.

giphy.gif

Now they're entirely common-place and whether it's forum software, mobile apps or any number of websites, the concept of alerts is now almost universal.

misc_19.png

It's fair to say that you can receive a lot of different alerts and they all have slightly different contexts too. Some are more informational, such as notifying you of a moderator action, or a reaction someone has left on your post. Others may require your attention, such as someone replying to your post or mentioning your username.

Occasionally you might even need to refer back to a specific alert at a later date.

In XenForo 2.2 we've made some changes.


On the surface, it looks like little has changed, but quite a lot has.

First and foremost we now have a distinction between alerts you have viewed (in the menu, or in the full alerts list) versus the alerts you have read (meaning you have read the content to which the alert pertains).

The alerts menu now represents the number of alerts you have not yet viewed. Opening the alerts menu marks all of the alerts viewed.

You're able to toggle the read status of each alert individually or simply mark all alerts read if desired.

On an alert-by-alert basis the code that is triggering the alert to be sent can indicate whether an alert should be marked read automatically or not. As we noted previously, some alerts are purely informational so, as now, they can be marked as read automatically while others will stay in their read state until either you visit the content or you explicitly mark it as read:

misc_20.png

You can also mark an alert unread by clicking on the read toggle indicator (the circle). An alert that is explicitly marked as unread will remain unread until you mark it read or visit the content, even if it was previously set to be marked read automatically, thus helping you indicate that an alert may still require some attention or action further down the line.
 
The eagle-eyed amongst you may have already spotted some hints about this in some of our earlier screenshots. 🤫
🤐

it does at least display a small icon in the corner of the screen. hCaptcha doesn't so, to comply with privacy regulations,
I did talk to one of their senior developers about it and they said they are working on it. That was few months back.
 
It shouldn't be a huge deal. After all, looking at their privacy policy and what information we have about their detection methods, I'm not sensing anything nefarious.
 
Prefix descriptions! I love that you thought of the author and the audience.

Have you done anything denoting a prefix is required before they click to find out? I have this issue and I believe it was marked future fix or there was a comment to the effect it could be done later.
 

Custom field output control

When you create custom fields on your forum they are output with a label and the value in plain text. To use a couple of default fields available out of the box as an example, they would look like this:

You can get a little bit more creative by modifying the "Value display HTML" which allows you to modify the value portion of the custom field output:


In this example we're allowing the field value to actually link to the person's social media profiles rather than just listing their usernames and we're also adding a little bit of visual flair by displaying a Font Awesome icon:


Now, this is better but we felt there was some room for improvement so now we enable you to adjust the entire wrapper for the custom field. In this particular example, the icons are... um... iconic enough so the labels denoting "Facebook" and "Twitter" respectively seem somewhat superfluous.

We've already customised the value portion to look how we want it to, so we now just modify the wrapper portion and have that reference the existing value:

Notice that the wrapper HTML doesn't include the {$title} or any of the usual formRow markup. Instead we have a very simple wrapper around the linked icons (the value). With a small adjustment to the size of the icons we're sure you'll agree this looks much better.
The possibilities you have for customising the look of custom fields are now somewhat endless so we're looking forward to seeing what you come up with.

Of course this feature comes with the custom field framework as standard so it should be very simple for existing custom field implementations to start supporting this and giving custom fields a new lease of life in XenForo 2.2!
No custom field searching and filtering? :(
 
You may be aware that Google are taking steps towards disabling "less secure apps". Google's definition of a "less secure app" (LSA) is an app which still exchanges usernames and passwords for authentication purposes.

In simple terms, if you currently use a Google account for either incoming or outgoing email in XenForo then at some point in the future it may stop working.
I was going to start a thread about this upcoming change, but am relieved to see it covered in 2.2. I only just recently set up bounce handling, and I had to jump through a lot of hoops to get it to play nice with our Google Apps accounts.
 
I was really hoping an alert improvement would include an API endpoint for integrating the board better with legacy systems. Maybe there are API updates yet to announce!
Very excited by a few of these odds and ends, and grateful to the XenForo team!
 
I've had some of my prefixes misused (understandably as well, since they are supposed to be short) so this is a real gamechanger for me since I use prefixes basically as sub-categories and they are required. Pretty awesome.
 
Top Bottom