Site Stats Widget?

Zachary Moonshine
Zachary Moonshine
@zachary-moonshine
10 years ago
831 posts
Is there any way to show site stats in a widget like how many members, blogs, songs, etc ? So it could be posted on the front page ?
updated by @zachary-moonshine: 08/20/15 08:40:09AM
paul
@paul
10 years ago
4,335 posts
Create a 'template' widget and add this code -
        {capture name="template" assign="stats_tpl"}
        {literal}
            {foreach $_stats as $title => $_stat}
            <div style="display:table-row">
                <div class="capital bold" style="display:table-cell">{$title}</div>
                <div class="hilite" style="width:5%;display:table-cell;text-align:right;">{$_stat.count}</div>
            </div>
            {/foreach}
        {/literal}
        {/capture}

        {jrCore_stats template=$stats_tpl}
hth


--
Paul Asher - JR Developer and System Import Specialist
Zachary Moonshine
Zachary Moonshine
@zachary-moonshine
10 years ago
831 posts
very cool man it works, can it show how many members as well?
paul
@paul
10 years ago
4,335 posts
The Profile module doesn't register itself to be part of the stats system. Their might be a good reason for that - let me check it out.
Thanks


--
Paul Asher - JR Developer and System Import Specialist
Zachary Moonshine
Zachary Moonshine
@zachary-moonshine
10 years ago
831 posts
thank you paul
paul
@paul
10 years ago
4,335 posts
The next version of jrCore will include profiles in the jrCore_stats call.


--
Paul Asher - JR Developer and System Import Specialist
Zachary Moonshine
Zachary Moonshine
@zachary-moonshine
10 years ago
831 posts
sweet