run('test',1,2,3)]} // so it is almost as easy as calling a PHP method without the need to load a class first. // PHP calling a Class: // require_once(plugin_path); // $plugin_test = new plugin_test(); // $plugin_test->run(); // Avallo Panel Calling a Class: // {plugin[plugin_test->run()]} class site { // You have access to administer your plugins throuth the admin() method // if your plugin has an admin method it will be visible from the administration interface. // you can use forms to post information and create your own UI. function admin() { global $conf,$page; $text = (isset($_POST['test_text']) ? $_POST['test_text'] : ''); $op = ''; $op .= '

Site Plugins

'; if(!empty($text)) $op .= '

'.$text.'

'; /* $op .= '
'; $op .= ''; $op .= '

'; $op .= '
'; */ $op .= '

There are is no configuration options for Site Plugins.

'; $methods = get_class_methods('site'); unset($methods[0]); $op .= '

Available plugin variables.

'; $op .= ""; return $op; } // Create as many methods as you want to call from avallo panel variables. function headerimage() { global $page,$lol; $image = SELECT("* FROM `filesystem` WHERE `Type`='Header' AND `Active`='1' AND `Parent`='".$page['ID']."' ORDER BY `Sort` LIMIT 1"); if(!empty($image)) { $image = $image[0]; $image_m = newname($image['Path'],'-m'); $path = '/uploaded/'.$image_m; $op = '
'; if(!empty($image['Description'])) { $op .= '

'.$image['Description'].'

'; } $op .= '
'; } return $op; } function news($parent) { global $page,$lol; $news = SELECT("* FROM `filesystem` WHERE `Type`='Page' AND `Parent`='".$parent."' AND `Active`='1' LIMIT 4"); if(!empty($news)) { $op .= '
'; $op .= '

Latest News:

'; foreach($news as $k=>$v) { $op .= '
'; $op .= '

'.$v['Title'].'

'; $op .= '

'.charcount(strip_tags($v['Source']),110).' Read More »

'; $op .= '
'; } $op .= '
'; } return $op; } }