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

Forum Statistics

Discussion in 'XenForo Questions and Support' started by Peter, Dec 4, 2010.

  1. Peter

    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.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    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 -->
     
    Peter likes this.
  3. Peter

    Peter Active Member

    I found it in forum_list. If I want to add "Hello World" in that block, is there a standard xenforo way or can I just type Hello World?
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    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>
     
  5. Peter

    Peter Active Member

    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?
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    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>
     

Share This Page