'Dashboard', 'description' => 'Your Web Analytics Dashboard. You can customize Your Dashboard: add new widgets, change the order of your widgets. Each user can access his own custom Dashboard.', 'author' => 'Piwik', 'author_homepage' => 'http://piwik.org/', 'version' => Piwik_Version::VERSION, ); } public function getListHooksRegistered() { return array( 'template_js_import' => 'js', 'template_css_import' => 'css', ); } function js() { echo ' '; } function css() { echo "\n"; } public function install() { // we catch the exception try{ $sql = "CREATE TABLE ". Piwik::prefixTable('user_dashboard')." ( login VARCHAR( 100 ) NOT NULL , iddashboard INT NOT NULL , layout TEXT NOT NULL, PRIMARY KEY ( login , iddashboard ) ) DEFAULT CHARSET=utf8 " ; Piwik_Exec($sql); } catch(Exception $e){ // mysql code error 1050:table already exists // see bug #153 http://dev.piwik.org/trac/ticket/153 if(!Zend_Registry::get('db')->isErrNo($e, '1050')) { throw $e; } } } public function uninstall() { $sql = "DROP TABLE ". Piwik::prefixTable('user_dashboard') ; Piwik_Exec($sql); } } Piwik_AddMenu('Dashboard_Dashboard', '', array('module' => 'Dashboard', 'action' => 'embeddedIndex'));