vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Hooks (https://vborg.vbsupport.ru/showthread.php?t=116449)

Rich 05-23-2006 11:11 AM

Hooks
 
Hooks are completely new to me. (Meaning I have never tried to implement one anywhere on my site on my own. lol)

Is there a way to hook in somewhere so specific pages that I create or modify (in PHP) will allow that page to use the custom profile fields if I call them in a template?

akanevsky 05-23-2006 11:49 AM

Quote:

Hooks are completely new to me.
Look in the 3.5 tutorials section, you'll find plenty of information on hooks and plugins.
Basically, it's adding php code to certain places in php files without actually modifying those files.
Great thing once you get to know it.

Zachery 05-23-2006 11:56 AM

Other users or the user who is browsing the page? If its the user who is browsing the page, in templates

$bbuserinfo[fieldX] in templates $vbulletin->userinfo['fieldx']

Rich 05-23-2006 12:30 PM

Thanks Anthony, I will read up on that. (I always forget to check and see if "my question" is covered in the manual.)

Zachery,

I am actually creating custom fields that I want to be displayed under certain conditions. Currently, I am trying to get this to work with the Journal Modification. Based on a conditional the user selects in their UserCP, I want either a left or a right column to be displayed. The problem I am having is that the information is not being processed. It acts as if the conditionals aren't there at all. I am trying to hook in so that it will be parsed so the journal recognizes the custom fields.

I viewed the source and saw that hooks were being used in various places, so I am thinking if I use the correct hooks, I can have that info processed before the page is output.

akanevsky 05-23-2006 01:41 PM

Quote:

I viewed the source and saw that hooks were being used in various places, so I am thinking if I use the correct hooks, I can have that info processed before the page is output.
Hooks are ALWAYS processed before page output, because print_output terminates the script.

Rich 05-23-2006 10:35 PM

I have not been able to figure this out. lol I even made the decision to post on vbulletin.com to get the hooks name. Unsurprisingly, I was redirected to post on this site.

Quote:

Originally Posted by Zachery
Other users or the user who is browsing the page? If its the user who is browsing the page, in templates

$bbuserinfo[fieldX] in templates $vbulletin->userinfo['fieldx']

I got one portion of what I was seeking to work with the $bbuserinfo[fieldX] so thank you! lol I have been ripping my hair out over this Zach. lmao


All times are GMT. The time now is 03:59 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.00993 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_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