![]() |
Plugin Coding Question: Function Syntax
What is the proper syntax for calling a function in a plugin?
Here's my issue, I'm including a file that defines a function called newsfeed(). Here's my plugin code currently: (HOOK: global_complete) Code:
ob_start(); However, what happens, is that the feed shows up at the very top of the page, not where I put the $cnn call. Is there something I'm not doing properly? Any help is appreciated. Thanks in advance. |
It could likely not be accessing the variable $cnn correctly... when you have a variable inside a function, you have to make it global, which I think works like so:
Code:
global $cnn; // define it outside of the function |
Quote:
So, really, all the plugin needs to do is: include("functionfile.php"); newsfeed() And that's it. I got it to work, it just doesn't show up in the right place. bump |
All times are GMT. The time now is 07:47 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|