vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Number of users using style (https://vborg.vbsupport.ru/showthread.php?t=72339)

Spyke 11-30-2004 03:14 PM

Number of users using style
 
hi,

I was just wondering if this mod was made or if someone could throw it together if it wouldn't be to hard to make.

I know that there's a "what style each user is using" type mod already made where it shows the users style in the post bit. But what i'd like i for it to just show the number of users who use that specific style from the style chooser. I've seen it on a couple other forums so i know that it is around somewhere.

For example

Style 1 (3)
Style 2 (67)
Style 3 (1)
Style 4 (143)

etc.

Thanks!

Andreas 11-30-2004 03:38 PM

[sql]SELECT count( user.styleid ) AS count, title FROM user LEFT JOIN style ON ( style.styleid = user.styleid ) GROUP BY user.styleid[/sql]

title=NULL means using board default

Spyke 11-30-2004 04:46 PM

ok thanks.

Does it mean that no user is using the style if it doesn't show anything? Just asking because one of the styles wasn't listed.

Is there anyway to get those numbers showing in the skin chooser, beside the respectable style, in the forums footer?

Thanks again.

Spyke 12-01-2004 04:27 PM

*bump*

Andreas 12-01-2004 09:50 PM

Hmm, doesn't such a hack already exist?
I think i saw it somewhere ...

Spyke 12-01-2004 11:13 PM

I searched but couldn't find one other then the one that shows which style you're using in the postbit.

If it's out there, anyone want to show me in the right direction?

Thanks.

Cloud-Warrior 12-02-2004 09:59 AM

This might help, I wrote it for a DHTML menu:

PHP Code:

$styleslist "";

$stylesets $DB_site->query("SELECT style.title, user.styleid, COUNT(*) AS count FROM user
LEFT JOIN style USING (styleid) WHERE style.styleid IS NOT NULL AND style.userselect=1 GROUP BY user.styleid ORDER BY style.title"
);
if (!isset(
$bbuserinfo['realstyleid'])) {
  
$bbuserinfo['realstyleid'] = $bbuserinfo['styleid'];
}
while (
$thisset $DB_site->fetch_array($stylesets)) {
  if (
$bbuserinfo['realstyleid'] == $thisset['styleid']) {
    
$selected "selected";
  } else {
    
$selected "";
  }
  
$thisstyleid $thisset['styleid'];
  
$thisstylename $thisset['title'];
  
$thisstylecount $thisset['count'];
  
$styleslist .= "$thisstylename ($thisstylecount Users) $selected\n";



Spyke 12-02-2004 06:06 PM

Anyone want to put that peice of code in perspective for me and give me some instructions on where to put it or what to replace? :D

Thanks.


All times are GMT. The time now is 07:26 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.01056 seconds
  • Memory Usage 1,727KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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