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.
 
The behaviour of the alerts popup changed a bit in XF 2.2.

We display a maximum of 25 alerts sent within the last 7 days. You can adjust the alertsPopupExpiryDays option to reduce how many days worth of alerts to keep in the popup.
 
That doesn't quite work - switch it to '1 day' for the popup, refresh the forum, and I still see 'read' alerts back to Tuesday. But it doesn't matter for a few days here or there.
 
Last edited:

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!
Is it possible to use conditionals with this? For example if a user is a certain user group they see the custom field data but if they aren't the data shows like up like this but obviously without the capability to unblur.
 
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');
}


I put a "Last Updated: 21/Oct/2020" line at the bottom of my Privacy Policy, and now with the above hcaptcha automatic insertion, it appears below my Last Updated line making the bottom of the Privacy Policy look a little weird ...

Screen Shot 2021-03-10 at 17.41.04.webp


Is there a template modification, or other mechanism, I can use to decide where I want this hcaptcha privacy policy section to be inserted into my site privacy policy?
 
Back
Top Bottom