Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-30-2004, 03:14 PM
Spyke's Avatar
Spyke Spyke is offline
 
Join Date: Jan 2003
Location: Canada
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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!
Reply With Quote
  #2  
Old 11-30-2004, 03:38 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[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
Reply With Quote
  #3  
Old 11-30-2004, 04:46 PM
Spyke's Avatar
Spyke Spyke is offline
 
Join Date: Jan 2003
Location: Canada
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 12-01-2004, 04:27 PM
Spyke's Avatar
Spyke Spyke is offline
 
Join Date: Jan 2003
Location: Canada
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*bump*
Reply With Quote
  #5  
Old 12-01-2004, 09:50 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, doesn't such a hack already exist?
I think i saw it somewhere ...
Reply With Quote
  #6  
Old 12-01-2004, 11:13 PM
Spyke's Avatar
Spyke Spyke is offline
 
Join Date: Jan 2003
Location: Canada
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 12-02-2004, 09:59 AM
Cloud-Warrior's Avatar
Cloud-Warrior Cloud-Warrior is offline
 
Join Date: Feb 2002
Location: Galway, Ireland
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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";

Reply With Quote
  #8  
Old 12-02-2004, 06:06 PM
Spyke's Avatar
Spyke Spyke is offline
 
Join Date: Jan 2003
Location: Canada
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?

Thanks.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:54 PM.


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.04274 seconds
  • Memory Usage 2,235KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete