Forum Statistics

Peter

Active member
If I wanted to edit 'Forum Statistics' that is on the sidebar, which file should I edit? I did a search for 'forum statistics' within templates and get the 'No items matched your filter.' message.
 
What do you want to change/edit exactly?

The words "Forum Statistics" or the actual content?
If it's just the words then edit the phrase forum_statistics.

The stats block is in the forum_list template:
HTML:
        <!-- block: forum_stats -->
        <div class="section">
            <div class="secondaryContent statsList" id="boardStats">
                <h3>{xen:phrase forum_statistics}</h3>
                <div class="pairsJustified">
                    <dl class="discussionCount"><dt>{xen:phrase discussions}:</dt>
                        <dd>{xen:number $boardTotals.discussions}</dd></dl>
                    <dl class="messageCount"><dt>{xen:phrase messages}:</dt>
                        <dd>{xen:number $boardTotals.messages}</dd></dl>
                    <dl class="memberCount"><dt>{xen:phrase members}:</dt>
                        <dd>{xen:number $boardTotals.users}</dd></dl>
                    <dl><dt>{xen:phrase latest_member}:</dt>
                        <dd><xen:username user="$boardTotals.latestUser" /></dd></dl>
                    <!-- slot: forum_stats_extra -->
                </div>
            </div>
        </div>
        <!-- end block: forum_stats -->
 
Ideally you would use the phrase system as that way you can translate any text to other languages.

I'm still not sure exactly what it is you want to do though?
You just want some text displayed as "Hello World"?

In that case just enter it as, e.g.:

HTML:
<p>Hello World</p>
 
I'm still not sure exactly what it is you want to do though?

Thanks Brogan. I'm just testing out different ways to show text to guests and members.

Here's the code I'm using in that statistics block:
Code:
<xen:if is="{$visitor.user_id}">
	<p> hello member</p>
<xen:else />
	<p> hello guest</p>
<p> text to show to both guest and member</p>
</xen:if>

How can I show a message to both guest and member? Do I need to duplicate?
 
Well that code is using a conditional and works fine for both logged in users who will see "hello member" and guests who will see "hello guest".

If you want to show both strings then remove the conditional.

Or have I misunderstood the question?

Ah, I've just seen your edit. Just move the extra string outside the </xen:if> like so:
HTML:
<xen:if is="{$visitor.user_id}">
    <p> hello member</p>
<xen:else />
    <p> hello guest</p>
</xen:if>
<p> text to show to both guest and member</p>
 
Top Bottom