ForumSpark Support app Faster, straight from your home screen. Tap Share, then Add to Home Screen.
Add ForumSpark Support to your home screen
  1. Tap Share at the bottom of Safari.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add. ForumSpark Support now opens like an app.
  1. Tap Install, or open the browser menu.
  2. Choose Install app or Add to Home screen.
  3. Confirm. ForumSpark Support now opens like an app.

Newest Member Avatar in Board Stats

Cory's Avatar
Cory · in Themes & Extensions
0 replies 180 views

Preview

Admin CP → Themes → Board Templates → Below the board

<script>
const usernameLink = document.querySelector('div.stats a.username');

if (usernameLink && sessionStorage.getItem('statsName') !== usernameLink.innerText) {
    fetch(usernameLink.getAttribute('href'))
        .then(response => {
            return response.text();
        })
        .then(html => {
            sessionStorage.setItem('statsName', usernameLink.innerText);
            const parser = new DOMParser();
            const doc = parser.parseFromString(html, 'text/html');
            const imageURL = doc.querySelector('div.profile-identity__avatar img').getAttribute('src');
            sessionStorage.setItem('statsAvatar', imageURL);
            const avatar = document.createElement('img');
            avatar.src = imageURL;
            avatar.width = '25';
            avatar.height = '25';
            avatar.style.display = 'inline-block';
            avatar.alt = 'User Avatar';
            usernameLink.prepend(avatar);
        });
} else {
    const avatar = document.createElement('img');
    avatar.src = sessionStorage.getItem('statsAvatar');
    avatar.width = '25';
    avatar.height = '25';
    avatar.style.display = 'inline-block';
    avatar.alt = 'User Avatar';
    usernameLink.prepend(avatar);
}
</script>

You might also like...

Topic Replies Views Last reply
How to Get New Members on Your Forum Spark Community From the blog, started by Shawn, 3 weeks ago
42
Shawn's Avatar
Shawn3 weeks ago
Meet Aegis: spam defense across every board From the blog, started by Cedric, 3 months ago
36
Cedric's Avatar
Cedric3 months ago
Avatar Change Across the Boards? Related, started by Kathy, 7 months ago
14 784
Cedric's Avatar
Cedric4 months ago
Member count different in admin than in stats Related, started by Gizmo, 2 months ago
8 643
Gizmo's Avatar
Gizmo1 month ago
Onboarding Members: To End the Vicious Cycle of Lurking From the blog, started by Shawn, 1 month ago
317
Shawn's Avatar
Shawn1 month ago