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

XF 1.0 how to get total member value on forum?

Discussion in 'XenForo Questions and Support' started by hieucocc, Jul 4, 2012.

  1. hieucocc

    hieucocc New Member

    I tried using:

    of all post
    total comment
    of its members

    but all of them are not working and returns the value of = 0: (

    [​IMG]
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Those variables are only available on the index page. Where are you trying to display those numbers? On what page?
     
    hieucocc likes this.
  3. hieucocc

    hieucocc New Member

    I just want the numbers (all users, messages, discussions) and only show at forum_list :)
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Oh I see you want it above the node list. Edit this template:

    Admin CP -> Appearance -> Templates -> forum_list

    Add the red code:

    Code:
    <xen:h1>{$xenOptions.boardTitle}</xen:h1>
    
    <xen:container var="$head.canonical"><link rel="canonical" href="{xen:link 'canonical:index'}" /></xen:container>
    <xen:if is="{$xenOptions.boardDescription}"><xen:container var="$head.description">
    	<meta name="description" content="{$xenOptions.boardDescription}" /></xen:container></xen:if>
    <xen:container var="$head.openGraph">
    	<xen:include template="open_graph_meta">
    		<xen:set var="$url">{xen:link 'canonical:index'}</xen:set>
    		<xen:set var="$title">{$xenOptions.boardTitle}</xen:set>
    	</xen:include></xen:container>
    
    <div style="text-align: right;">
    	{xen:phrase discussions}: {xen:number $boardTotals.discussions},
    	{xen:phrase messages}: {xen:number $boardTotals.messages},
    	{xen:phrase members_count}: {xen:number $boardTotals.users}
    </div>
    
    <xen:hook name="forum_list_nodes">
    	<xen:if is="{$renderedNodes}"><xen:include template="node_list" /></xen:if>
    </xen:hook>
    	
    <xen:sidebar>
    	<xen:edithint template="sidebar.css" />
    	
    	<xen:hook name="forum_list_sidebar">
    
     
    hieucocc likes this.
  5. hieucocc

    hieucocc New Member

    I want to insert in PGAE_CONTAINER but it does not work, please help me :)
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

Share This Page