Recent Topics

1 Jun 13, 2011 20:45    

Hi, I am developing a new plugin for b2evo users to display a widget in the sidebar, this plugin requires to load content with special characters:


<iframe blah blah blah... ></iframe>

I would like to know how to call a function present in:

inc/_core/_misc.funcs.php

and use it in the plugin.

Is this possible?

2 Jun 13, 2011 20:58

You can use any function from inc/_core/_misc.funcs.php and some other files loaded by default

function some_hook( $params )
{
    echo maxwords($params['whatever'], 30);
}

If you are trying to use a function and get an error that it's unknown, you should include the file defining that function with "load_funcs"

function some_hook( $params )
{
    echo get_dirsize_recursive('/some/directory/'); // error: unknown function

    load_funcs('files/_file.funcs.php');

    echo get_dirsize_recursive('/some/directory/'); // prints directory size
}


Form is loading...