. */ /** * @package SamplePlugin * @maintainer Your Name */ if (!defined('STATUSNET') && !defined('LACONICA')) { // This check helps protect against security problems; // your code file can't be executed directly from the web. exit(1); } class SamplePlugin extends Plugin { function onInitializePlugin() { // Event handlers normally return true to indicate that all is well. // // Returning false will cancel further processing of any other // plugins or core code hooking the same event. return true; } /** * Hook for RouterInitialized event. * * @param Net_URL_Mapper $m path-to-action mapper * @return boolean hook return */ function onRouterInitialized($m) { $m->connect(':nickname/samples', array('action' => 'showsamples'), array('feed' => '[A-Za-z0-9_-]+')); $m->connect('settings/sample', array('action' => 'samplesettings')); return true; } }