![]() |
Show Users using Style in Stylechooser
<font size="3">Show Users using Style in Stylechooser</font>
Description This Hack shows the number of Users permanently using a Style in Stylechooser. Details 1 Product XML with 2 Plugins 1 PHP Function File Note: No queries or processing Overhead for normal Display! History 1.0.0 Initial Version 1.0.1 Compatibiity Update for vBulletin 3.6 |
First install. :) Thanks Kirby. I been needing this.
|
Sweet idea!
* acidburn0520 licks the install button |
Nice hack, installed and working : http://www.steven-seagal.net/forum/ :)
|
thx clicked install
|
Is there a way to add the vb_number_format for numbers over 999?
|
Installed. ^^
One question, where would I go to edit that number to, let's say, change it to "(X Users)"? Thanks again! |
@Boofo
That's not that easy, as the Text is hardcoded into stylecache. If you use only one Thoustand Separator it will work fine if you just use vb_number_format(), but if you have several languages you will run into Problems. To solv this you would have to remove the line that modifies the Title, cycle through the Chache upon each pageload and add the formatted Number there - but that adds some Overhead. Or you can hack the function that buils the stylechooser - that would work without much Overhead, but has the drawback of requiring Fileedits. @y2krazy Sure. Take a look at functions_styleusers.php and change PHP Code:
PHP Code:
|
Quote:
|
It does - change your Style in UserCP, hit save and you'll see.
|
Quote:
|
Normally that can't be. Send me a PM with an ACP and FTP Login and i'll take a look
|
Ok, new wrinkle. I have 19 members and they are all using the forum default style. But in the style chooser it shows 17 using that style and 0 using the other one. Any ideas?
|
Uh? That should not happen, where are those 2 missing members ...
[sql]SELECT styleid, COUNT(styleid) FROM user GROUP BY styleid[/sql] What does that tell? |
ID - Count
---------- 0 - 16 5 -1 6 -1 10 -1 But I deleted all styles except 2 of them. And rebuilt styles. Shouldn't it have reset? |
No. It will fallback on runtime.
Hmm, I could try to make the query a bit more intelligent so it counts non-existing styles as default. But currently this is working as designed - it tells you what's in the database ;) |
How do I get it to show it right then?
|
UPDATE user SET styleid=0 WHERE styleid IN (doesnotexistanymore)
|
After running the query 2 times (for deleted styles 5 and 6) and rebuilding the styles, now it all looks right. ;)
Is there an easier way to do that if you ever delete another style? |
Wonderful, I've already been looking for this.
Thanks, Kirby! |
@Boofo
Well .. as said, it would require putting more logic into the query. Or report it as a bug @ .com ;) |
Quote:
And how would you actually report something like this? Since it is a mod/hack that found it, wouldn't that basically null and void and report I would make? ;) |
installed, and works a treat
|
very nice.
*installed |
A very nice and useful hack. Thanks a lot. :)
|
Quote:
and get this on my forum home: Code:
Warning: Unknown(/home/httpd/vhosts/supportcore.org/httpdocs/testvb/includes/functions_styleusers.php): failed to open stream: No such file or directory in /global.php(335) : eval()'d code on line 14 Also when I go to my admincp I get it to. I ca'nt disable the product now. >.<...How do I disable all plugins? |
Did you upload this file (functions_styleusers.php)?
It's necessary. |
Yeah. I uplaoded it but here is what happened.
I have a live 3.0.5 site and a test 3.5.0 RC3 site [high]* TruthElixirX clicks forum instead of /testvb [/high] Just upladoed it to the wrong place. Works a-okay now. Thanks a lot. :) |
installs.
|
Quote:
|
doesnotexistanymore = style ID number (that doesn't exist anymore)
|
Quote:
|
Installed and works on 3.5.0. :P
|
Thanks!!
I was wondering if you can somehow make something like vB.org has where on their postbit it says what style they are using. |
bump for my question
|
Yes it is possiblt to show that info - but not with this Hack.
|
How do I set this to include only certain usergroup ids in the counts?
|
Not possible.
|
I have this installed in 3.5.1 but the problem is, it doesn't actually work. The moderator usergroup does not have access to any styles that i select at all, is there any possible way to fix it. Or is it safe to assume that this doesn't work in 3.5.1?
|
Could i set numbers visible only for admins?
|
All times are GMT. The time now is 04:44 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|