![]() |
How to display a count for the number of members in a certain usergroup
How would I display something along the lines of, "Now home to ### premium members," in a place like the noticebit or somewhere LIKE that in order to catch the eye of non-premium members? Any thoughts or suggestions would be greatly appreciated!
|
If the premium members belong to a certain usergroup, you could do a query in a plugin and get the count, then use the value in a template. Also, unless you really want it to update as soon as someone else joins, you could put it in a scheduled task and write it to the datastore, so that it won't add a query to each page load. So maybe something like:
Code:
$premium_gid = X; Maybe using hook cron_script_cleanup_hourly. Then in another plugin on init_startup: Code:
$new_datastore_fetch[] = 'premium_members'; Then manually run the Hourly Cleanup scheduled task to store a value, then you can use {vb:raw vbulletin->premium_members} in whatever template you want. |
All times are GMT. The time now is 12: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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|