Jump to content

  • twitter
  • youtube
  • googleplus
  • facebook
  • rss
  • newsletter


How to use {$stats['TOTAL']} in other skin bits besides boardIndexTemplate?


  • Please log in to reply
5 replies to this topic

#1 Durik

Durik

    Newbie

  • Members
  • Pip
  • 7 posts
  • Gender:Male
  • IP.Board Version:IPB 3.2.x
  • First Name:Derrick

Posted 26 November 2011 - 12:25 AM

Hello,

When I use {$stats['TOTAL']} to show how many total users are online, it only works in the boardIndexTemplate bit. How can I use it on my global so I can place it elsewhere on the skin?

Thank you so much in advance! :)

#2 Michael

Michael

    Management

  • Management
  • 3,137 posts
  • Gender:Male
  • Location:Australia
  • IP.Board Version:IPB 3.1.x
  • First Name:Michael
Donator

Posted 27 November 2011 - 12:19 AM

Try this in your template bit.

{parse format_number="$this->caches['stats']['mem_count']"}

Keep up to date with DevFuse mod development and releases.

Posted Image Posted Image Posted Image Posted Image Posted Image


#3 Durik

Durik

    Newbie

  • Members
  • Pip
  • 7 posts
  • Gender:Male
  • IP.Board Version:IPB 3.2.x
  • First Name:Derrick

Posted 27 November 2011 - 01:59 PM

WORKS!
Thank you so much Michael! :D
I owe you one!

#4 Durik

Durik

    Newbie

  • Members
  • Pip
  • 7 posts
  • Gender:Male
  • IP.Board Version:IPB 3.2.x
  • First Name:Derrick

Posted 10 December 2011 - 07:44 PM

I'm sorry but this only showed the member count rather than the total amount of users online. D:
Sorry for the false statement in my above post!

#5 Michael

Michael

    Management

  • Management
  • 3,137 posts
  • Gender:Male
  • Location:Australia
  • IP.Board Version:IPB 3.1.x
  • First Name:Michael
Donator

Posted 10 December 2011 - 08:16 PM

That information is not cached and is loaded only for the board index page. If you want load that information you'll need to add another db query that would run on every page. Is that ok?

Keep up to date with DevFuse mod development and releases.

Posted Image Posted Image Posted Image Posted Image Posted Image


#6 Durik

Durik

    Newbie

  • Members
  • Pip
  • 7 posts
  • Gender:Male
  • IP.Board Version:IPB 3.2.x
  • First Name:Derrick

Posted 11 December 2011 - 02:58 AM

Thank you for your response, Michael! Truly appreciate it,

I guess I will just use another widget to cast how many users are online.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users