Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: sahr on November 20, 2017, 07:12:04 AM

Title: How get numbers of users,groups,vistors ...etc
Post by: sahr on November 20, 2017, 07:12:04 AM
How get numbers of users,groups,vistors ...etc  in code progrmming
Title: Re: How get numbers of users,groups,vistors ...etc
Post by: Arantor on November 20, 2017, 07:18:27 AM
To display where and how?

Note that displaying such stats tends to be inclined to discourage people unless the stats are already pretty high.
Title: Re: How get numbers of users,groups,vistors ...etc
Post by: sahr on November 20, 2017, 07:25:55 AM
thaanks for your replay,i have custom theme and need to display users,groups,vistors in front page as Board Stats in simpleportal mode
Title: Re: How get numbers of users,groups,vistors ...etc
Post by: Arantor on November 20, 2017, 08:29:30 AM
Why can't you just get SimplePortal to do it? I'm sure it has a block for this already, but it's been a while since I used SP.
Title: Re: How get numbers of users,groups,vistors ...etc
Post by: sahr on November 20, 2017, 08:47:14 AM
I need to do that without simple portal
Title: Re: How get numbers of users,groups,vistors ...etc
Post by: Illori on November 20, 2017, 08:48:04 AM
where do you want it to show? within SMF if so where exactly? if outside SMF where?
Title: Re: How get numbers of users,groups,vistors ...etc
Post by: Arantor on November 20, 2017, 08:48:40 AM
So you're using SimplePortal but you need to not do it with SimplePortal...?
Title: Re: How get numbers of users,groups,vistors ...etc
Post by: sahr on November 20, 2017, 11:46:56 AM
surly in SMF,but i change fornt page in index.template to suit my design now i need to put number of users,visitors,posts as large tittles in my page to notify my visitor with information about my site.
Title: Re: How get numbers of users,groups,vistors ...etc
Post by: Sir Osis of Liver on November 20, 2017, 12:10:17 PM
The code that displays those stats is in BoardIndex.template.php, look for "info center".  You should be able to adapt it for your purpose.
Title: Re: How get numbers of users,groups,vistors ...etc
Post by: Arantor on November 20, 2017, 12:13:33 PM
Display is there but the logic is in BoardIndex.php and other files depending on what you're trying to do...
Title: Re: How get numbers of users,groups,vistors ...etc
Post by: sahr on November 20, 2017, 03:19:41 PM
Which php code get total visitors like ', $context['common_stats']['total_members'], '
Title: Re: How get numbers of users,groups,vistors ...etc
Post by: wildmisty06 on November 26, 2017, 01:07:16 AM
Is this an ok idea? Maybe I'll do this if the site is already stable with a lot of visitors. Well, that will depend on your goal.