• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

How to use quick stats in WF

Dadparvar

Member
AMS Premium
CAS Premium
RMS Premium
SC Premium
UBS Premium
Hi,

I use CTA portal and home page is just widgest (using WF).
I edited "wf_widget_stats" and added the code below:
Code:
    <xen:if is="{$xenOptions.scSidebarStatsIndex}">
                    <dl>
                        <dt>{xen:phrase nflj_showcase_categories}:</dt>
                        <dd>{xen:if '{$quikStats.categories}', '{xen:number $quikStats.categories}', '0'}</dd>
                    </dl>
                    <dl>
                        <dt>{xen:phrase nflj_showcase_items}:</dt>
                        <dd>{xen:if '{$quikStats.items}', '{xen:number $quikStats.items}', '0'}</dd>
                    </dl>
                    <dl>
                        <dt>{xen:phrase nflj_showcase_views}:</dt>
                        <dd>{xen:if '{$quikStats.views}', '{xen:number $quikStats.views}', '0'}</dd>
                    </dl>
                    <dl>
                        <dt>{xen:phrase nflj_showcase_images}:</dt>
                        <dd>{xen:if '{$quikStats.images}', '{xen:number $quikStats.images}', '0'}</dd>
                    </dl>
                    <xen:if is="{$quikStats.reviews}">
                        <dl>
                            <dt>{xen:phrase nflj_showcase_reviews}:</dt>
                            <dd>{xen:if '{$quikStats.reviews}', '{xen:number $quikStats.reviews}', '0'}</dd>
                        </dl>
                    </xen:if>
                    <xen:if is="{$quikStats.comments}">            
                        <dl>
                            <dt>{xen:phrase nflj_showcase_comments}:</dt>
                            <dd>{xen:if '{$quikStats.comments}', '{xen:number $quikStats.comments}', '0'}</dd>
                        </dl>
                    </xen:if>
    </xen:if>

But all numbers next to stats of showcase are 0. (Although in Showcase home page they are correct)
Should I add anything else?
I did exactly like this for XFMG and its showing all its stats as it must. But couldn't add showcase's stats there.

Also there are "<xen:if is="{$quikStats.comments}">" and "<xen:if is="{$quikStats.reviews}">" in code, but although there are comments and reviews in our showcase, but it doesn't show their stats in sidebar.

Any opinion will be appreciated.

Regards
 
Last edited:
XFMG fetches, prepares and exposes specific stats data Globally as part of its built in functionality to display the Media Stats on Forum Home. Showcase doesn't do that. What you'd need to do is develop a WF Renderer (or a callback block) and fetch and prepare the stats with that renderer for making a widget.
 
What you'd need to do is develop a WF Renderer (or a callback block) and fetch and prepare the stats with that renderer for making a widget.
Thanks.
I always was weak on developing a WF renderer or callback.
Hope someone help.
And if I find do it first, I'll share too.
 
Back
Top