vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   forum permision's (https://vborg.vbsupport.ru/showthread.php?t=234144)

ageurtse 01-25-2010 05:01 PM

forum permision's
 
how can i handel user right permisions in a template, i tryed the example in this link
https://vborg.vbsupport.ru/showthread.php?t=231525

i tryed the Show specific user groups : but that doesn't do the trick.

i created an option which contain's the user groups that can view.

Code:

<vb:if condition="is_member_of($bbuserinfo, vboption.AJGpermision)">Show this to user group 1, 2, and 3</vb:if>
i did somthing wrong but i don't now what. is i replace vboption.AJGpermision for 1,2,3 than it also isn't working.

please need help on this.

Lynne 01-25-2010 05:07 PM

We need to know what template you are putting that condition in and where in the template. (And, vboption.AJGpermision doesn't look valid at all)

ageurtse 01-25-2010 05:10 PM

oke it is in a template writen by mysel and this template is called by a plugin also written by myself.
this plugin add's a extra member profile tab.

what should it be
Code:

{VB:options AJGpermision}

Lynne 01-25-2010 05:14 PM

If using a variable in a condition, you would use the same syntax you used in vb3 - $vboptions['xxx']

ageurtse 01-25-2010 05:17 PM

oke, for the record i never programmed in vb3.

but why isn't the example working when entering the allowed usergroups by number like in the example.

do i need to register the variable $bbuserinfo and $vboptions

Lynne 01-25-2010 09:36 PM

It's really hard to tell with the very little information you have given. You should not have to register either $bbuserinfo or $vboptions for use in a template. So, my guess is that something else is going wrong.

ageurtse 01-26-2010 04:39 AM

the example did work, i enter the wrong usergroup (i'm a admin) :)

$vboptions['AJGPermision'] is also working, but only when i enter one number, if i have a , seperated list then it isn't working how can i fix this.

Lynne 01-26-2010 02:18 PM

You need to turn it into an array. If you are just entering a string of numbers, separated by commas, into the option field, then it is a string. You will need to explode the string on the commas and create an array out of the values and then use them.

ageurtse 01-26-2010 03:39 PM

Hmmmm i go search the i-net on how todo that.


All times are GMT. The time now is 01:15 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.01818 seconds
  • Memory Usage 1,723KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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