vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   If UsergroupNo = 1........correct format needed (https://vborg.vbsupport.ru/showthread.php?t=158557)

cheekymonk3y 09-23-2007 06:04 PM

If UsergroupNo = 1........correct format needed
 
Hiya,

I'd like to place an If statement in my postbit which checks the usergroup first. Basically
Code:

[IF Usergroup Number = 1]
Do Stuff;
[/IF]

Could someone please give me the correct VB'ed version of that pseudocode.

Also, I'm looking for a reference for VB coding standards, like what hooks (right term?) can be called, where, how, etc. I looked around the VB.com website but couldn't find anything, though it should be there. Can someone point me in the right direction please.


Thank you.

Lynne 09-23-2007 06:29 PM

I just posted about the usergroup issue here: https://vborg.vbsupport.ru/showthread.php?t=158554

Dismounted 09-24-2007 05:12 AM

Code:

<if condition="is_member_of($vbulletin->userinfo, 1)">
DO STUFF
</if>

http://www.vbulletin.com/docs/html/codestandards

Eikinskjaldi 09-24-2007 05:36 AM

Will that php work in a template dismounted?

Dismounted 09-24-2007 05:42 AM

My code example will work in templates, it will only work in templates.

cheekymonk3y 09-24-2007 09:01 AM

Quote:

Originally Posted by Dismounted (Post 1345691)
Code:

<if condition="is_member_of($vbulletin->userinfo, 1)">
DO STUFF
</if>

http://www.vbulletin.com/docs/html/codestandards

Thanks Lynne & Dismounted. And thanks for the link.


All times are GMT. The time now is 04:47 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.01000 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
  • (3)bbcode_code_printable
  • (1)bbcode_quote_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