View Full Version : 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
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']
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
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.
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.
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
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.