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.

Add Row to Board Statistics

Cory's Avatar
Cory · in Themes & Extensions
3 replies 176 views

Preview

The top three variables are all you need to modify.

Admin CP โ†’ Themes โ†’ Board Templates โ†’ Below the board

<script>
const newTitle = 'My Title';
const newImage = 'https://cory.forumspark.net/users.svg';
const newContent = `My Content`;
const html = `<div class="panel__sub-header">${newTitle}</div><div class="forum"><div class="forum__marker"><img src="${newImage}" alt=""></div><div class="stats">${newContent}</div></div>`;
const boardStats = document.querySelector('div.panel--board-stats');

if (boardStats) {
    const statsPanel = document.querySelector('div.panel--board-stats div.panel__content--flush');
    statsPanel.insertAdjacentHTML('beforeend', html);
}
</script>

Very nice Cory. ๐Ÿค

I'm assuming this could utilize HTML for say, an affiliate section?

Something.....something......dark side.....something something something.....complete....

Smokey said:

I'm assuming this could utilize HTML for say, an affiliate section?

Yes, any HTML can go between the backticks:

const newContent = `My Content`;

You might also like...

Topic Replies Views Last reply
Meet Aegis: spam defense across every board From the blog, started by Cedric, 3 months ago
32
Cedric's Avatar
Cedric3 months ago
Add-ons, automation and our Marketplace From the blog, started by Cedric, 4 months ago
24
Cedric's Avatar
Cedric4 months ago
8 780
Cedric's Avatar
Cedric8 months ago
Newest Member Avatar in Board Stats In Themes & Extensions, started by Cory, 8 months ago
0 178
Cory's Avatar
Cory8 months ago
Boo & Co Popular in Themes & Extensions, started by Cedric, 2 months ago
19 549
Cedric's Avatar
Cedric4 days ago