1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 How to show more statics

Discussion in 'XenForo Questions and Support' started by Dadparvar, Oct 15, 2015.

  1. Dadparvar

    Dadparvar Well-Known Member

    Hi,

    In sidebar, now it shows "threads" and "posts" and "members" and "latest member".

    How to add "resources" and "albums" and "media" and ...?

    Any opinion will be appreciated.

    Regards,
    Hamed
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    There is a separate block for the gallery statistics - it should be enabled by default.

    There isn't an equivalent block for resource statistics.
     
    Dadparvar likes this.
  3. Dadparvar

    Dadparvar Well-Known Member

    Thanks.

    Because I use WF, so it won't be shown. But I copied its (XFMG) template content to WF state block.

    I'll share it if someone need in future:
    Code:
    <xen:if is="{$xenOptions.xengalleryShowStatisticsBlock.enabled}">
        <div class="section xengallery_gallery_statistics">
            <dl class="secondaryContent">
                <h3>{xen:phrase xengallery_gallery_statistics}</h3>
                <div class="statisticsBlock pairsJustified">
    
                    <xen:if is="{$visitor.permissions.xengallery.viewCategories}">
                        <dl class="ctrlUnit">
                            <dt>{xen:phrase xengallery_categories}:</dt>
                            <dd>{xen:number $xenCache.xengalleryStatisticsCache.category_count}</dd>
                        </dl>
                    </xen:if>
    
                    <xen:if is="{$visitor.permissions.xengallery.viewAlbums}">
                        <dl class="ctrlUnit">
                            <dt>{xen:phrase xengallery_albums}:</dt>
                            <dd>{xen:number $xenCache.xengalleryStatisticsCache.album_count}</dd>
                        </dl>
                    </xen:if>
    
                    <dl class="ctrlUnit">
                        <dt>{xen:phrase xengallery_uploaded_media}:</dt>
                        <dd>{xen:number $xenCache.xengalleryStatisticsCache.upload_count}</dd>
                    </dl>
    
                    <dl class="ctrlUnit">
                        <dt>{xen:phrase xengallery_embedded_media}:</dt>
                        <dd>{xen:number $xenCache.xengalleryStatisticsCache.embed_count}</dd>
                    </dl>
    
                    <dl class="ctrlUnit">
                        <dt>{xen:phrase xengallery_comments}:</dt>
                        <dd>{xen:number $xenCache.xengalleryStatisticsCache.comment_count}</dd>
                    </dl>
    
                    <dl class="ctrlUnit">
                        <dt>{xen:phrase xengallery_disk_usage}:</dt>
                        <dd>{xen:number $xenCache.xengalleryStatisticsCache.disk_usage, size}</dd>
                    </dl>
                </div>
            </dl>
        </div>
        <xen:if is="{$visitor.permissions.xengallery.view} AND {$visitor.user_id}">
            <div class="section xengallery_your_statistics">
                <dl class="secondaryContent">
                    <h3>{xen:phrase xengallery_your_statistics}</h3>
                    <div class="statisticsBlock pairsJustified">
                        <xen:if is="{$visitor.permissions.xengallery.viewAlbums}">
                            <dl class="ctrlUnit">
                                <dt>{xen:phrase xengallery_your_albums}:</dt>
                                <dd><a href="{xen:link xengallery/users/albums, $visitor}">{xen:number $visitor.xengallery_album_count}</a></dd>
                            </dl>
                        </xen:if>
    
                        <dl class="ctrlUnit">
                            <dt>{xen:phrase xengallery_your_media}:</dt>
                            <dd><a href="{xen:link xengallery/users, $visitor}">{xen:number $visitor.xengallery_media_count}</a></dd>
                        </dl>
    
                        <dl class="ctrlUnit">
                            <dt>{xen:phrase xengallery_your_usage}:</dt>
                            <dd>{xen:number $visitor.xengallery_media_quota, size}</dd>
                        </dl>
                    </div>
                </dl>
            </div>
        </xen:if>
    </xen:if>
    I copied some parts that I needed. But above is the whole code for "XFMG statics"
     

Share This Page