vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   List members of additional usergroup (https://vborg.vbsupport.ru/showthread.php?t=267098)

Spyike 07-20-2011 12:34 AM

Quote:

Originally Posted by HMBeaty (Post 2222685)
Pretty sure using
HTML Code:

<br />
would work

--------------- Added [DATE]1311128579[/DATE] at [TIME]1311128579[/TIME] ---------------

so just change
PHP Code:

$sep ', '

to
PHP Code:

$sep '<br />'


Worked like a charm, thanks. Any idea for font size?

kh99 07-20-2011 12:55 AM

Quote:

Originally Posted by Spyike (Post 2222684)
Worked fabulously! I also attempted to add a conditional to the template to only display the str output to certain usergroups, but it was unsuccessful. Would the condition need to be done in the PHP file rather than in the template?

You could do it in the php or the template. If that's the only thing on the page, you could protect the whole page with:

PHP Code:

if (!is_member_of($vbulletin->userinfo567))
{
    
print_no_permission();



(of course you can list whichever user groups you want to have access to the page). If you'd rather leave the page accessible to everyone but just hide something in the template, you could use:

Code:

<vb:if condition="is_member_of($bbuserinfo, 5, 6, 7)">
Secret stuff
</vb:if>


Spyike 07-20-2011 01:30 AM

Quote:

Originally Posted by kh99 (Post 2222705)
You could do it in the php or the template. If that's the only thing on the page, you could protect the whole page with:

PHP Code:

if (!is_member_of($vbulletin->userinfo567))
{
    
print_no_permission();



(of course you can list whichever user groups you want to have access to the page). If you'd rather leave the page accessible to everyone but just hide something in the template, you could use:

Code:

<vb:if condition="is_member_of($bbuserinfo, 5, 6, 7)">
Secret stuff
</vb:if>


The template conditional did not work, that is why I inquired about using PHP conditional. Thanks again for all the help.

Edit: I do find it odd that on the custom page, despite already being logged in vB, it shows the login box for user name and password rather than seeing the typical settings , logout etc that you would if being logged in.


All times are GMT. The time now is 05: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.01665 seconds
  • Memory Usage 1,732KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (4)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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