vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Administrator conditional help. (https://vborg.vbsupport.ru/showthread.php?t=198441)

Jinovich 12-09-2008 02:44 PM

Administrator conditional help.
 
I have a variable which would be this,

PHP Code:

$parse_link_results_add '\n
<fieldset class=\"fieldset\">
 <legend>$vbphrase[parse_link_legend]</legend>
  <div>$vbphrase[hidden_results_legend_info]</div>
  </fieldset>
'


This would be for modifying a template and is only a small abstract of code, I want to hide the fieldset so that only admin can view it.

I tried <if condition=\"is_member_of($bbuserinfo, 6)\"> </if> but for some reason that didnt work.

I then tried something simpler <if condition="$show['admincplink']"> but that gives me a T_string error.


So I have no idea how I can hide this fieldset from all users but admins

SEOvB 12-09-2008 02:58 PM

Code:

if ($show[admin]){
$parse_link_results_add = '\n
<fieldset class=\"fieldset\">
 <legend>$vbphrase[parse_link_legend]</legend>
  <div>$vbphrase[hidden_results_legend_info]</div>
  </fieldset>
';  }

have you tried that, the $show[admin] part probab'y isn't the right variable your looking for though :D

Jinovich 12-09-2008 05:20 PM

That didnt work, instead it hides the whole thing from me.

Edt: Sorry didnt read your last part.

Lynne 12-09-2008 05:28 PM

Quote:

Originally Posted by Jinovich (Post 1681774)
That didnt work, instead it hides the whole thing from me.

Quote:

Originally Posted by FRDS (Post 1681693)
the $show[admin] part probab'y isn't the right variable your looking for though :D

You should try something else like is_member_of

Jinovich 12-09-2008 07:36 PM

Thanks Lynne and FRDS.

Finally managed to get that script sorted out couldnt have done it without you.


All times are GMT. The time now is 12:58 AM.

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.01035 seconds
  • Memory Usage 1,720KB
  • 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_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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