vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   I need the conditional for poster usergroup ID in postbit (https://vborg.vbsupport.ru/showthread.php?t=287513)

Been Told 09-06-2012 08:51 AM

I need the conditional for poster usergroup ID in postbit
 
Hello there!
Here is what I am trying to achieve.
In postbit_legacy I want to display a word if the person who made the post is in the usergroup ID 56.
How do I write the conditional for that? If I use the is_member_of conditional, it applies to the person viewing the post - not the person who posted it.

Any help is very much appreciated. :)

PS:
This is for vB4.

kh99 09-06-2012 09:09 AM

You can use:

Code:

<vb:if condition="is_member_of($post, 56)">

Been Told 09-06-2012 09:32 AM

Thanks very much kh! Worked like a charm :)

Davey-UK 11-24-2012 10:11 AM

:up: How would a conditional be written in postbit legacy, for the following.
An image is shown in the postbit to everyone but NOT the person who made the post.

Hope this is clear.
Thankyou

EDIT:
Done it!
Code:

<vb:if condition="$bbuserinfo[userid] != $post[userid]">my code</vb:if>

BusterHymens 01-03-2013 03:29 AM

How would you write a conditional just like this for SHOWTHREAD instead of postbit legacy?

Code:

<vb:if condition="is_member_of($post, 56)">
Thanks

kh99 01-03-2013 11:03 AM

Well, you could try this:
Code:

<vb:if condition="is_member_of($bbuserinfo, 56)">

but that's not exactly the same since it's checking the user who's looking at the page, not the user who wrote a post.


All times are GMT. The time now is 10:19 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.01063 seconds
  • Memory Usage 1,713KB
  • 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
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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