vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Show Users using Style in Stylechooser (https://vborg.vbsupport.ru/showthread.php?t=95637)

Andreas 09-03-2005 10:00 PM

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

Xplorer4x4 09-04-2005 04:37 PM

First install. :) Thanks Kirby. I been needing this.

Kirk Y 09-04-2005 05:11 PM

Sweet idea!

* acidburn0520 licks the install button

Craigr 09-04-2005 06:56 PM

Nice hack, installed and working : http://www.steven-seagal.net/forum/ :)

turksengel 09-04-2005 07:13 PM

thx clicked install

Boofo 09-04-2005 07:17 PM

Is there a way to add the vb_number_format for numbers over 999?

y2krazy 09-04-2005 08:05 PM

Installed. ^^

One question, where would I go to edit that number to, let's say, change it to "(X Users)"? Thanks again!

Andreas 09-05-2005 04:06 AM

@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:

$cache["$parentid"]["$idx"]['title'] .= ' (' intval($styleusage["$style[styleid]"]) . ')'

to
PHP Code:

$cache["$parentid"]["$idx"]['title'] .= ' (' intval($styleusage["$style[styleid]"]) . ' Users)'


y2krazy 09-05-2005 07:40 AM

Quote:

Originally Posted by KirbyDE
@y2krazy
Sure. Take a look at functions_styleusers.php and change
PHP Code:

$cache["$parentid"]["$idx"]['title'] .= ' (' intval($styleusage["$style[styleid]"]) . ')'

to
PHP Code:

$cache["$parentid"]["$idx"]['title'] .= ' (' intval($styleusage["$style[styleid]"]) . ' Users)'


Actually, that didn't change a thing. ><

Andreas 09-05-2005 08:08 AM

It does - change your Style in UserCP, hit save and you'll see.


All times are GMT. The time now is 01:45 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.01249 seconds
  • Memory Usage 1,749KB
  • 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
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete