Customize labels in community stats module

Avatar
  • updated
  • Completed

In the Community stats side module, is it possible to change the wording "Community stats" and "Support agents" ? I've looked around but can't find it - apologies if I am overlooking it. For now, I would love it if we could change Support agents to "IEHA Staff"

Might be a nice feature to have those customizable in the module's settings.

Pinned replies
Avatar
Vladimir Mullagaliyev co-founder
  • Answer
  • Completed

Hello Shaun,

This module has no this type of customization, because very few clients want to customize this part.

But it is still possible to change this label via CSS or JS.

Here is an example of JS code:

<script>
    initqueue.push(
        function(){$('.module-stats .staff h3').text('IEHA Staff');}
    )
</script>

We've applied it in your Project settings->Custom CSS->External.

Here is the result:

Avatar
Vladimir Mullagaliyev co-founder
  • Answer
  • Completed

Hello Shaun,

This module has no this type of customization, because very few clients want to customize this part.

But it is still possible to change this label via CSS or JS.

Here is an example of JS code:

<script>
    initqueue.push(
        function(){$('.module-stats .staff h3').text('IEHA Staff');}
    )
</script>

We've applied it in your Project settings->Custom CSS->External.

Here is the result:

Avatar
Ryann

Hello,

Very nice trick :-)

Is there a way to customize this customization to have different texts that (automatically) follow the current language of the user?

Avatar
Vladimir Mullagaliyev co-founder
Quote from Ryann

Hello,

Very nice trick :-)

Is there a way to customize this customization to have different texts that (automatically) follow the current language of the user?

Sure, here it is:

<script>
    initqueue.push(
        function(){
           var label = 'My default label';            
           if ($('html').attr('lang') == 'fr'){
               label = 'My Fr label';
           }
            $('.module-stats .staff h3').text(label);
        }
    )
</script>

Avatar
Ryann
Quote from Vladimir Mullagaliyev

Sure, here it is:

<script>
    initqueue.push(
        function(){
           var label = 'My default label';            
           if ($('html').attr('lang') == 'fr'){
               label = 'My Fr label';
           }
            $('.module-stats .staff h3').text(label);
        }
    )
</script>

Many thanks!