Include own php file in global.php
#1
Is there any way for me to make a plugin that would allow me to include a custom.php in my global.php? For the sake of template variables accessible from any page, or helper functions for all my custom pages.

Thanks in advance.
Reply
#2
This user has been denied support. This user has been denied support.
...that's what a plugin is. a PHP file loaded...
Reply
#3
I'm confused as to what you mean. If you are just trying to create new template variables, you can do so by hooking a function into the "global_end" hook. Just use global variables in the function to create new template variables that will be accessible globally.

As far as custom functions, if you're essentially just creating a library of functions for other pages and plugins, you can define as many custom plugins as you want inside of your plugin file.
Reply
#4
Thanks for the replies, I guess I should have done a little more research into plugins before asking Smile

You both answered my question, so thank you both Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)