vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Hide Info From Certain Usergroups... (https://vborg.vbsupport.ru/showthread.php?t=243806)

g0dfather1984 06-02-2010 06:33 PM

Hide Info From Certain Usergroups...
 
Say I wanted to hide something from a usergroup, I tried this but it didn't work.

<vb:if condition="$bbuserinfo['usergroupid'] == '19'">

</vb:if>

What would be the proper coding to hide something from a usergroup?

I copied Lynne's code from hiding recent activity on an old 3.8 thread but now am trying to do the same for another thing in VB 4.

Sorry if this is a little screwed up. I've edited a few times and never reorganized it.

Xencored 06-02-2010 06:39 PM

<vb:if condition="is_member_of($bbuserinfo,1,2,3,4,5,6)"> info </vb:if>

g0dfather1984 06-02-2010 06:46 PM

Quote:

Originally Posted by Animemike (Post 2047227)
<vb:if condition="is_member_of($bbuserinfo,1,2,3,4,5,6)"> info </vb:if>

No, it still shows, sorry.

Xencored 06-02-2010 06:47 PM

Quote:

Originally Posted by g0dfather1984 (Post 2047232)
No, it still shows, sorry.

This is the right code 100%

1,2,3,4,5,6 change this to the Usergroups Allowed to see

g0dfather1984 06-02-2010 06:57 PM

Quote:

Originally Posted by Animemike (Post 2047234)
This is the right code 100%

1,2,3,4,5,6 change this to the Usergroups Allowed to see

That's what I thought too but for some reason it's still appearing. I am trying to hide this code from a certain usergroup:

https://vborg.vbsupport.ru/showthread.php?p=2047172

Xencored 06-02-2010 07:04 PM

Quote:

Originally Posted by g0dfather1984 (Post 2047240)
That's what I thought too but for some reason it's still appearing. I am trying to hide this code from a certain usergroup:

https://vborg.vbsupport.ru/showthread.php?p=2047172

Code:

<vb:if condition="is_member_of($bbuserinfo,1,2,3,4,5,6) AND $post['isfirstshown']" >
<li class="firstpost_advert_container"><div class="firstpost_advert">
      REPLACE THIS WITH YOUR ADSENSE CODE HERE
</div>
</li>
</vb:if>


g0dfather1984 06-02-2010 08:19 PM

Sorry for the delay in response but it's still showing and it tells me this:

"adding child to non-existent node!"

Xencored 06-02-2010 08:31 PM

Quote:

Originally Posted by g0dfather1984 (Post 2047279)
Sorry for the delay in response but it's still showing and it tells me this:

"adding child to non-existent node!"

You have messed up somewhere than mate

there is no "non-existent node!" in the code above

borbole 06-02-2010 08:38 PM

Quote:

Originally Posted by Animemike (Post 2047227)
<vb:if condition="is_member_of($bbuserinfo,1,2,3,4,5,6)"> info </vb:if>

If I understood the OP correctly, he wants to hide stuff from those usergroups and not show it. This conditional above, will show whatever he is trying to hide, to those groups. Try to add the non true operator, !, when checking for the gids and that should fix it.

g0dfather1984 06-02-2010 08:40 PM

Well, I got rid of the node. I had an extra </vb:if> that wasn't needed but it still shows.

Xencored 06-02-2010 08:43 PM

Quote:

Originally Posted by g0dfather1984 (Post 2047292)
Well, I got rid of the node. I had an extra </vb:if> that wasn't needed but it still shows.

Hard refresh Alt+f5
if that dont work pm me your site

borbole 06-02-2010 08:43 PM

Quote:

Originally Posted by g0dfather1984 (Post 2047292)
Well, I got rid of the node. I had an extra </vb:if> that wasn't needed but it still shows.

Try my suggestion above, that should fix it.

Xencored 06-02-2010 08:45 PM

Quote:

Originally Posted by borbole (Post 2047291)
If I understood the OP correctly, he wants to hide stuff from those usergroups and not show it. This conditional above, will show whatever he is trying to hide, to those groups. Try to add the non true operator, !, when checking for the gids and that should fix it.

Well he can use that also to show only to the groups and leave out the ones he does not no?

plus i did say "Usergroups Allowed to see"


Quote:

Originally Posted by Animemike (Post 2047234)
This is the right code 100%

1,2,3,4,5,6 change this to the Usergroups Allowed to see


g0dfather1984 06-02-2010 08:51 PM

OMG, I'm an idiot and that's all I'll say.

Thank you both you for taking the time to helping me figure this out.

It is greatly appreciated and I apologize for the idiot in me.

Xencored 06-02-2010 08:51 PM

Quote:

Originally Posted by g0dfather1984 (Post 2047303)
OMG, I'm an idiot and that's all I'll say.

Thank you both you for taking the time to helping me figure this out.

It is greatly appreciated and I apologize for the idiot in me.

What did you do wrong than? :D

g0dfather1984 06-02-2010 08:53 PM

Quote:

Originally Posted by Animemike (Post 2047299)
Well he can use that also to show only to the groups and leave out the ones he does not no?

plus i did say "Usergroups Allowed to see"

Quote:

Originally Posted by Animemike (Post 2047304)
What did you do wrong than? :D


... the bold is all I'll say.

Sorry again, lol.

Xencored 06-02-2010 08:55 PM

Quote:

Originally Posted by g0dfather1984 (Post 2047305)
... the bold is all I'll say.

Sorry again, lol.

lol np happy you got it working :)

borbole 06-03-2010 02:53 PM

The most important thing is that you got it to work. Glad to hear that :)


All times are GMT. The time now is 03:08 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.01335 seconds
  • Memory Usage 1,757KB
  • 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
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (18)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