vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Plugin Variables, and Templates Help (https://vborg.vbsupport.ru/showthread.php?t=129386)

C Braithwaite 10-19-2006 05:45 PM

Quote:

Originally Posted by acidburn0520
Weird. I always assumed that global_start was... well, global.

I guess you'll just have to use postbit_display_start. For your Custom Page, it'd probably be simpler to just include the PHP code within the file itself, rather than using hooks.


i thought it was global also, and supprisingly in the global_start works for my custom page but not the postbit template! lol

Paul M 10-19-2006 06:30 PM

global_start is called on all vb pages.

I believe the postbits are built from within functions so you are likely to need to call global $yourvariable in a postbit hook to get it to work.

An easier way would be to create your own array $vbulletin->myvars and then use $vbulletin->myvars['var1'] etc, as $vbulletin is already globalised in most places.

C Braithwaite 10-22-2006 09:05 AM

Quote:

Originally Posted by Paul M
global_start is called on all vb pages.

I believe the postbits are built from within functions so you are likely to need to call global $yourvariable in a postbit hook to get it to work.

An easier way would be to create your own array $vbulletin->myvars and then use $vbulletin->myvars['var1'] etc, as $vbulletin is already globalised in most places.


that's a good idea, ill give that a shot. :D

Xyzzy 03-11-2007 11:12 PM

Quote:

Weird. I always assumed that global_start was... well, global.

I guess you'll just have to use postbit_display_start.
I wish I had seen this, oh, about 18 freaking hours ago.

:)

:up:

Marco van Herwaarden 03-12-2007 08:11 AM

global_start is called once on each page. The postbit_* hooks are called for each post.


All times are GMT. The time now is 06:07 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.00934 seconds
  • Memory Usage 1,726KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete