Quote:
Originally Posted by b6gm6n
What's a hook? do I need to create a new plugin for my function? insert some code into my custom php file to allow vB to accept it? or insert more code into my custom template? or create a new template with proper allowed custom functions? - I'm confused...
|
Other than using variables to build the output html, in general you cannot put php in a template. The exception is in a conditon (i.e <if condition="....), and then you can only put what would go in a php 'if' statement, and you can only use the "safe" functions.
But I don't think that's what you want. It looks to me like you are trying to call your custom function to do some formatting, in which case you would want to use a plugin. Your code would then create one or more variables and you'd use them in a template.
So, which hook location should you use? It depends on what you're trying to do. Hooks are just places in the vbulletin scripts where addon code can be called, so you need to find one in a location that's allows you to do what you want to do.