vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   What is IF conditional for : if forum id is x, in plugin (https://vborg.vbsupport.ru/showthread.php?t=266854)

basketmen 07-15-2011 01:17 AM

What is IF conditional for : if forum id is x, in plugin
 
i tried this but its looks like not working

if ($foruminfo['forumid'] == x) {
stuff
}

the hook used are postbit_display_complete

please help guys, what is the right if conditional, for if forum id is x, in plugin

Zachery 07-15-2011 01:41 AM

$GLOBALS[forumid] try that.

basketmen 07-15-2011 03:52 AM

its works, many thanks, it will be usefull for all of us

if ($GLOBALS['forumid'] == x) {

wonder why this usually conditional not working, maybe because using postbit_display_complete hook

if ($foruminfo['forumid'] == x) {

or

if ($forumid == x) {

Zachery 07-15-2011 05:43 AM

$foruminfo isn't available in the postbit

thread[forumid] would have possibly been correct. GLOBALS should almost always work.


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