vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How do I know how many users are using a specific style? (https://vborg.vbsupport.ru/showthread.php?t=211167)

Brother Malachi 04-14-2009 07:13 AM

How do I know how many users are using a specific style?
 
I have several styles in our forums and I was wondering if there is a way to find out who is using which style and perhaps some statistics on # of users of each style.

Cryo 04-14-2009 02:32 PM

If you run this query...

Code:

SELECT
    COUNT(b.styleid) as Users,
    b.title
FROM
    (PREFIX)_user a,
    (PREFIX)_style b
WHERE
    a.styleid = b.styleid
GROUP BY
    b.styleid ORDER BY Users DESC

It will show you how many users are using each style. This doesn't include users using the default style (styleid = 0) though, so you will need to run a separate query to figure that out...

Code:

SELECT
    COUNT(styleid) as Users
FROM
    (PREFIX)_user a
WHERE
    styleid = 0
GROUP BY
    styleid

Of course you need to replace "(PREFIX)" with whatever your vB table prefix is. You could write a script or plugin to do this if so inclined, but this is the quick and dirty method of getting those numbers. It's important to note that styles you disabled that users still have selected will be counted still. For example, I used to offer a style that a very small portion of my userbase selected. I declided to stop supporting it and removed it, but after disabling it they still have it set as their style ID (even though they're viewing the default style).

Hope this helps.


All times are GMT. The time now is 01:04 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01791 seconds
  • Memory Usage 1,706KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete