vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   if canadmin tag (https://vborg.vbsupport.ru/showthread.php?t=318650)

X-or 05-13-2015 02:19 PM

if canadmin tag
 
IIRC in vb3 templates, you could wrap a piece of code with a <ifcanadmin> tag, or something similar, so that only users who are in a group with admincp access (can admin) could see what's wrapped inside

is there anything similar in vb4, because it would be extremely useful to me

thank you

ForceHSS 05-13-2015 02:25 PM

Have not seen it for vb4. Can you link to where you have seen this on here if it is here. But the code for vb3 might work for vb4 depends what vb4 version you have if it does not work would not be hard making it work

MarkFL 05-13-2015 02:34 PM

You could try:

HTML Code:

<vb:if condition="$show['admincplink']">...code here...</vb:if>

X-or 05-29-2015 01:35 PM

^sorry for the late answer, yes that worked nicely, thanks ^^

however I ended opting for an array or users

Code:

<vb:if condition="in_array($bbuserinfo['userid'], array(1, 2, ...))">...</vb:if>


All times are GMT. The time now is 03:58 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.00977 seconds
  • Memory Usage 1,710KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete