XF 2.2 How to add a toggle to Latest Activity using custom user field?

Ludachris

Well-known member
I'm looking to use a custom user field to create a toggle button on the Latest Activity page that will exclude/include Reactions in the Latest Activity list. Brogan suggested I use this guide: https://xenforo.com/community/resources/customising-the-layout-with-custom-user-fields.8097/

I just need some help on the code to use for the button. Here's how I envision it looking:

1616776998445.webp

When toggled, it would display "Include" text. The custom user field would be easy enough to set up. I'll use something like "removeReactionsLA" for the ID or something like that.

Any help would be appreciated. Thanks!
 
I figured it would be custom development. But you've mentioned using custom user fields for it when I brought it up in another thread, so I figured I'd learn how to do some powerful stuff with custom fields. :)
 
What you want to do is possible with custom user fields, but the field would have to be set by the member on the profile page - it requires saving after setting and the code to do that isn't exposed to the latest activity page.
 
Top Bottom