View Single Post
  #4  
Old 02 Feb 2014, 12:14
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
If you want to make a forum block, then you can make a php type block and use that code as part of it. If you want to put the value in an existing template, then you need to create a plugin, use that code, and also add a line to pre-register it to the template you want it to display in (and also edit the template to add something like {vb:raw num_members}).

For example, if you wanted to add it somewhere in the FORUMHOME template, you could create a plugin using hook location forumhome_complete and code like this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Then in FORUMHOME, something like:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


BTW, you wouldn't expect that query to fail, but it's good to check anyway and do something reasonable rather than display 0.

(I changed it to use num_grp_members because I think num_members might be used already).
Reply With Quote